using block matching and dynamic programming to generate disparity maps from stereo images.
having 2 parallel stereo image we can deduce the depth from disparity. we can compute the depth using this equation depth = (baseline * focal length) / disparity)
using epipolar line, we match point X in 3D located in left image to the same point X right image and then calculate the disparity from the displacement between them as illustrated bellow.
here we can see two stereo images
block matching (left) dynamic programming (right)