Here's a sketch I'm trying to run, pretty similar to the CameraGettingStarted sketch by Ketai:
import ketai.camera.*;
color chosenColor;
KetaiCamera cam;
void setup () {
orientation(PORTRAIT);
size(displayWidth, displayHeight);
imageMode(CENTER);
cam = new KetaiCamera(this, width, height, 24);
}
void draw () {
image(cam, width/2, height/2);
}
void onCameraPreviewEvent () {
cam.read();
}
void mousePressed () {
if(cam.isStarted()) {
cam.stop();
}
else {
cam.start();
}
}
For whatever reason, the CameraGettingStarted sketch requests access to the camera and works perfectly. This sketch does not. What am I doing wrong?