ketai video question
in
Android Processing
•
1 year ago
I am running this code on the Galaxy Tab 2. It shows an image, but I would like a live video and the image stops updating after a second. If anyone can see something obvious that I'm missing I'd be much obliged.
- import ketai.camera.*;
KetaiCamera cam;
void setup() {
orientation(LANDSCAPE);
cam = new KetaiCamera(this, 320, 240, 24);
// int camnum = cam.getNumberOfCameras();
cam.setCameraID(1);// changes the camera to the front.
cam.start();
}
void draw() {
}
void onCameraPreviewEvent()
{
cam.read();
cam.loadPixels();
image(cam, 0, 0, 320, 240); // Draw the webcam video onto the screen
println("previewing");
}
void exit() {
cam.stop();
}
1