contrib/oxl/mvl/TripleMatchSetCorner.h
Go to the documentation of this file.
00001 // This is oxl/mvl/TripleMatchSetCorner.h
00002 #ifndef TripleMatchSetCorner_h_
00003 #define TripleMatchSetCorner_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 //  \file
00009 // \brief Three-view corner matches
00010 //
00011 //    TripleMatchSetCorner is a TripleMatchSet that holds matches
00012 //    between corners in three HomgInterestPointSets.
00013 //
00014 // \author
00015 //     Andrew W. Fitzgibbon, Oxford RRG, 09 Aug 96
00016 //
00017 // \verbatim
00018 //  Modifications:
00019 //     260297 AWF Added documentation
00020 // \endverbatim
00021 //-----------------------------------------------------------------------------
00022 
00023 #include <mvl/PairMatchSetCorner.h>
00024 #include "TripleMatchSet.h"
00025 
00026 class TripleMatchSetCorner : public TripleMatchSet
00027 {
00028  public:
00029 
00030   TripleMatchSetCorner();
00031   TripleMatchSetCorner(HomgInterestPointSet const* corners1,
00032                        HomgInterestPointSet const* corners2,
00033                        HomgInterestPointSet const* corners3);
00034 
00035   TripleMatchSetCorner(const TripleMatchSetCorner& that);
00036   TripleMatchSetCorner& operator=(const TripleMatchSetCorner& that);
00037 
00038   //: Copy triplet matches out of two pairwise match sets.
00039   TripleMatchSetCorner(const PairMatchSetCorner& matches12, const PairMatchSetCorner& matches23);
00040 
00041   //: Copy inliers to three arrays, and record the original indices.
00042   void extract_matches(vcl_vector <HomgPoint2D>& points1, vcl_vector <int>& corner_index_1,
00043                        vcl_vector <HomgPoint2D>& points2, vcl_vector <int>& corner_index_2,
00044                        vcl_vector <HomgPoint2D>& points3, vcl_vector <int>& corner_index_3) const;
00045 
00046   //: Copy inliers to three arrays
00047   void extract_matches(vcl_vector <HomgPoint2D>& points1,
00048                        vcl_vector <HomgPoint2D>& points2,
00049                        vcl_vector <HomgPoint2D>& points3) const;
00050 
00051   PairMatchSetCorner* get_matches12() { return (PairMatchSetCorner*)match12_; }
00052   PairMatchSetCorner* get_matches23() { return (PairMatchSetCorner*)match23_; }
00053   PairMatchSetCorner const* get_matches12() const { return (PairMatchSetCorner const*)match12_; }
00054   PairMatchSetCorner const* get_matches23() const { return (PairMatchSetCorner const*)match23_; }
00055 
00056   //HomgInterestPointSet* get_corners1() { return get_matches12()->get_corners1(); }
00057   //HomgInterestPointSet* get_corners2() { return get_matches12()->get_corners2(); }
00058   //HomgInterestPointSet* get_corners3() { return get_matches23()->get_corners2(); }
00059   HomgInterestPointSet const* get_corners1() const { return get_matches12()->get_corners1(); }
00060   HomgInterestPointSet const* get_corners2() const { return get_matches12()->get_corners2(); }
00061   HomgInterestPointSet const* get_corners3() const { return get_matches23()->get_corners2(); }
00062 };
00063 
00064 #endif // TripleMatchSetCorner_h_