From 04a4e51920aff79ff08cbf507bb587fc08b8a45a Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sat, 6 Aug 2011 19:28:20 +0000 Subject: [PATCH] fixed parallel block matching stereo correspondence algorithm (ticket #997; thanks to jbieger for the patch) --- modules/calib3d/src/stereobm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index d9a1cba..354e4fc 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -718,7 +718,7 @@ struct FindStereoCorrespInvoker uchar *ptr = state->slidingSumBuf->data.ptr + range.begin() * stripeBufSize; int FILTERED = (state->minDisparity - 1)*16; - Rect roi = validDisparityRect & Rect(0, _row0, cols, _row1); + Rect roi = validDisparityRect & Rect(0, _row0, cols, _row1 - _row0); if( roi.height == 0 ) return; int row0 = roi.y; -- 2.7.4