Does stereoBM compute epilines, F and E (built-in)?

asked 2017-10-02 08:30:07 -0600

r@opencv gravatar image

I am a newbee. I am working on creating disparity maps from stereo images. When I was looking into the process I noticed that first we need to calibrate the cameras, find intrinsics and extrinsics to find the epilines so that we can restrict the block matching search to 1D along the epiline. When I checked the opencv method for block matching, I found that it doesn't require any of the parameters I mentioned above to restrict the correspondence search problem. I could find the depth map with just giving 2 input images but the output is not perfect though. My question is, where and how do we use the epilines, F, E and other parameters to reduce the correspondence search problem. When we use the stereoBM or stereoSGBM method to compute disparity map, the block matching method is done in the entire image or does it call the epiline construction method to reduce the search space? If not, how can stereo calibration and rectification have effect on stereoBM/stereoSGBM? Because even when I tried looking for the call tree for stereoBM in opencv I didn't get to find answer to my question.

Could anybody please help me clear this doubt?

edit retag flag offensive close merge delete



No, you have to undistort and rectify your images before, see these samples:

Eduardo gravatar imageEduardo ( 2017-10-02 09:58:09 -0600 )edit

what about the epilines then?

r@opencv gravatar imager@opencv ( 2017-10-03 07:31:32 -0600 )edit

The stereo rectification will transform the images where the right correspondence is in the same row. See for instance: Stereo Calibration & Rectification (ECEn631 14 - Calibration and Rectification)

Eduardo gravatar imageEduardo ( 2017-10-03 14:20:52 -0600 )edit