overload instead of default arg for ABI backwards compatibility. rng_seed is now 'int' to support python port

This commit is contained in:
Vijay Pradeep 2015-01-09 10:17:18 -08:00
parent a1c5740044
commit 177478a8ad
2 changed files with 28 additions and 3 deletions

View File

@ -488,8 +488,22 @@ CV_EXPORTS_W void solvePnPRansac( InputArray objectPoints,
float reprojectionError = 8.0, float reprojectionError = 8.0,
int minInliersCount = 100, int minInliersCount = 100,
OutputArray inliers = noArray(), OutputArray inliers = noArray(),
int flags = ITERATIVE, int flags = ITERATIVE);
uint64 rng_seed = 0);
//! computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible.
CV_EXPORTS_W void solvePnPRansac( InputArray objectPoints,
InputArray imagePoints,
InputArray cameraMatrix,
InputArray distCoeffs,
OutputArray rvec,
OutputArray tvec,
bool useExtrinsicGuess,
int iterationsCount,
float reprojectionError,
int minInliersCount,
OutputArray inliers,
int flags,
int rng_seed);
//! initializes camera matrix from a few 3D points and the corresponding projections. //! initializes camera matrix from a few 3D points and the corresponding projections.
CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints, CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints,

View File

@ -303,7 +303,7 @@ void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess, OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess,
int iterationsCount, float reprojectionError, int minInliersCount, int iterationsCount, float reprojectionError, int minInliersCount,
OutputArray _inliers, int flags, uint64 _rng_seed) OutputArray _inliers, int flags, int _rng_seed)
{ {
Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat();
Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat(); Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat();
@ -376,3 +376,14 @@ void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
} }
return; return;
} }
void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess,
int iterationsCount, float reprojectionError, int minInliersCount,
OutputArray _inliers, int flags)
{
solvePnPRansac(_opoints, _ipoints, _cameraMatrix, _distCoeffs,
_rvec, _tvec, useExtrinsicGuess, iterationsCount,
reprojectionError, minInliersCount, _inliers, flags, 0);
}