Go to the documentation of this file.00001
00002 #ifndef HomgInterestPointSet_h_
00003 #define HomgInterestPointSet_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <vcl_vector.h>
00027 #include <vcl_iosfwd.h>
00028
00029 #include <vnl/vnl_double_2.h>
00030 #include <vgl/vgl_homg_point_2d.h>
00031
00032 #include <mvl/HomgPoint2D.h>
00033 #include <mvl/HomgMetric.h>
00034
00035 class vil1_image;
00036 class ImageMetric;
00037 class HomgInterestPointSetData;
00038 class HomgInterestPoint;
00039
00040 class HomgInterestPointSet
00041 {
00042
00043 HomgInterestPointSetData* data_;
00044 HomgMetric conditioner_;
00045
00046 public:
00047
00048
00049 HomgInterestPointSet();
00050 HomgInterestPointSet(const HomgMetric&);
00051 HomgInterestPointSet(const char* filename, const HomgMetric& = 0);
00052 HomgInterestPointSet(const vcl_vector<HomgPoint2D>&, ImageMetric* conditioner);
00053 HomgInterestPointSet(vcl_vector<vgl_homg_point_2d<double> > const&, ImageMetric* conditioner);
00054 HomgInterestPointSet(const HomgInterestPointSet& that);
00055 ~HomgInterestPointSet();
00056
00057 HomgInterestPointSet& operator=(const HomgInterestPointSet& that);
00058
00059
00060
00061
00062
00063 unsigned size() const;
00064
00065
00066 const HomgPoint2D& operator[](int i) const { return get_homg(i); }
00067
00068 HomgInterestPoint& get(int i);
00069 HomgInterestPoint const& get(int i) const;
00070 vnl_double_2 const& get_2d(int i) const;
00071 vnl_vector_fixed<int,2> const& get_int(int i) const;
00072 HomgPoint2D const& get_homg(int i) const;
00073 vgl_homg_point_2d<double> homg_point(int i) const;
00074 float get_mean_intensity(int i) const;
00075
00076 vcl_vector<HomgPoint2D> const & get_homg_points() const;
00077 vcl_vector<vgl_homg_point_2d<double> > homg_points() const;
00078
00079 const ImageMetric* get_conditioner() const { return (const ImageMetric*)conditioner_; }
00080 void set_conditioner(const HomgMetric& c);
00081
00082
00083 bool add(double x, double y);
00084 bool add(const HomgPoint2D&);
00085 bool add(vgl_homg_point_2d<double> const&);
00086 bool add(const HomgInterestPoint&);
00087 bool add_preconditioned(const HomgPoint2D&);
00088 bool add_preconditioned(vgl_homg_point_2d<double> const&);
00089 void set_image(vil1_image const& image);
00090 void clear();
00091
00092
00093 bool read(const char* filename, const HomgMetric& c = 0);
00094 bool read(const char* filename, vil1_image const& src, const HomgMetric& c = 0);
00095 bool write(const char* filename) const;
00096
00097 bool read(vcl_istream& f, const ImageMetric* c);
00098 bool write(vcl_ostream& f, const ImageMetric* c) const;
00099
00100 protected:
00101 void init_conditioner(const HomgMetric& c = 0);
00102 void delete_conditioner();
00103 };
00104
00105 #endif // HomgInterestPointSet_h_