Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
InterestPoint.hpp
00001 #ifndef _INTERESTPOINT_HPP_
00002 #define _INTERESTPOINT_HPP_
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <map>
00007 
00008 #include <boost/archive/text_oarchive.hpp>
00009 #include <boost/archive/text_iarchive.hpp>
00010 
00011 #include <jmath/jblas.hpp>
00012 
00013 namespace jafar {
00014   namespace geom {
00019     class InterestPoint {
00020     public:
00022       static const unsigned int NO_ID = -1;
00023     public:
00029       inline InterestPoint() : m_u(0.0), m_v(0.0), m_quality(0.5), m_id(NO_ID), m_index(NO_ID), m_stereoIndex(NO_ID) { }
00030       inline InterestPoint(double u, double v) : m_u(u), m_v(v), m_quality(0.5), m_id(NO_ID), m_index(NO_ID), m_stereoIndex(NO_ID) { }
00031       inline ~InterestPoint() {};
00036       inline jblas::vec2 point() const { 
00037   jblas::vec2 point; point(0) = u(); point(1) = v(); return point;
00038       }
00040       inline double u() const { return m_u; }
00042       inline void setU(double u) { m_u = u; }
00043         
00045       inline double v() const { return m_v; }
00047       inline void setV(double v) { m_v = v; }
00048         
00050       inline unsigned int id() const { return m_id; }
00052       inline void setId(unsigned int id) { m_id = id; }
00053         
00055       inline unsigned int index() const { return m_index; }
00057       inline void setIndex(unsigned int ind) { m_index = ind; }
00058         
00060       inline unsigned int stereoIndex() const { return m_stereoIndex; }
00062       inline void setStereoIndex(unsigned int ind) { m_stereoIndex = ind; }
00063         
00070       inline double quality() { return m_quality; }
00074       inline void setQuality(double q) { m_quality = q; }
00075 
00077       friend class boost::serialization::access;
00078       template<class Archive>
00079       void serialize(Archive & ar, const unsigned int /* file_version */){
00080         ar & m_id;
00081         ar & m_u;
00082         ar & m_v;
00083         ar & m_quality;
00084         ar & m_index;
00085         ar & m_stereoIndex;
00086       }
00087 
00088     private:
00089       double m_u, m_v, m_quality;
00090       unsigned int m_id;
00091       unsigned int m_index;
00092       unsigned int m_stereoIndex;
00093     };
00094     typedef std::vector<jafar::geom::InterestPoint*> vInterestPoints;
00095     typedef vInterestPoints::iterator vInterestPoints_it;
00096     typedef vInterestPoints::const_iterator vInterestPoints_cit;
00097     typedef std::map<double, jafar::geom::InterestPoint*> double2interestpoint;
00098   }
00099 }
00100 
00101 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:19 for Jafar by doxygen 1.7.6.1
LAAS-CNRS