Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libraries to get depth map from stereo images? [closed]

I'm going to set up some devices to perform real-time 3D motion tracking. My first idea to do so is to use a pair of cameras to take stereo image and calculate the depth map to get the 3D data I needed.

Are there any good open source libraries (C/C++) available and is fast enough for real-time(~12-24fps)? I've found 3D Reconstruction using Stereo Vision and EStereo in SourceForge, have anyone tried them?

Or any algorithm suggestion that I can implement?

like image 772
Andy Li Avatar asked Sep 10 '09 21:09

Andy Li


People also ask

How do you find the depth of an image?

How do we estimate depth? Our eyes estimate depth by comparing the image obtained by our left and right eye. The minor displacement between both viewpoints is enough to calculate an approximate depth map. We call the pair of images obtained by our eyes a stereo pair.

How do I get a disparity map?

Given a pair of stereo images, to compute the disparity map, we first match every pixel in the left image with its corresponding pixel in the right image. Then we compute the distance for each pair of matching pixels. Finally, the disparity map is obtained by representing such distance values as an intensity image.

What is disparity OpenCV?

disparity = x - x' = \frac{Bf}{Z} x and x' are the distance between points in image plane corresponding to the scene point 3D and their camera center. B is the distance between two cameras (which we know) and f is the focal length of camera (already known).


2 Answers

Before you start, consider the fact that stereo vision is not just a software problem. The calibration of your pair of camera's is critically important to the accuracy of your depth map. For best results you want two identical camera's pointed exactly parallel, with exactly the same lenses on both cameras, with the CCD's of the camera's lying on one plane in 3D space. This is very difficult to achieve with just any random pair of camera's. Especially if they come from the cheaper segment.

If all you're interested in is using the 3D depth map for 3D motion tracking then there are precalibrated stereo camera's you can buy that typically come with software that allows you to extract the 3D map directly. I've had good experience with the Bumblebee camera from Point Grey Research but probably there are other good systems as well. This will allow you to concentrate on the 3D tracking. Otherwise just getting a usable depth map from a camera pair will eat up a lot of your time.

like image 180
jilles de wit Avatar answered Sep 30 '22 14:09

jilles de wit


Opencv has a whole section on this, see chapter 12 of Learning Opencv

like image 24
Martin Beckett Avatar answered Sep 30 '22 14:09

Martin Beckett