18 #ifndef PIC_FEATURES_MATCHING_FEATURE_MATCHER 19 #define PIC_FEATURES_MATCHING_FEATURE_MATCHER 23 #ifndef PIC_DISABLE_EIGEN 25 #ifndef PIC_EIGEN_NOT_BUNDLED 26 #include "../externals/Eigen/Dense" 28 #include <Eigen/Dense> 75 virtual bool getMatch(T *desc,
int &matched_j, T &dist_1)
80 #ifndef PIC_DISABLE_EIGEN 81 void getAllMatches(std::vector<unsigned int *> &descs0, std::vector< Eigen::Vector3i > &matches)
85 for(
unsigned int i = 0; i< descs0.size(); i++) {
89 if(
getMatch(descs0.at(i), matched_j, dist_1)) {
90 matches.push_back(Eigen::Vector3i(i, matched_j, dist_1));
104 std::vector< Eigen::Vector2f > &c1,
105 std::vector< Eigen::Vector3i > &matches,
106 std::vector< Eigen::Vector2f > &p0,
107 std::vector< Eigen::Vector2f > &p1)
112 for(
size_t i = 0; i < matches.size(); i++) {
113 int I0 = matches[i][0];
114 int I1 = matches[i][1];
116 Eigen::Vector2f x = c0.at(I0);
117 Eigen::Vector2f y = c1.at(I1);
123 printf(
"I1: %d (%d %d) -- I2: %d (%d %d) -- Score: %d\n",
124 I0,
int(x[0]),
int(x[1]), I1,
int(y[0]),
int(y[1]), matches[i][2]);
134 #endif // PIC_FEATURES_MATCHING_FEATURE_MATCHER The FeatureMatcher class.
Definition: feature_matcher.hpp:39
std::vector< T * > * descs
Definition: feature_matcher.hpp:42
virtual bool getMatch(T *desc, int &matched_j, T &dist_1)
getMatch
Definition: feature_matcher.hpp:75
void getAllMatches(std::vector< unsigned int *> &descs0, std::vector< Eigen::Vector3i > &matches)
Definition: feature_matcher.hpp:81
static void filterMatches(std::vector< Eigen::Vector2f > &c0, std::vector< Eigen::Vector2f > &c1, std::vector< Eigen::Vector3i > &matches, std::vector< Eigen::Vector2f > &p0, std::vector< Eigen::Vector2f > &p1)
filterMatches
Definition: feature_matcher.hpp:103
Definition: bilateral_separation.hpp:25
T desc_size
Definition: feature_matcher.hpp:43
void update(std::vector< T *> *descs, T desc_size)
update
Definition: feature_matcher.hpp:62
FeatureMatcher(std::vector< T *> *descs, T desc_size)
FeatureMatcher.
Definition: feature_matcher.hpp:52