We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I am a processing beginner and tried to run this example below:
import processing.video.*;
Capture cam;
void setup() {
size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) {
println("There are no cameras available for capture.");
exit();
} else {
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}
// The camera can be initialized directly using an
// element from the array returned by list():
cam = new Capture(this, cameras[0]);
cam.start();
}
}
void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
// The following does the same, and is faster when just drawing the image
// without any additional resizing, transformations, or tint.
//set(0, 0, cam);
}
However, I got an error message that says there is no capture device detected.
I have my Kinect on PC, but it seems like Processing does not recognize Kinect as an webcam.
How can I make it recognize Kinect as webcam?
Answers
This link has some info. http://shiffman.net/p5/kinect/
I believe you need to import the Kinect library to your sketch before you can access any part of it.