Search code examples
opencvcomputer-visiongoogle-project-tango

Depth field by means of 'Stereo' instead of 'IR' functionality


I'm currently researching if a Tango device would be suitable for an application I am working on. What I need is a vision based depth field and am currently testing with OpenCV based (Disparity Map) stereo vision. Most of the depth sensing information I've read so far refers to the two 'IR' based technologies, structured light and time of flight. Specifically refereed to on these pages:

https://developers.google.com/tango/overview/depth-perception https://developers.google.com/tango/apis/c/c-depth-perception

Due to the limited distance and sensitivity to environmental influences of IR, I would need to use the 'Stereo' functionality. My question is in the C API where do you select which of these three modes? Is this in the TangoConfig? Do all 3 still return a TangoPointCloud?


Solution

  • While I don't have any specific information on the Tango device, the 'stereo' method of getting a dense disparity map (and from there a dense depth map) relies on having two RGB images taken from different positions.

    The high level version of this is that if you know the relative position and orientation of the camera(s) when the images were captured, and some internal properties of the camera, you can compute the relative offset of each point in one image from the corresponding point in the other image. (A good description is here https://www.robots.ox.ac.uk/~vgg/hzbook/hzbook2/HZepipolar.pdf)

    From this, you can compute a dense depth map.

    OpenCV does provide functions which support doing this (http://docs.opencv.org/trunk/dd/d53/tutorial_py_depthmap.html) but I don't know if the Tango device wraps these up nicely or whether you'd be expected to do your own motion tracking and image capture.