Commit bed63cc7 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed the output disparity at the extreme cases (minDisparity or minDisparity +…

fixed the output disparity at the extreme cases (minDisparity or minDisparity + numOfDisp - 1). Thanks to Patrick Mihelich for the report (trac #395)
parent f668a230
...@@ -496,7 +496,7 @@ static void findStereoCorrespondenceBM_SSE2( const Mat& left, const Mat& right, ...@@ -496,7 +496,7 @@ static void findStereoCorrespondenceBM_SSE2( const Mat& left, const Mat& right,
dptr[y*dstep] = (short)(((ndisp - mind - 1 + mindisp)*256 + (d != 0 ? (p-n)*256/d : 0) + 15) >> 4); dptr[y*dstep] = (short)(((ndisp - mind - 1 + mindisp)*256 + (d != 0 ? (p-n)*256/d : 0) + 15) >> 4);
} }
else else
dptr[y*dstep] = (short)((ndisp - mind - 1)*16); dptr[y*dstep] = (short)((ndisp - mind - 1 + mindisp)*16);
costptr[y*coststep] = sad[mind]; costptr[y*coststep] = sad[mind];
} }
} }
......
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