00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __lfeat_image_h
00022 #define __lfeat_image_h
00023
00024 #include "KeyPoint.h"
00025 #include "vigra/stdimage.hxx"
00026
00027 namespace lfeat
00028 {
00029
00030
00031 class IntegralImage;
00032
00033 class LFIMPEX Image
00034 {
00035 public:
00036 Image() : _width(0), _height(0), _ii(0) {};
00037
00038
00039 Image(vigra::DImage &img);
00040
00041 void init(vigra::DImage &img);
00042
00043
00044 void clean();
00045
00046
00047 ~Image();
00048
00049
00050 inline double** getIntegralImage()
00051 {
00052 return _ii;
00053 }
00054 inline unsigned int getWidth()
00055 {
00056 return _width;
00057 }
00058 inline unsigned int getHeight()
00059 {
00060 return _height;
00061 }
00062
00063
00064 static double** AllocateImage(unsigned int iWidth, unsigned int iHeight);
00065 static void DeallocateImage(double** iImagePtr, unsigned int iHeight);
00066
00067 private:
00068
00069
00070 void buildIntegralImage(vigra::DImage &img);
00071
00072
00073 unsigned int _width;
00074 unsigned int _height;
00075
00076
00077 double**_ii;
00078 };
00079
00080 }
00081
00082 #endif //__lfeat_image_h
00083