How to implement StereoSGBM to get a disparity map?
I am using opencv 3.2.0 and visual studio 2017. I have tried to get a disparity map with StereoSGBM. My code is below. This is not working. What is going wrong? How to use the StereoSGBM??
" But it didn't work, please let me know what is wrong" what does it mean?
I modified my question. :D I am Sorry. My English is not good.
StereoSGBM can process color images. You don't need cvtColor. tsul and and tsur must be rectified images. you need a waitKey before return 0 if you want to see images. You have an example here and some tutorials about calibration here
your code is for opencv2.4, not for opencv3.2. (the api has changed a bit)
can you try again with the 3.2 stereo_match sample ?
Thank you for the answers!