Search code examples
opencvdictionarycorrelationdepthstereo-3d

Getting depth map from stereo pair?


Does anyone experience to get depth map from stereo pair? I wonder if are there any methods to get depth information without camera parameters. I am trying to get depth map from stereo pair


Solution

  • You cannot get accurate absolute depth information without accurate camera parameters. However, you can get some relative depth (correct ordering) without knowing the intrinsic parameters provided that you have some of the extrinsics (you need correct rotation matrices). Just fill in estimated values for the camera matrix. If the angle of view is off by too much, distant objects may be mapped to infinity, but it should work for close objects. Also, keep in mind that the usefulness of the result will depend on the amount of lens distortion you are ignoring. On cheap webcams with wide-angle lensens, it won't work properly says my gut feeling.

    There are stereo examples included in the OpenCV code.