I have two images and I am trying to calculate the disparity between them using sum of squared distances and reconstruct disparity in 3D space. Do I need to rectify the image before calculating disparity?
The following are the steps that I have done so far for disparity map computation(I have tried with rectification and without rectification but both are returning all zeroes disparity matrix).
For each pixel in the left image X, Take the pixels in the same row in the right image. Separate the row in right image to windows. For each window, Calculate the disparity for each pixel in that window with X Select the pixel in the window which gives minimum SSD with X Find the pixel with minimum disparity among all windows as the best match to X
Am I doing it correctly?
How can I visualise the 3D reconstruction of the disparity as scatter plot in matlab?