Run Processing Camera sketch on Android

edited November 2016 in Android Mode

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

Sign In or Register to comment.