diff --git a/modules/calib3d/include/opencv2/calib3d/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d/calib3d.hpp index 47a4e124afb4672f4440767973dfa04639123710..4a394f0fded5b375f4666cff0fd6620e72d2f000 100644 --- a/modules/calib3d/include/opencv2/calib3d/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d/calib3d.hpp @@ -442,10 +442,13 @@ enum }; //! computes the best-fit perspective transformation mapping srcPoints to dstPoints. -CV_EXPORTS_W Mat findHomography( const InputArray& srcPoints, - const InputArray& dstPoints, +CV_EXPORTS_W Mat findHomography( const InputArray& srcPoints, const InputArray& dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray mask=OutputArray()); + +//! variant of findHomography for backward compatibility +CV_EXPORTS Mat findHomography( const InputArray& srcPoints, const InputArray& dstPoints, + OutputArray mask, int method=0, double ransacReprojThreshold=3); //! Computes RQ decomposition of 3x3 matrix CV_EXPORTS_W Vec3d RQDecomp3x3( const InputArray& src, OutputArray mtxR, OutputArray mtxQ, @@ -640,6 +643,11 @@ CV_EXPORTS_W Mat findFundamentalMat( const InputArray& points1, const InputArray double param1=3., double param2=0.99, OutputArray mask=OutputArray()); +//! variant of findFundamentalMat for backward compatibility +CV_EXPORTS Mat findFundamentalMat( const InputArray& points1, const InputArray& points2, + OutputArray mask, int method=FM_RANSAC, + double param1=3., double param2=0.99); + //! finds coordinates of epipolar lines corresponding the specified points CV_EXPORTS void computeCorrespondEpilines( const InputArray& points1, int whichImage, const InputArray& F, diff --git a/modules/calib3d/src/fundam.cpp b/modules/calib3d/src/fundam.cpp index fab93bf60aae949394576ed2d1d88a540f87fcbf..98b3b66edef62d440c9d78e9649bf36b72723fd9 100644 --- a/modules/calib3d/src/fundam.cpp +++ b/modules/calib3d/src/fundam.cpp @@ -1065,7 +1065,13 @@ cv::Mat cv::findHomography( const InputArray& _points1, const InputArray& _point H = Scalar(0); return H; } - + +cv::Mat cv::findHomography( const InputArray& _points1, const InputArray& _points2, + OutputArray _mask, int method, double ransacReprojThreshold ) +{ + return cv::findHomography(_points1, _points2, method, ransacReprojThreshold, _mask); +} + cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _points2, int method, double param1, double param2, OutputArray _mask ) @@ -1089,6 +1095,13 @@ cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _p return F; } +cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _points2, + OutputArray _mask, int method, double param1, double param2 ) +{ + return cv::findFundamentalMat(_points1, _points2, method, param1, param2, _mask); +} + + void cv::computeCorrespondEpilines( const InputArray& _points, int whichImage, const InputArray& _Fmat, OutputArray _lines ) {