From c27394c4a13e400e5d8c72eb320e96af1715326f Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 10 Jul 2016 05:26:55 -0700 Subject: [PATCH] cache image --- .idea/workspace.xml | 65 ++++++++++++++++++++++----------------------- src/Calibrator.java | 2 +- src/Camera.java | 3 ++- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0f74840..4b7d33b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,8 @@ - + + @@ -26,8 +27,8 @@ - - + + @@ -93,15 +94,14 @@ - + - - + + - - + @@ -119,13 +119,13 @@ - + - - + + - + @@ -156,7 +156,6 @@ @@ -350,7 +350,7 @@ - + @@ -645,17 +645,6 @@ - - - - - - - - - - - @@ -664,6 +653,16 @@ + + + + + + + + + + @@ -676,22 +675,22 @@ - - + + - - + - + - - + + - + + diff --git a/src/Calibrator.java b/src/Calibrator.java index c2007d5..4d90895 100644 --- a/src/Calibrator.java +++ b/src/Calibrator.java @@ -26,7 +26,7 @@ class Calibrator { this.active = false; } - void toggle() { + void toggle() { if (this.active) { this.deactivate(); } else { diff --git a/src/Camera.java b/src/Camera.java index 9b6b026..c3dfbd0 100644 --- a/src/Camera.java +++ b/src/Camera.java @@ -33,13 +33,14 @@ class Camera { if (newImageAvailable) { cam.read(); + latestImage = cam; } return newImageAvailable; } PImage getImage() { - return cam; + return latestImage; } }