Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I provide custom disparity search range in StereoSGBM for each pixel?

Hello, I am computing disparity in OpenCV using StereoSGBM algorithm. Among various parameters which we need to provide, one parameter is minD and maxD, which signifies the disparity range along epipolar line where our algorithm needs to search for a potential match. I have custom minimum and maximim disparity values for each pixel of the image. Meaning, llet's say the pixel of consideration has co-ordinates (10. 10). And I know that the maximum possible disparity could not be more than 16. I will search only upto (26,10) in corresponding right image. Similary, I have custom minimum and maximum disparity values for each pixel of the image. So How do I provide such custom disparity search range? I tried to dig into SGBM code of OpenCV and found the for loop where disparity search is being carried out. However I am unable to understand what changes need to be made in original code to get such behavior. Any help regarding this would be highly appreciated. Thank you in advance.

click to hide/show revision 2
retagged

How do I provide custom disparity search range in StereoSGBM for each pixel?

Hello, I am computing disparity in OpenCV using StereoSGBM algorithm. Among various parameters which we need to provide, one parameter is minD and maxD, which signifies the disparity range along epipolar line where our algorithm needs to search for a potential match. I have custom minimum and maximim disparity values for each pixel of the image. Meaning, llet's say the pixel of consideration has co-ordinates (10. 10). And I know that the maximum possible disparity could not be more than 16. I will search only upto (26,10) in corresponding right image. Similary, I have custom minimum and maximum disparity values for each pixel of the image. So How do I provide such custom disparity search range? I tried to dig into SGBM code of OpenCV and found the for loop where disparity search is being carried out. However I am unable to understand what changes need to be made in original code to get such behavior. Any help regarding this would be highly appreciated. Thank you in advance.