import KinectPV2.*;
KinectPV2 kinect;
void setup() {
kinect = new KinectPV2(this);
//Start up methods go here
kinect.init();
}
PImage img;
void setup() {
size(512, 484);
kinect = new Kinect(this);
kinect.enableDepthImg(true);
kinect.init();
img = createImage(kinect.depthWidth, kinect.depthHeight, RGB);
}
void draw() {
background(0);
img.loadPixels();
int[] depth = kinect.getRawDepth();
for (int x = 0; x < kinect.depthWidth; x++) {
for (int y = 0; y < kinect.depthHeight; y++) {
int offset = x + y * kinect.depthWidth; // Calcola l'offset nell'array
int d = depth[offset]; // Ottiene il valore di profondità
img.pixels[offset] = color(255, 0, 150);
}
}
img.updatePixels();
image(img, 0, 0);
type or paste code here
hello, we are working at a project for school using postprocessing and kinect, the idea is to track the body or a part of it, for example hands, but we have clearly a lot of problems, we are following this tutorial (https://www.youtube.com/watch?v=6wviMtISsyc&t=6137s), but it is not working, the code is not running and i don’t know how to solve it. Any suggetsions? Reference? Idea?
By now the code is the following, it isn’t complete but it’s already not working. Mabye i’m missing the right library( i’m using kinect2)
As i already said my goal is to obtain a body traking for changing my visuals on processing