[Tutorial] How to use camera on Android with Processing IDE and Ketai
Welcome!! I’m going to show you how to use camera with Android + Processing + Ketai.
If everything is fine, let’s start.
Create a new Android project, and import the lib:
On the menu Android -> Sketch Permissions, select the Camera option.
Create the camera instance and configure your application in the setup():
I’m using landscape orientation and the image on the center of the screen. With the resolution 950x540, with 24 FPS. Now, you can code the onCameraPreviewEvent, to read camera data:
And finally, the draw() method, to draw the image on the screen:
That’s it, this application will take 24 pictures per second and show it on the screen.
That’s all, as you can see, Processing IDE is completely simple. Take a look in my blog, you can find more tutorial here. Thx for reading.