KeyPoint.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  KeyPoint.h
00003  *
00004  *  (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  *  Additional information:
00008  *  $Id: $
00009  *******************************************************************************/
00010 
00011 #ifndef KeyPoint_H
00012 #define KeyPoint_H
00013 
00014 #include <vector>
00015 #include "Workers/Math/Point2D.h"
00016 
00017 
00023 class KeyPoint
00024 {
00025   public:
00026 
00036     KeyPoint( float _x, float _y, float _scale, float _strength, int _sign, float _orientation, std::vector<double> _featureVector );
00037     KeyPoint( float _x, float _y, float _scale, float _strength, int _sign );
00038     KeyPoint( );
00039 
00041     ~KeyPoint();
00042 
00043     KeyPoint( const KeyPoint& other );
00044 
00045     KeyPoint& operator=( const KeyPoint& other );
00046 
00048     template< class T >
00049     void copyDescriptor( T* descriptor, int length );
00050 
00051     void addDescriptor( std::vector<double> descriptor );
00052 
00053     Point2D position() { return Point2D( x, y ); }
00054 
00056     double squaredDistance( const KeyPoint& other ) const;
00057 
00062     double squaredDistance( const KeyPoint& other, double max ) const;
00063 
00065     std::vector<Point2D> getCircle() const;
00066 
00068     std::vector<Point2D> getBoundingBox() const;
00069 
00071     std::vector<Point2D> getCenterArrow() const;
00072 
00073     // SERIALIZATION
00074 
00076     std::string toASCII();
00077 
00079     std::string toString();
00080 
00082     double calcIntersection( const KeyPoint& other );
00083 
00085     double calcOverlap( const KeyPoint& other );
00086 
00089     float x;
00090     float y;
00091 
00092     float scale;
00093     float strength;
00094     float orientation;
00095     int sign;
00096 
00097     std::vector<double> featureVector;
00098     std::vector<unsigned> vectorLimits;
00099 };
00100 
00101 
00102 template< class T >
00103 void KeyPoint::copyDescriptor( T* descriptor, int length )
00104 {
00105   featureVector.resize(length);
00106   for ( int i = 0; i<length; i++ )
00107   {
00108     featureVector[i] = descriptor[i];
00109   }
00110 
00111 }
00112 
00113 
00114 
00115 #endif


or_libs
Author(s): raphael
autogenerated on Mon Oct 6 2014 02:53:18