00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef RANSACFEATURESETMATCHER_H_
00024 #define RANSACFEATURESETMATCHER_H_
00025
00026 #include <feature/AbstractFeatureSetMatcher.h>
00027 #include <utils/PoseEstimation.h>
00028 #include <vector>
00029 #include <utility>
00030
00040 class RansacFeatureSetMatcher: public AbstractFeatureSetMatcher {
00041 public:
00052 RansacFeatureSetMatcher(double acceptanceThreshold, double successProbability, double inlierProbability, double distanceThreshold, double rigidityThreshold, bool adaptive = false);
00053
00054 virtual double matchSets(const std::vector<InterestPoint *> &reference, const std::vector<InterestPoint *> &data, OrientedPoint2D& transformation) const;
00055
00056 virtual double matchSets(const std::vector<InterestPoint *> &reference, const std::vector<InterestPoint *> &data, OrientedPoint2D& transformation,
00057 std::vector< std::pair<InterestPoint *, InterestPoint *> > &correspondences) const;
00058
00060 inline bool getAdaptive()
00061 {return m_adaptive;}
00062
00064 inline double getSuccessProbability()
00065 {return m_successProbability;}
00066
00068 inline double getInlierProbability()
00069 {return m_inlierProbability;}
00070
00072 inline double getDistanceThreshold()
00073 {return m_distanceThreshold;}
00074
00076 inline void setAdaptive(bool adaptive)
00077 {m_adaptive = adaptive;}
00078
00080 inline void setSuccessProbability(double successProbability)
00081 {m_successProbability = successProbability;}
00082
00084 inline void setInlierProbability(double inlierProbability)
00085 {m_inlierProbability = inlierProbability;}
00086
00088 inline void setDistanceThreshold(double distanceThreshold)
00089 {m_distanceThreshold = distanceThreshold;}
00090
00091 protected:
00092 double m_successProbability;
00093 double m_inlierProbability;
00094 double m_distanceThreshold;
00095 double m_rigidityThreshold;
00096 bool m_adaptive;
00097 };
00098
00099 #endif