Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef NNRMatcher_H
00012 #define NNRMatcher_H
00013
00014 #include "../KeyPointExtraction/KeyPoint.h"
00015 #include <vector>
00016 #include <deque>
00017 #include <sstream>
00018 #include <list>
00019
00020 #include "Workers/Math/Math.h"
00021 #include "Workers/Math/Box2D.h"
00022
00023 #include "../KeyPointExtraction/KeyPointMatch.h"
00024
00030 class NNRMatcher
00031 {
00032 public:
00033
00037 NNRMatcher( std::vector< KeyPoint >* keyPointsA, std::vector< KeyPoint >* keyPointsB );
00038
00040 ~NNRMatcher();
00041
00047 void match( float maxDistRatio=0.7 );
00048
00049 std::list< KeyPointMatch > getMatches() { return m_Matches; }
00050
00052 int getNumMatches() { return m_Matches.size(); }
00053
00055 std::vector< std::pair< KeyPoint, KeyPoint > > getMatchedKeyPoints();
00056
00057 std::string getLog();
00058
00059 private:
00060
00062 void eliminateMultipleMatches( );
00063
00064 std::vector< KeyPoint >* m_KeyPointsA;
00065 std::vector< KeyPoint >* m_KeyPointsB;
00066
00067
00068 typedef std::list< KeyPointMatch > MatchList;
00069
00070
00071 typedef std::list<KeyPointMatch>::iterator MatchElem;
00072
00073 MatchList m_Matches;
00074
00075 std::ostringstream m_Log;
00076 };
00077
00078 #endif