Parsing pixel color data from Kinect depth image
in
Contributed Library Questions
•
10 months ago
Hey all,
So I do have a working sketch that measures the pixel color from an X/Y plane. I am getting really large, 7 digit negative numbers coming in. I tried some basic match with abs, and some other functions but same results. Not sure what I am overlooking. a good push in the right direction is what I need. Cheers!
////////////////////////code below /////////////////////////////////////
- import org.openkinect.*;
- import org.openkinect.processing.*;
- Kinect kinect;
- boolean depth = true;
- float deg = 15; // Start at 15 degrees
- void setup() {
- size(800,600);
- kinect = new Kinect(this);
- kinect.start();
- kinect.enableDepth(depth);
- }
- void draw() {
- background(0);
- image(kinect.getDepthImage(),800,800);
- fill(255);
- kinect.enableDepth(depth);
- PImage img = kinect.getDepthImage();
- image(img,0,0);
- ///////check to see pixel color for depth //////////////////
- color c = get(mouseX, mouseY);
- fill(c);
- println(c);
- noStroke();
- rect(width/2, height/2, 50, 50);
- }
- ////////////////////////////////////////////////////////////
- void stop() {
- kinect.quit();
- super.stop();
- }
1