Go to the documentation of this file. 1 #ifndef AFEATUREMATCHER_H
2 #define AFEATUREMATCHER_H
14 typedef std::unordered_map<std::shared_ptr<AFeature>, std::vector<std::shared_ptr<AFeature>>>
vec_feat_matches;
43 virtual uint
match(std::vector<std::shared_ptr<AFeature>> &features1,
44 std::vector<std::shared_ptr<AFeature>> &features2,
45 std::vector<std::shared_ptr<AFeature>> &features_init,
48 int searchAreaWidth = 51,
49 int searchAreaHeight = 51);
60 virtual uint
ldmk_match(std::shared_ptr<ImageSensor> &sensor1,
61 std::vector<std::shared_ptr<ALandmark>> &ldmks,
62 int searchAreaWidth = 51,
63 int searchAreaHeight = 51);
80 const std::vector<std::shared_ptr<AFeature>> &features2,
81 const std::vector<std::shared_ptr<AFeature>> &features_init,
82 const uint &searchAreaWidth,
83 const uint &searchAreaHeight,
110 #endif // AFEATUREMATCHER_H
double _first_second_match_score_ratio
ratio between the first and second best match score to consider a match valid
Definition: afeaturematcher.h:104
virtual uint match(std::vector< std::shared_ptr< AFeature >> &features1, std::vector< std::shared_ptr< AFeature >> &features2, std::vector< std::shared_ptr< AFeature >> &features_init, vec_match &matches, vec_match &matches_with_ldmks, int searchAreaWidth=51, int searchAreaHeight=51)
Match features between two sets of features.
Definition: afeaturematcher.cpp:111
std::string _feature_label
label for the features being matched
Definition: afeaturematcher.h:106
Class for matching features between two sets of features.
Definition: afeaturematcher.h:25
std::vector< feature_pair > vec_match
A vector of feature pairs i.e. matches.
Definition: typedefs.h:24
Definition: AFeature2D.h:8
vec_match filterMatches(vec_feat_matches &matches12, vec_feat_matches &matches21, vec_feat_matches_scores &all_scores12, vec_feat_matches_scores &all_scores21)
Filter matches based on the first and second best match scores.
Definition: afeaturematcher.cpp:63
AFeatureMatcher()
Definition: afeaturematcher.h:27
std::unordered_map< std::shared_ptr< AFeature >, std::vector< std::shared_ptr< AFeature > > > vec_feat_matches
Unordered map to store matches between two feature lists.
Definition: afeaturematcher.h:14
AFeatureMatcher(std::shared_ptr< AFeatureDetector > detector)
Definition: afeaturematcher.h:28
std::shared_ptr< AFeatureDetector > _detector
feature detector for distance measurement
Definition: afeaturematcher.h:103
virtual void getPossibleMatchesBetween(const std::vector< std::shared_ptr< AFeature >> &features1, const std::vector< std::shared_ptr< AFeature >> &features2, const std::vector< std::shared_ptr< AFeature >> &features_init, const uint &searchAreaWidth, const uint &searchAreaHeight, vec_feat_matches &matches, vec_feat_matches_scores &all_scores)
Get possible matches between two sets of features.
Definition: afeaturematcher.cpp:6
virtual uint ldmk_match(std::shared_ptr< ImageSensor > &sensor1, std::vector< std::shared_ptr< ALandmark >> &ldmks, int searchAreaWidth=51, int searchAreaHeight=51)
Match landmarks with features in a given sensor.
Definition: afeaturematcher.cpp:152
std::unordered_map< std::shared_ptr< AFeature >, std::vector< double > > vec_feat_matches_scores
Unordered map to store scores of matches between two feature lists.
Definition: afeaturematcher.h:17