Public Member Functions | Private Attributes
RobustMatcher Class Reference

Matches two sets of key-points and descriptors. More...

#include <robustmatcher.hpp>

List of all members.

Public Member Functions

cv::Mat match (std::vector< cv::KeyPoint > &keypoints1, cv::Mat &descriptors1, std::vector< cv::KeyPoint > &keypoints2, cv::Mat &descriptors2, std::vector< cv::DMatch > &matches, bool doRansacTest=true, bool doRatioTest=false, bool refineF=false)
 Match feature points using symmetry test and RANSAC.
cv::Mat ransacTest (const std::vector< cv::DMatch > &matches, const std::vector< cv::KeyPoint > &keypoints1, const std::vector< cv::KeyPoint > &keypoints2, std::vector< cv::DMatch > &outMatches)
 Identify good matches using RANSAC.
int ratioTest (std::vector< std::vector< cv::DMatch > > &matches)
 Clear matches for which NN ratio is greater than threshold The corresponding entries in the vector of matches are cleared.
 RobustMatcher (void)
 Constructor.
void symmetryTest (const std::vector< std::vector< cv::DMatch > > &matches1, const std::vector< std::vector< cv::DMatch > > &matches2, std::vector< cv::DMatch > &symMatches)
 Checks that matches are present both ways.

Private Attributes

double confidence_
double distance_
cv::BFMatcher matcher_
float ratio_
bool refineF_

Detailed Description

Matches two sets of key-points and descriptors.

Definition at line 53 of file robustmatcher.hpp.


Constructor & Destructor Documentation

RobustMatcher::RobustMatcher ( void  ) [inline]

Constructor.

Definition at line 58 of file robustmatcher.hpp.


Member Function Documentation

cv::Mat RobustMatcher::match ( std::vector< cv::KeyPoint > &  keypoints1,
cv::Mat &  descriptors1,
std::vector< cv::KeyPoint > &  keypoints2,
cv::Mat &  descriptors2,
std::vector< cv::DMatch > &  matches,
bool  doRansacTest = true,
bool  doRatioTest = false,
bool  refineF = false 
) [inline]

Match feature points using symmetry test and RANSAC.

Parameters:
[in]keypoints1Set of key-points from first image
[in]descriptors1Set of feature descriptors from first image
[in]keypoints2Set of key-points from second image
[in]descriptors2Set of feature descriptors from second image
[out]matchesResulting robust matches between the first and second images
[in]doRansacTestIf true, perform RANSAC test to matches
[in]doRatioTestIf true, perform ratio test to matches
[in]refineFIf true, refine fundamental matrix
Returns:
Fundamental matrix

Definition at line 79 of file robustmatcher.hpp.

cv::Mat RobustMatcher::ransacTest ( const std::vector< cv::DMatch > &  matches,
const std::vector< cv::KeyPoint > &  keypoints1,
const std::vector< cv::KeyPoint > &  keypoints2,
std::vector< cv::DMatch > &  outMatches 
) [inline]

Identify good matches using RANSAC.

Parameters:
[in]matchesInput matches between images 1 and 2
[in]keypoints1Key-points from image 1
[in]keypoints2Key-points from image 2
[out]outMatchesSurviving matches after RANSAC test
Returns:
Fundamental matrix

Definition at line 187 of file robustmatcher.hpp.

int RobustMatcher::ratioTest ( std::vector< std::vector< cv::DMatch > > &  matches) [inline]

Clear matches for which NN ratio is greater than threshold The corresponding entries in the vector of matches are cleared.

Parameters:
matchesVector of matches
Returns:
Number of removed points

Definition at line 122 of file robustmatcher.hpp.

void RobustMatcher::symmetryTest ( const std::vector< std::vector< cv::DMatch > > &  matches1,
const std::vector< std::vector< cv::DMatch > > &  matches2,
std::vector< cv::DMatch > &  symMatches 
) [inline]

Checks that matches are present both ways.

Parameters:
[in]matches1Matched points in one direction
[in]matches2Matched points in the opposite direction
[out]symMatchesOutput symmetrical matches

Definition at line 151 of file robustmatcher.hpp.


Member Data Documentation

double RobustMatcher::confidence_ [private]

Confidence level (probability)

Definition at line 262 of file robustmatcher.hpp.

double RobustMatcher::distance_ [private]

Min distance to epipolar in RANSAC

Definition at line 261 of file robustmatcher.hpp.

cv::BFMatcher RobustMatcher::matcher_ [private]

Bruteforce matcher

Definition at line 263 of file robustmatcher.hpp.

float RobustMatcher::ratio_ [private]

Max ratio between 1st and 2nd nearest neighbor

Definition at line 259 of file robustmatcher.hpp.

bool RobustMatcher::refineF_ [private]

If true the F matrix will be refined

Definition at line 260 of file robustmatcher.hpp.


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


viodom
Author(s): Fernando Caballero , Francisco J. Perez Grau
autogenerated on Thu Jun 6 2019 20:17:02