28 #ifndef UTIL3D_MOTION_ESTIMATION_H_ 29 #define UTIL3D_MOTION_ESTIMATION_H_ 43 const std::map<int, cv::Point3f> & words3A,
44 const std::map<int, cv::KeyPoint> & words2B,
45 const CameraModel & cameraModel,
48 double reprojError = 5.,
50 int pnpRefineIterations = 1,
51 float maxVariance = 0,
53 const std::map<int, cv::Point3f> & words3B = std::map<int, cv::Point3f>(),
54 cv::Mat * covariance = 0,
55 std::vector<int> * matchesOut = 0,
56 std::vector<int> * inliersOut = 0);
59 const std::map<int, cv::Point3f> & words3A,
60 const std::map<int, cv::KeyPoint> & words2B,
61 const std::vector<CameraModel> & cameraModels,
64 double reprojError = 5.,
66 int pnpRefineIterations = 1,
67 float maxVariance = 0,
69 const std::map<int, cv::Point3f> & words3B = std::map<int, cv::Point3f>(),
70 cv::Mat * covariance = 0,
71 std::vector<int> * matchesOut = 0,
72 std::vector<int> * inliersOut = 0);
75 const std::map<int, cv::Point3f> & words3A,
76 const std::map<int, cv::Point3f> & words3B,
78 double inliersDistance = 0.1,
80 int refineIterations = 5,
81 cv::Mat * covariance = 0,
82 std::vector<int> * matchesOut = 0,
83 std::vector<int> * inliersOut = 0);
86 const std::vector<cv::Point3f> & objectPoints,
87 const std::vector<cv::Point2f> & imagePoints,
88 const cv::Mat & cameraMatrix,
89 const cv::Mat & distCoeffs,
92 bool useExtrinsicGuess,
94 float reprojectionError,
96 std::vector<int> & inliers,
98 int refineIterations = 1,
99 float refineSigma = 3.0f);
Transform RTABMAP_EXP estimateMotion3DTo2D(const std::map< int, cv::Point3f > &words3A, const std::map< int, cv::KeyPoint > &words2B, const CameraModel &cameraModel, int minInliers=10, int iterations=100, double reprojError=5., int flagsPnP=0, int pnpRefineIterations=1, float maxVariance=0, const Transform &guess=Transform::getIdentity(), const std::map< int, cv::Point3f > &words3B=std::map< int, cv::Point3f >(), cv::Mat *covariance=0, std::vector< int > *matchesOut=0, std::vector< int > *inliersOut=0)
Transform RTABMAP_EXP estimateMotion3DTo3D(const std::map< int, cv::Point3f > &words3A, const std::map< int, cv::Point3f > &words3B, int minInliers=10, double inliersDistance=0.1, int iterations=100, int refineIterations=5, cv::Mat *covariance=0, std::vector< int > *matchesOut=0, std::vector< int > *inliersOut=0)
void RTABMAP_EXP solvePnPRansac(const std::vector< cv::Point3f > &objectPoints, const std::vector< cv::Point2f > &imagePoints, const cv::Mat &cameraMatrix, const cv::Mat &distCoeffs, cv::Mat &rvec, cv::Mat &tvec, bool useExtrinsicGuess, int iterationsCount, float reprojectionError, int minInliersCount, std::vector< int > &inliers, int flags, int refineIterations=1, float refineSigma=3.0f)