Given a pair of rectified images from a stereo camera, the Stereo Disparity algorithm uses high-quality dense stereo matching to produce an output image of the same resolution as the input with left-right disparity information. This allows for inferring the depth of the scene captured by the left and right images.
Left image
Right image
Disparity map
Implementation
The stereo disparity estimator uses semi-global matching algorithm to compute the disparity. We deviate from the original algorithm by using as cost function the hamming distance of the census transforms of the stereo pair.
Usage
Initialization phase
Include the header that defines the needed functions and structures.
Hirschmüller, Heiko (2005). "Accurate and efficient stereo processing by semi-global matching and mutual information".
IEEE Conference on Computer Vision and Pattern Recognition. pp. 807–814.
Zabih, Ramin; Woodfill, John (1994). "Non-parametric local transforms for computing visual correspondence".
European conference on computer vision. pp. 151–158.