We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, currently working on a camera app. in Android mode i'm new in processing. i dont know if my filter code is wrong, as i got it from the internet. the result i got is just showing without any filter.
i'm currently using this example code provided by ketai library, how can i combine with with the filter :
import ketai.camera.*;
KetaiCamera cam;
void setup() {
orientation(LANDSCAPE);
imageMode(CENTER);
cam = new KetaiCamera(this, 320, 240, 24);
cam.filter(THRESHOLD);
}
void draw() {
image(cam, width/2, height/2, width, height);
}
void onCameraPreviewEvent()
{
cam.read();
}
void mousePressed()
{
if (cam.isStarted())
{
cam.stop();
}
else
cam.start();
}
void keyPressed() {
if (key == CODED) {
if (keyCode == MENU) {
if (cam.isFlashEnabled())
cam.disableFlash();
else
cam.enableFlash();
}
}
}
Answers
sorry i didn't know how to put it in coding form, please copy and paste then (Ctrl+T) thanks
Highlight your posted code and hit CTRL+K to format it here!
thanks! So might u know how to solve this problem?
erase the "cam.filter(THRESHOLD);" in the void setup
and put the filter after the image() in the void draw
thanks it work out great!