Is it possible to make this with webcam instead of kinect and how?

edited June 2016 in Kinect

// import library import SimpleOpenNI.*; // declare SimpleOpenNI object SimpleOpenNI context;

// PImage to hold incoming imagery PImage cam;

void setup() { // same as Kinect dimensions size(640, 480); // initialize SimpleOpenNI object context = new SimpleOpenNI(this); if (!context.enableScene()) { // if context.enableScene() returns false // then the Kinect is not working correctly // make sure the green light is blinking println("Kinect not connected!"); exit(); } else { // mirror the image to be more intuitive context.setMirror(true); } }

void draw() { // update the SimpleOpenNI object context.update(); // put the image into a PImage cam = context.sceneImage().get(); // display the image image(cam, 0, 0); }

Answers

Sign In or Register to comment.