Ask Your Question

Revision history [back]

Hi Nishant,

You will be needing stereo images to find the distance.Calibrate your camera using OpenCV only. Get the intrinsic parameters which include the focal length and all. Create a disparity map using StereoBM or Stereo_SGBM, With the help of that depth map try to find the final distance.

click to hide/show revision 2
Added links for reference

Hi Nishant,

You will be needing stereo images to find the distance.Calibrate your camera using OpenCV only. Get the intrinsic parameters which include the focal length and all. Create a disparity map using StereoBM or Stereo_SGBM, With the help of that depth map try to find the final distance.

As requested these links might help you:

  1. http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

  2. http://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration

  3. http://www.jayrambhia.com/blog/stereo-calibration/

  4. http://blog.martinperis.com/2011/01/opencv-stereo-camera-calibration.html

  5. http://abhishek4273.wordpress.com/2014/07/09/playing-with-stereo-images-and-depth-map/

  6. http://abhishek4273.wordpress.com/2014/02/20/camera-calibration-using-opencv/