From: look4pritam Date: Mon, 16 Sep 2013 08:09:11 +0000 (+0530) Subject: The thin prism distortion coefficient related small bug is fixed. X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~3761^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a430abd02eaf38e0d42f075acbb47210c2b191c8;p=platform%2Fupstream%2Fopencv.git The thin prism distortion coefficient related small bug is fixed. --- diff --git a/modules/calib3d/src/calibration.cpp b/modules/calib3d/src/calibration.cpp index ff5e425..893c0e9 100644 --- a/modules/calib3d/src/calibration.cpp +++ b/modules/calib3d/src/calibration.cpp @@ -1403,6 +1403,8 @@ CV_IMPL double cvCalibrateCamera2( const CvMat* objectPoints, } if( !(flags & CV_CALIB_RATIONAL_MODEL) ) flags |= CV_CALIB_FIX_K4 + CV_CALIB_FIX_K5 + CV_CALIB_FIX_K6; + if( !(flags & CV_CALIB_THIN_PRISM_MODEL)) + flags |= CALIB_FIX_S1_S2_S3_S4; if( flags & CV_CALIB_FIX_K1 ) mask[4] = 0; if( flags & CV_CALIB_FIX_K2 ) @@ -1415,8 +1417,6 @@ CV_IMPL double cvCalibrateCamera2( const CvMat* objectPoints, mask[10] = 0; if( flags & CV_CALIB_FIX_K6 ) mask[11] = 0; - if(!(flags & CV_CALIB_THIN_PRISM_MODEL)) - flags |= CALIB_FIX_S1_S2_S3_S4; if(flags & CALIB_FIX_S1_S2_S3_S4) { @@ -3026,6 +3026,7 @@ static Mat prepareDistCoeffs(Mat& distCoeffs0, int rtype) if( distCoeffs0.size() == Size(1, 4) || distCoeffs0.size() == Size(1, 5) || distCoeffs0.size() == Size(1, 8) || + distCoeffs0.size() == Size(1, 12) || distCoeffs0.size() == Size(4, 1) || distCoeffs0.size() == Size(5, 1) || distCoeffs0.size() == Size(8, 1) ||