Browse Source

cache image

master
jan 5 years ago
parent
commit
c27394c4a1
  1. 65
      .idea/workspace.xml
  2. 2
      src/Calibrator.java
  3. 3
      src/Camera.java

65
.idea/workspace.xml

@ -2,7 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<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>
<ignored path="processing-intellij.iws" />
<ignored path=".idea/workspace.xml" />
@ -26,8 +27,8 @@
<file leaf-file-name="euglena_basic_stimuli.java" pinned="false" current-in-tab="true">
<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" />
<state relative-caret-position="615">
<caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" />
<folding>
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
@ -93,15 +94,14 @@
</provider>
</entry>
</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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="22" column="49" selection-start-line="22" selection-start-column="49" selection-end-line="22" selection-end-column="49" />
<state relative-caret-position="738">
<caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
<element signature="e#1080#1081#0" expanded="true" />
</folding>
</state>
</provider>
@ -119,13 +119,13 @@
</provider>
</entry>
</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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="28" column="20" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<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#3796#0" expanded="true" />
<element signature="e#0#3795#0" expanded="true" />
</folding>
</state>
</provider>
@ -156,7 +156,6 @@
<option value="$PROJECT_DIR$/src/euglena_basic_stimuli.java" />
<option value="$PROJECT_DIR$/src/Projector.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/TriangleClass.java" />
<option value="$PROJECT_DIR$/src/EllipseClass.java" />
@ -166,6 +165,7 @@
<option value="$PROJECT_DIR$/src/ProjectorApplet.java" />
<option value="$PROJECT_DIR$/src/LEDControl.java" />
<option value="$PROJECT_DIR$/src/Calibrator.java" />
<option value="$PROJECT_DIR$/src/Camera.java" />
</list>
</option>
</component>
@ -350,7 +350,7 @@
<servers />
</component>
<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" />
<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" />
@ -645,17 +645,6 @@
</state>
</provider>
</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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
@ -664,6 +653,16 @@
</state>
</provider>
</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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
@ -676,22 +675,22 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/Camera.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="22" column="49" selection-start-line="22" selection-start-column="49" selection-end-line="22" selection-end-column="49" />
<state relative-caret-position="738">
<caret line="41" column="23" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1015#1016#0" expanded="true" />
<element signature="e#1041#1042#0" expanded="true" />
<element signature="e#1080#1081#0" expanded="true" />
</folding>
</state>
</provider>
</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">
<state relative-caret-position="18">
<caret line="28" column="20" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<state relative-caret-position="615">
<caret line="332" column="18" selection-start-line="332" selection-start-column="18" selection-end-line="332" selection-end-column="18" />
<folding>
<element signature="e#0#3796#0" expanded="true" />
<element signature="e#0#16478#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>

2
src/Calibrator.java

@ -26,7 +26,7 @@ class Calibrator {
this.active = false;
}
void toggle() {
void toggle() {
if (this.active) {
this.deactivate();
} else {

3
src/Camera.java

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

Loading…
Cancel
Save