I am having a problem with my kinect patch. I’m designing a patch whereby i’m using the RGB from the kinect to track the coordinates of two different LEDs, this if fine for the X & Y but i need to track the Z axis. I have no idea how i can do this so any help would be very greatly received.
well that’s gonna be hard with just the RGB image… that’s what the depth map is for, no?
not that i can’t think of some ways, like relating the size of the tracked dots in pixels to distance, although that’s probably not gonna be very accurate at 640×480.
what you probably rather wanna do is combine the RGB and depth images, then do your color tracking and get the depth.
not entirely sure if it will work without more effort to superimpose RGB and depth correctly but you could try getting the Z from the depth map at the same XY coordinate as your dot is in the RGB image.
store the depth map in a jit.matrix
send message: getcell x y
where x and y are your coordinates
your z value comes out the right outlet in the format ‘cell x y val z’
(these really are jit.matrix basics)