We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, again. I've got this working Processing sketch just to test the camera:
/** ||******************************
** ||
** ||
** ||
** ||*****************************/
import processing.video.*;
Capture video;
int x, y;
void setup()
{
size(640, 480);
//
x = width;
y = height;
//
video = new Capture(this, Capture.list()[5]);
video.start();
//
background(0);
}
/******************************************************/
void captureEvent(Capture video)
{
video.read();
}
/******************************************************/
void draw()
{
//
video.loadPixels();
image(video, 0, 0, x, y);
}
What am trying to do is, to load that sketch to an Android Studio app. Loading an sketch comes easy for me, they work. But with this one since to not be the case. I also tried this example: https://github.com/omerjerk/processing-video-android
And the experiment results in failure.
So, what would be the correct way of loading a Processing sketch using capture in Android.
Answers
@SAFR=== as for android mode use ketai lib && cameraGettingStarted example; or use camera API for android.
http://ketai.org/examples/cameragettingstarted/
Install ketai through Processing >> adding library. You will also need to install android mode which in turn, requires access do the directory for the AndroidSDK.
There are also some sample work and small sketches in the android section of this forum. Search for keywords ike: https://forum.processing.org/two/search?Search=cameraGettingStarted
Kf