ARToolKit is a freely available tool that tracks 'fiducials' like the hiro pattern on the block I'm holding. It reports a 3D position of the fiducial, and I have a laser pointer inside the block of wood with the fiducial on it. By finding the intersection of a line projected from the position of the fiducial and a line from the camera origin to where the laser dot is I can find the range from the camera of the spot where the dot is.

Sort of. It doesn't work that well yet, I have to keep the fiducial in nearly the same place or the depth values will contradict each other. And it is slow, and requires a high resolution camera to work well- a webcam won't be able to track the fiducial unless it takes up a lot more screen space.

The depth map seen at the end of the video is generated from 300 depth points interpolated (crudely).

hitl.washington.edu/artoolkit/

Music is Ice Cream Diet from Popsicle Theory:
8bitcollective.com/music/Popsicle+Theory/Ice+cream+diet+DEMO/

The source code to my app and the still image (imagemagick based) version of the artoolkit camera calibration tool is here:
code.google.com/p/binarymillenium/source/browse/trunk/artoolkit/

It's ugly and has a lot of parts specific to my environment, but it mostly works.

Additional writeup and screen shots:
binarymillenium.com/2008/10/depth-maps-with-artoolkit-and-laser.html

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…