3D points for certain depth map pixels

3D points for certain depth map pixels

Hi!

Suppose I would do some sort of activity recognition on the depth map produced by my kinect, which would result in identified foreground and background pixels.
If I now wanted to know to which 3D points my foreground pixels relate to, how would I do that? I need some way of calculating the 3D points for certain pixels of the depth map...