30 #ifndef IMAGE_UTIL_IMAGE_MATCHING_H_ 31 #define IMAGE_UTIL_IMAGE_MATCHING_H_ 35 #include <opencv2/core/core.hpp> 36 #include <opencv2/features2d/features2d.hpp> 56 const cv::Mat points2,
57 cv::Mat& fundamental_matrix,
60 double max_distance = 1.0,
61 double confidence = 0.99);
80 const cv::Mat points2,
81 cv::Mat& fundamental_matrix,
84 std::vector<uint32_t>& indices,
85 double max_distance = 1.0,
86 double confidence = 0.99);
101 const std::vector<cv::KeyPoint>& kp2,
102 const std::vector<cv::DMatch>& matches,
107 #endif // IMAGE_UTIL_IMAGE_MATCHING_H_ void GetFundamentalInliers(const cv::Mat points1, const cv::Mat points2, cv::Mat &fundamental_matrix, cv::Mat &inliers1, cv::Mat &inliers2, double max_distance=1.0, double confidence=0.99)
Computes the fundamental matrix for a set of matching points in two different images. The method also returns the inlier keypoints for both frames.
void ConvertMatches(const std::vector< cv::KeyPoint > &kp1, const std::vector< cv::KeyPoint > &kp2, const std::vector< cv::DMatch > &matches, cv::Mat &kp1_out, cv::Mat &kp2_out)
Converts keypoints and matches into two cv::Mats in which the the matching keypoints from kp1 and kp2...