cache image

This commit is contained in:
jan 2016-07-10 05:26:55 -07:00
parent cc711c6343
commit c27394c4a1
3 changed files with 35 additions and 35 deletions

View File

@ -2,7 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="6e752a8c-6cb9-4ef9-9031-0329ce15fcb4" name="Default" comment=""> <list default="true" id="6e752a8c-6cb9-4ef9-9031-0329ce15fcb4" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/LEDControl.java" afterPath="$PROJECT_DIR$/src/LEDControl.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Calibrator.java" afterPath="$PROJECT_DIR$/src/Calibrator.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Camera.java" afterPath="$PROJECT_DIR$/src/Camera.java" />
</list> </list>
<ignored path="processing-intellij.iws" /> <ignored path="processing-intellij.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -26,8 +27,8 @@
<file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true"> <file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java"> <entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="489"> <state relative-caret-position="615">
<caret line="325" column="0" selection-start-line="325" selection-start-column="0" selection-end-line="325" selection-end-column="0" /> <caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" />
<folding> <folding>
<element signature="e#0#16478#0" expanded="true" /> <element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
@ -93,15 +94,14 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Camera.java" pinned="false" current-in-tab="false"> <file leaf-file-name="Camera.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Camera.java"> <entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="738">
<caret line="22" column="49" selection-start-line="22" selection-start-column="49" selection-end-line="22" selection-end-column="49" /> <caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" /> <element signature="e#1080#1081#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -119,13 +119,13 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Calibrator.java" pinned="false" current-in-tab="true"> <file leaf-file-name="Calibrator.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Calibrator.java"> <entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18"> <state relative-caret-position="360">
<caret line="28" column="20" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" /> <caret line="47" column="36" selection-start-line="47" selection-start-column="36" selection-end-line="47" selection-end-column="36" />
<folding> <folding>
<element signature="e#0#3796#0" expanded="true" /> <element signature="e#0#3795#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -156,7 +156,6 @@
<option value="$PROJECT_DIR$/src/euglena_basic_stimuli.java" /> <option value="$PROJECT_DIR$/src/euglena_basic_stimuli.java" />
<option value="$PROJECT_DIR$/src/Projector.java" /> <option value="$PROJECT_DIR$/src/Projector.java" />
<option value="$PROJECT_DIR$/src/heatup.java" /> <option value="$PROJECT_DIR$/src/heatup.java" />
<option value="$PROJECT_DIR$/src/Camera.java" />
<option value="$PROJECT_DIR$/src/Menu.java" /> <option value="$PROJECT_DIR$/src/Menu.java" />
<option value="$PROJECT_DIR$/src/TriangleClass.java" /> <option value="$PROJECT_DIR$/src/TriangleClass.java" />
<option value="$PROJECT_DIR$/src/EllipseClass.java" /> <option value="$PROJECT_DIR$/src/EllipseClass.java" />
@ -166,6 +165,7 @@
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" /> <option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
<option value="$PROJECT_DIR$/src/LEDControl.java" /> <option value="$PROJECT_DIR$/src/LEDControl.java" />
<option value="$PROJECT_DIR$/src/Calibrator.java" /> <option value="$PROJECT_DIR$/src/Calibrator.java" />
<option value="$PROJECT_DIR$/src/Camera.java" />
</list> </list>
</option> </option>
</component> </component>
@ -350,7 +350,7 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="1920" y="0" width="1280" height="1440" extended-state="4" /> <frame x="1920" y="0" width="1280" height="1440" extended-state="5" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -645,17 +645,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="489">
<caret line="325" column="0" selection-start-line="325" selection-start-column="0" selection-end-line="325" selection-end-column="0" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/LEDControl.java"> <entry file="file://$PROJECT_DIR$/src/LEDControl.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378"> <state relative-caret-position="378">
@ -664,6 +653,16 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Calibrator.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="47" column="36" selection-start-line="47" selection-start-column="36" selection-end-line="47" selection-end-column="36" />
<folding>
<element signature="e#0#3795#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Menu.java"> <entry file="file://$PROJECT_DIR$/src/Menu.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342"> <state relative-caret-position="342">
@ -676,22 +675,22 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Camera.java"> <entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="738">
<caret line="22" column="49" selection-start-line="22" selection-start-column="49" selection-end-line="22" selection-end-column="49" /> <caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" /> <element signature="e#1080#1081#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Calibrator.java"> <entry file="file://$PROJECT_DIR$/src/euglena_basic_stimuli.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18"> <state relative-caret-position="615">
<caret line="28" column="20" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" /> <caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" />
<folding> <folding>
<element signature="e#0#3796#0" expanded="true" /> <element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>

View File

@ -33,13 +33,14 @@ class Camera {
if (newImageAvailable) { if (newImageAvailable) {
cam.read(); cam.read();
latestImage = cam;
} }
return newImageAvailable; return newImageAvailable;
} }
PImage getImage() { PImage getImage() {
return cam; return latestImage;
} }
} }