|
|
|
@ -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; |
|
|
|
|