Search code examples
python-3.xopencvstereo-3ddisparity-mapping

previous steps before to calculate disparity? Is rectification needed?


I want to do stereo vision and finally find the real distance to the objects from cameras. I have done image rectification.Now I want to calculate disparity. My question is, to do disparity, do I need to rectify images first? Thank you!


Solution

  • Yes, disparity needs rectified images. Since the stereo matching is done with epipolar lines, rectified images ensure that all the distortions are rectified and hence the algorithm can search blocks in a straight line. For a basic level you can try out StereoBM provided by openCV using the recitified stereo image pair.

    Raw frames from camera -> Rectification -> Disparity map -> Depth perception.

    This will be the pipeline for any passive stereo camera.