fixed bug with uninitialized variable in cvGetOptimalNewCameraMatrix (patch #1731 by floemker)

This commit is contained in:
Vadim Pisarevsky 2012-07-01 20:56:27 +00:00
parent 7ef2114107
commit e918877bcf

View File

@ -2608,7 +2608,7 @@ void cvGetOptimalNewCameraMatrix( const CvMat* cameraMatrix, const CvMat* distCo
if( validPixROI )
{
icvGetRectangles( cameraMatrix, distCoeffs, 0, newCameraMatrix, imgSize, inner, outer );
icvGetRectangles( cameraMatrix, distCoeffs, 0, &matM, imgSize, inner, outer );
cv::Rect r = inner;
r &= cv::Rect(0, 0, newImgSize.width, newImgSize.height);
*validPixROI = r;