How to project a kinect position into a 3D-scene? RRS feed

  • Question

  • Hello everyone,

    I have a pretty specific problem and I don't know how to solve it. I hope you can help.

    I am currently working on a project that shows a stereoscopic 3d-scene with openGL. (I am talking about real 3D with viewed glasses etc.). The screen is a multitouch-surface. I can touch onto the screen and I am doing something like a mouse-projection to find the position within the openGL 3d-scene which is not too difficult since it is always on screen-surface, so depth-value of 0 (for the openGL-scene). And I can mark that touch position with a white dot. 

    Also I have a kinect camera working and I can track for example my hand.

    So now I would like to also find the position of my hand within the opengl-scene. I know how to do the projection the other way around. For example I can draw some random white dot (in front of the screen surface) then move my hand to that position and I can tell the kinect-coordinate-position.

    But the other way around seems very difficult to figure out, because the depth value of the openGL-scene is NOT distributed linear. The vertical and horizontal position on the screen is linear but the orthogonal position towards the screen is not.

    So this is my main problem. There are some known formulas like gluUnProject or gluProjet that can calculate almost everything I need except that depth-value that I don't know how to find out.

    Maybe there already exists some solution or there are any tutorials? I hope someone can help!

    Thanks a lot!

    Thursday, November 8, 2012 11:45 AM