ofTheo / ofxKinect

legacy openFrameworks wrapper for the xbox kinect (OF pre-0.8.0+ only) - ofxKinect is now included and is being maintained in OF releases
MIT License
540 stars 105 forks source link

getColorAt with IR image #49

Closed yhancik closed 13 years ago

yhancik commented 13 years ago

getColorAt doesn't work properly with the IR image

I haven't figured out yet how to suggest a change in a proper Git fashion.. but this works for me :

int index = (y * width + x) * bytespp;
ofColor c;
c.r = videoPixels[index + 0];
c.g = videoPixels[index + (bytespp-1)/2];
c.b = videoPixels[index + (bytespp-1)];
c.a = 255;

return c;
yhancik commented 13 years ago

Oops, sorry for the duplicate... I hope I got the pull request right

danomatika commented 13 years ago

Yeah the pull request worked fine, already merged. Thanks.