Unverified Commit 678d383f authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #9844 from opalmirror:fix_stereobm_mindisp_truncation_24

fix StereoBM disparity map right margin truncation when minDisparities > 0
parents e15a56d1 7d811077
...@@ -864,10 +864,10 @@ Rect getValidDisparityROI( Rect roi1, Rect roi2, ...@@ -864,10 +864,10 @@ Rect getValidDisparityROI( Rect roi1, Rect roi2,
int SADWindowSize ) int SADWindowSize )
{ {
int SW2 = SADWindowSize/2; int SW2 = SADWindowSize/2;
int minD = minDisparity, maxD = minDisparity + numberOfDisparities - 1; int maxD = minDisparity + numberOfDisparities - 1;
int xmin = max(roi1.x, roi2.x + maxD) + SW2; int xmin = max(roi1.x, roi2.x + maxD) + SW2;
int xmax = min(roi1.x + roi1.width, roi2.x + roi2.width - minD) - SW2; int xmax = min(roi1.x + roi1.width, roi2.x + roi2.width) - SW2;
int ymin = max(roi1.y, roi2.y) + SW2; int ymin = max(roi1.y, roi2.y) + SW2;
int ymax = min(roi1.y + roi1.height, roi2.y + roi2.height) - SW2; int ymax = min(roi1.y + roi1.height, roi2.y + roi2.height) - SW2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment