45 image_match.feature_matches_.clear();
46 image_match.descriptor_indices1_.clear();
47 image_match.descriptor_indices2_.clear();
50 std::vector<Descriptor>& descriptors1 =
52 std::vector<Descriptor>& descriptors2 =
72 reverse_light_feature_matches);
74 light_feature_matches);
82 unsigned int num_features_out = light_feature_matches.size();
88 std::partial_sort(light_feature_matches.begin(),
89 light_feature_matches.begin() + num_features_out,
90 light_feature_matches.end(),
95 for (
int ii = 0; ii < num_features_out; ++ii) {
96 const auto& match = light_feature_matches[ii];
98 const Feature& matched_feature1 =
100 const Feature& matched_feature2 =
103 image_match.feature_matches_.emplace_back(matched_feature1,
107 image_match.descriptor_indices1_.push_back(match.feature_index1_);
108 image_match.descriptor_indices2_.push_back(match.feature_index2_);
virtual void SymmetricMatches(const std::vector< LightFeatureMatch > &feature_matches_lhs, std::vector< LightFeatureMatch > &feature_matches_rhs)
std::vector< std::vector< Feature > > image_features_
std::vector< LightFeatureMatch > LightFeatureMatchList
static DistanceMetric & Instance()
static bool SortByDistance(const LightFeatureMatch &lhs, const LightFeatureMatch &rhs)
void ComputePutativeMatches(const std::vector< Descriptor > &descriptors1, const std::vector< Descriptor > &descriptors2, std::vector< LightFeatureMatch > &putative_matches)
unsigned int num_best_matches
unsigned int min_num_feature_matches
std::vector< std::vector< Descriptor > > image_descriptors_
bool MaybeNormalizeDescriptors(std::vector< Descriptor > &descriptors) const
bool only_keep_best_matches
FeatureMatcherOptions options_
bool require_symmetric_matches