diff --git a/modules/calib3d/include/opencv2/calib3d/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d/calib3d.hpp index 42e1c6b67..ce265617e 100644 --- a/modules/calib3d/include/opencv2/calib3d/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d/calib3d.hpp @@ -488,8 +488,22 @@ CV_EXPORTS_W void solvePnPRansac( InputArray objectPoints, float reprojectionError = 8.0, int minInliersCount = 100, OutputArray inliers = noArray(), - int flags = ITERATIVE, - uint64 rng_seed = 0); + int flags = ITERATIVE); + +//! 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. CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints, diff --git a/modules/calib3d/src/solvepnp.cpp b/modules/calib3d/src/solvepnp.cpp index a5c67ba6c..2122eb7cd 100644 --- a/modules/calib3d/src/solvepnp.cpp +++ b/modules/calib3d/src/solvepnp.cpp @@ -303,7 +303,7 @@ 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, uint64 _rng_seed) + OutputArray _inliers, int flags, int _rng_seed) { Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat(); @@ -376,3 +376,14 @@ void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints, } 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); +}