00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DESCRIPTOR_H_INCLUDED
00022 #define DESCRIPTOR_H_INCLUDED
00023 #include <string>
00024 #include "APImage.h"
00025 #include "HessianDetector.h"
00026
00027 #define NR_ANGLE_BINS 8
00028 #define DESCRIPTOR_SIZE 36
00029
00030 class Descriptor
00031 {
00032 public:
00033 Descriptor(APImage* i, HessianDetector* hd);
00034 double _gaussWeighting(int x, int y, double stdev);
00035
00036
00037
00038 void setPoints(vector<vector<int> >* pts);
00039
00040 void createDescriptors();
00041 vector<vector<double> >* getDescriptors();
00042 bool printDescriptors(string name);
00043 bool generateAutopanoXML(string name);
00044 vector<vector<int> >* interestPoints;
00045
00046
00047 private:
00048 APImage* image;
00049 HessianDetector* hd;
00050
00051 double _getMaxima(int x,int y);
00052 double _euclidianDistance(int x1, int y1, int x2, int y2);
00053
00054 void _GaborResponse(int x,int y,double maxima,double* descriptor);
00055
00056 void _ShapeContext(int x,int y,double maxima,double* descriptor);
00057
00058 vector<vector<int> >* maximas;
00059 vector<vector<double> > descriptors;
00060
00061 };
00062
00063
00064
00065 #endif // DESCRIPTOR_H_INCLUDED