Commit 7a715aa7 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

accept default distortion coefficients (Mat() ~ (0,0,0,0,0))

parent d6a32120
...@@ -3170,7 +3170,8 @@ void cv::projectPoints( const Mat& opoints, ...@@ -3170,7 +3170,8 @@ void cv::projectPoints( const Mat& opoints,
CvMat _objectPoints = opoints, _imagePoints = Mat(ipoints); CvMat _objectPoints = opoints, _imagePoints = Mat(ipoints);
CvMat _rvec = rvec, _tvec = tvec, _cameraMatrix = cameraMatrix, _distCoeffs = distCoeffs; CvMat _rvec = rvec, _tvec = tvec, _cameraMatrix = cameraMatrix, _distCoeffs = distCoeffs;
cvProjectPoints2( &_objectPoints, &_rvec, &_tvec, &_cameraMatrix, &_distCoeffs, cvProjectPoints2( &_objectPoints, &_rvec, &_tvec, &_cameraMatrix,
distCoeffs.data ? &_distCoeffs : 0,
&_imagePoints, 0, 0, 0, 0, 0, 0 ); &_imagePoints, 0, 0, 0, 0, 0, 0 );
} }
...@@ -3219,7 +3220,8 @@ void cv::solvePnP( const Mat& opoints, const Mat& ipoints, ...@@ -3219,7 +3220,8 @@ void cv::solvePnP( const Mat& opoints, const Mat& ipoints,
CvMat _cameraMatrix = cameraMatrix, _distCoeffs = distCoeffs; CvMat _cameraMatrix = cameraMatrix, _distCoeffs = distCoeffs;
CvMat _rvec = rvec, _tvec = tvec; CvMat _rvec = rvec, _tvec = tvec;
cvFindExtrinsicCameraParams2(&_objectPoints, &_imagePoints, &_cameraMatrix, cvFindExtrinsicCameraParams2(&_objectPoints, &_imagePoints, &_cameraMatrix,
&_distCoeffs, &_rvec, &_tvec, useExtrinsicGuess ); distCoeffs.data ? &_distCoeffs : 0,
&_rvec, &_tvec, useExtrinsicGuess );
} }
......
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