|
|
|
@ -403,7 +403,8 @@ protected: |
|
|
|
|
|
|
|
|
|
// Input should be a vector of n 2D points or a Nx2 matrix
|
|
|
|
|
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArray _cameraMatrix, |
|
|
|
|
int method, double prob, double threshold, OutputArray _mask) |
|
|
|
|
int method, double prob, double threshold, |
|
|
|
|
int maxIters, OutputArray _mask) |
|
|
|
|
{ |
|
|
|
|
CV_INSTRUMENT_REGION(); |
|
|
|
|
|
|
|
|
@ -442,20 +443,36 @@ cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArr |
|
|
|
|
|
|
|
|
|
Mat E; |
|
|
|
|
if( method == RANSAC ) |
|
|
|
|
createRANSACPointSetRegistrator(makePtr<EMEstimatorCallback>(), 5, threshold, prob)->run(points1, points2, E, _mask); |
|
|
|
|
createRANSACPointSetRegistrator(makePtr<EMEstimatorCallback>(), 5, threshold, prob, maxIters)->run(points1, points2, E, _mask); |
|
|
|
|
else |
|
|
|
|
createLMeDSPointSetRegistrator(makePtr<EMEstimatorCallback>(), 5, prob)->run(points1, points2, E, _mask); |
|
|
|
|
createLMeDSPointSetRegistrator(makePtr<EMEstimatorCallback>(), 5, prob, maxIters)->run(points1, points2, E, _mask); |
|
|
|
|
|
|
|
|
|
return E; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArray _cameraMatrix, |
|
|
|
|
int method, double prob, double threshold, |
|
|
|
|
OutputArray _mask) |
|
|
|
|
{ |
|
|
|
|
return cv::findEssentialMat(_points1, _points2, _cameraMatrix, method, prob, threshold, 1000, _mask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, double focal, Point2d pp, |
|
|
|
|
int method, double prob, double threshold, int maxIters, OutputArray _mask) |
|
|
|
|
{ |
|
|
|
|
CV_INSTRUMENT_REGION(); |
|
|
|
|
|
|
|
|
|
Mat cameraMatrix = (Mat_<double>(3,3) << focal, 0, pp.x, 0, focal, pp.y, 0, 0, 1); |
|
|
|
|
return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, maxIters, _mask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, double focal, Point2d pp, |
|
|
|
|
int method, double prob, double threshold, OutputArray _mask) |
|
|
|
|
{ |
|
|
|
|
CV_INSTRUMENT_REGION(); |
|
|
|
|
|
|
|
|
|
Mat cameraMatrix = (Mat_<double>(3,3) << focal, 0, pp.x, 0, focal, pp.y, 0, 0, 1); |
|
|
|
|
return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, _mask); |
|
|
|
|
return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, 1000, _mask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, |
|
|
|
|