contrib/oxl/mvl/PairMatchSetCorner.h
Go to the documentation of this file.
00001 // This is oxl/mvl/PairMatchSetCorner.h
00002 #ifndef PairMatchSetCorner_h_
00003 #define PairMatchSetCorner_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Matches between corners
00010 //
00011 //    PairMatchSetCorner is a subclass of PairMatchSet that stores matches
00012 //    between corner features.
00013 //
00014 // \author
00015 //     Andrew W. Fitzgibbon, Oxford RRG, 09 Aug 96
00016 //
00017 // \verbatim
00018 //  Modifications:
00019 //   Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
00020 // \endverbatim
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 #include <mvl/HomgPoint2D.h>
00025 #include "PairMatchSet.h"
00026 
00027 class HomgInterestPointSet;
00028 class PairMatchSetCorner : public PairMatchSet
00029 {
00030  public:
00031   // Constructors/Destructors--------------------------------------------------
00032 
00033   PairMatchSetCorner();
00034   PairMatchSetCorner(HomgInterestPointSet const* corners1, HomgInterestPointSet const* corners2);
00035   PairMatchSetCorner(const PairMatchSetCorner& that);
00036   PairMatchSetCorner& operator=(const PairMatchSetCorner& that);
00037  ~PairMatchSetCorner();
00038 
00039   // Data Access---------------------------------------------------------------
00040   void extract_matches(vcl_vector <HomgPoint2D>& points1, vcl_vector <int>& corner_index_1,
00041                        vcl_vector <HomgPoint2D>& points2, vcl_vector <int>& corner_index_2) const;
00042 
00043   void extract_matches(vcl_vector <HomgPoint2D>& points1, vcl_vector <HomgPoint2D>& points2) const;
00044 
00045   //: Clear all matches and then set only those for which the corresponding inliers flag is set.
00046   void set(const vcl_vector<bool>& inliers,
00047            const vcl_vector<int>&  corner_index_1,
00048            const vcl_vector<int>&  corner_index_2);
00049 
00050   // Data Control--------------------------------------------------------------
00051   void set(HomgInterestPointSet const* corners1, HomgInterestPointSet const* corners2);
00052 
00053   //: Return the set of corners within which the i1 indices point
00054   HomgInterestPointSet const* get_corners1() const { return corners1_; }
00055 
00056   //: Return the set of corners within which the i2 indices point
00057   HomgInterestPointSet const* get_corners2() const { return corners2_; }
00058 
00059  private:
00060   HomgInterestPointSet const* corners1_;
00061   HomgInterestPointSet const* corners2_;
00062 };
00063 
00064 #endif // PairMatchSetCorner_h_