cache image
This commit is contained in:
parent
cc711c6343
commit
c27394c4a1
3 changed files with 35 additions and 35 deletions
|
|
@ -26,7 +26,7 @@ class Calibrator {
|
|||
this.active = false;
|
||||
}
|
||||
|
||||
void toggle() {
|
||||
void toggle() {
|
||||
if (this.active) {
|
||||
this.deactivate();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -33,13 +33,14 @@ class Camera {
|
|||
|
||||
if (newImageAvailable) {
|
||||
cam.read();
|
||||
latestImage = cam;
|
||||
}
|
||||
|
||||
return newImageAvailable;
|
||||
}
|
||||
|
||||
PImage getImage() {
|
||||
return cam;
|
||||
return latestImage;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue