00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __lfeat_circularkeypointdescriptor_h
00022 #define __lfeat_circularkeypointdescriptor_h
00023
00024 #include "Image.h"
00025 #include "KeyPoint.h"
00026 #include "KeyPointDescriptor.h"
00027
00028 namespace lfeat
00029 {
00030
00031 struct SampleSpec
00032 {
00033 double x,y, size;
00034 };
00035
00036 class LFIMPEX CircularKeyPointDescriptor : public KeyPointDescriptor
00037 {
00038 public:
00039 CircularKeyPointDescriptor(Image& iImage,
00040 std::vector<int> rings = std::vector<int>(),
00041 std::vector<double> ring_radius = std::vector<double>(),
00042 std::vector<double> ring_gradient_width = std::vector<double>(),
00043 int ori_bins=18, double ori_sample_scale=4, int ori_gridsize=11);
00044 ~CircularKeyPointDescriptor();
00045
00046 void makeDescriptor(KeyPoint& ioKeyPoint) const;
00047 int getDescriptorLength() const
00048 {
00049 return _descrLen;
00050 };
00051 int assignOrientation(KeyPoint& ioKeyPoint, double angles[4]) const;
00052
00053 protected:
00054 void createDescriptor(KeyPoint& ioKeyPoint) const;
00055
00056 private:
00057
00058 Image& _image;
00059 int _vecLen;
00060 int _subRegions;
00061 int _descrLen;
00062 SampleSpec* _samples;
00063 const int _ori_nbins;
00064 const double _ori_sample_scale;
00065 const int _ori_gridsize;
00066 double* _ori_hist;
00067 };
00068
00069 }
00070
00071 #endif //__lfeat_keypointdescriptor_h