SaDVIO
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
isae::AFeatureMatcher Class Reference

Class for matching features between two sets of features. More...

#include <afeaturematcher.h>

Inheritance diagram for isae::AFeatureMatcher:
Inheritance graph
[legend]

Public Member Functions

 AFeatureMatcher ()
 
 AFeatureMatcher (std::shared_ptr< AFeatureDetector > detector)
 
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. More...
 
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. More...
 

Protected Member Functions

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. More...
 
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. More...
 

Protected Attributes

std::shared_ptr< AFeatureDetector_detector
 feature detector for distance measurement More...
 
double _first_second_match_score_ratio
 ratio between the first and second best match score to consider a match valid More...
 
std::string _feature_label
 label for the features being matched More...
 

Detailed Description

Class for matching features between two sets of features.

This class provides methods to match features between two sets of features, filter matches, and link landmarks. It uses a feature detector to compute distances between feature descriptors.

Constructor & Destructor Documentation

◆ AFeatureMatcher() [1/2]

isae::AFeatureMatcher::AFeatureMatcher ( )
inline

◆ AFeatureMatcher() [2/2]

isae::AFeatureMatcher::AFeatureMatcher ( std::shared_ptr< AFeatureDetector detector)
inline

Member Function Documentation

◆ filterMatches()

vec_match isae::AFeatureMatcher::filterMatches ( vec_feat_matches matches12,
vec_feat_matches matches21,
vec_feat_matches_scores all_scores12,
vec_feat_matches_scores all_scores21 
)
protected

Filter matches based on the first and second best match scores.

This method filters the matches based on the ratio of the first and second best match scores.

Parameters
matches12Matches from the first to the second set of features.
matches21Matches from the second to the first set of features.
all_scores12Scores of all matches from the first to the second set.
all_scores21Scores of all matches from the second to the first set.
Returns
A vector of filtered matches.

◆ getPossibleMatchesBetween()

void isae::AFeatureMatcher::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 
)
protectedvirtual

Get possible matches between two sets of features.

This method computes the matches between two sets of features based on their descriptors and spatial proximity.

Parameters
features1First set of features.
features2Second set of features.
features_initInitial set of features for matching.
searchAreaWidthWidth of the search area for matching.
searchAreaHeightHeight of the search area for matching.
matchesOutput vector to store matched features.
all_scoresOutput vector to store scores of all matches.

◆ ldmk_match()

uint isae::AFeatureMatcher::ldmk_match ( std::shared_ptr< ImageSensor > &  sensor1,
std::vector< std::shared_ptr< ALandmark >> &  ldmks,
int  searchAreaWidth = 51,
int  searchAreaHeight = 51 
)
virtual

Match landmarks with features in a given sensor.

Parameters
sensor1The sensor in which to match landmarks.
ldmksVector of landmarks to match.
searchAreaWidthWidth of the search area for matching (default is 51).
searchAreaHeightHeight of the search area for matching (default is 51).
Returns
The number of matched landmarks.

Reimplemented in isae::Line2DFeatureMatcher.

◆ match()

uint isae::AFeatureMatcher::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 
)
virtual

Match features between two sets of features.

Parameters
features1First set of features.
features2Second set of features.
features_initInitial set of features for matching.
matchesOutput vector to store matched features.
matches_with_ldmksOutput vector to store matched features with landmarks.
searchAreaWidthWidth of the search area for matching (default is 51).
searchAreaHeightHeight of the search area for matching (default is 51).
Returns
The number of matched features.

Reimplemented in isae::Line2DFeatureMatcher.

Member Data Documentation

◆ _detector

std::shared_ptr<AFeatureDetector> isae::AFeatureMatcher::_detector
protected

feature detector for distance measurement

◆ _feature_label

std::string isae::AFeatureMatcher::_feature_label
protected

label for the features being matched

◆ _first_second_match_score_ratio

double isae::AFeatureMatcher::_first_second_match_score_ratio
protected
Initial value:
=
0.9

ratio between the first and second best match score to consider a match valid


The documentation for this class was generated from the following files: