Merge pull request #24648 from vrabaud:compilation

Fix stereoRectify image boundaries again.
This commit is contained in:
Alexander Smorkalov 2023-12-06 11:52:06 +03:00 committed by GitHub
commit 22edfd2628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2707,11 +2707,11 @@ void cvStereoRectify( const CvMat* _cameraMatrix1, const CvMat* _cameraMatrix2,
s0);
double s1 = std::min(std::min(std::min((double)cx1/(cx1_0 - outer1.x), (double)cy1/(cy1_0 - outer1.y)),
(double)(newImgSize.width - cx1)/(outer1.x + outer1.width - cx1_0)),
(double)(newImgSize.height - cy1)/(outer1.y + outer1.height - cy1_0));
(double)(newImgSize.width - 1 - cx1)/(outer1.x + outer1.width - cx1_0)),
(double)(newImgSize.height - 1 - cy1)/(outer1.y + outer1.height - cy1_0));
s1 = std::min(std::min(std::min(std::min((double)cx2/(cx2_0 - outer2.x), (double)cy2/(cy2_0 - outer2.y)),
(double)(newImgSize.width - cx2)/(outer2.x + outer2.width - cx2_0)),
(double)(newImgSize.height - cy2)/(outer2.y + outer2.height - cy2_0)),
(double)(newImgSize.width - 1 - cx2)/(outer2.x + outer2.width - cx2_0)),
(double)(newImgSize.height - 1 - cy2)/(outer2.y + outer2.height - cy2_0)),
s1);
s = s0*(1 - alpha) + s1*alpha;