Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00022
00023
00024 #ifndef _PYRAMID_CU_H
00025 #define _PYRAMID_CU_H
00026 #if defined(CUDA_SIFTGPU_ENABLED)
00027
00028 class GLTexImage;
00029 class CuTexImage;
00030 class SiftPyramid;
00031 class PyramidCU:public SiftPyramid
00032 {
00033 CuTexImage* _inputTex;
00034 CuTexImage* _allPyramid;
00035 CuTexImage* _histoPyramidTex;
00036 CuTexImage* _featureTex;
00037 CuTexImage* _descriptorTex;
00038 CuTexImage* _orientationTex;
00039 GLuint _bufferPBO;
00040 GLTexImage* _bufferTEX;
00041 public:
00042 virtual void GetFeatureDescriptors();
00043 virtual void GenerateFeatureListTex();
00044 virtual void ReshapeFeatureListCPU();
00045 virtual void GenerateFeatureDisplayVBO();
00046 virtual void DestroySharedData();
00047 virtual void DestroyPerLevelData();
00048 virtual void DestroyPyramidData();
00049 virtual void DownloadKeypoints();
00050 virtual void GenerateFeatureListCPU();
00051 virtual void GenerateFeatureList();
00052 virtual GLTexImage* GetLevelTexture(int octave, int level);
00053 virtual GLTexImage* GetLevelTexture(int octave, int level, int dataName);
00054 virtual void BuildPyramid(GLTexInput * input);
00055 virtual void DetectKeypointsEX();
00056 virtual void ComputeGradient();
00057 virtual void GetFeatureOrientations();
00058 virtual void GetSimplifiedOrientation();
00059 virtual void InitPyramid(int w, int h, int ds = 0);
00060 virtual void ResizePyramid(int w, int h);
00061 virtual int IsUsingRectDescription(){return _existing_keypoints & SIFT_RECT_DESCRIPTION; }
00063 void CopyGradientTex();
00064 void FitPyramid(int w, int h);
00065
00066 void InitializeContext();
00067 int ResizeFeatureStorage();
00068 int FitHistogramPyramid(CuTexImage* tex);
00069 void SetLevelFeatureNum(int idx, int fcount);
00070 void ConvertInputToCU(GLTexInput* input);
00071 GLTexImage* ConvertTexCU2GL(CuTexImage* tex, int dataName);
00072 CuTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN);
00073 void TruncateWidth(int& w) { w = GLTexInput::TruncateWidthCU(w); }
00075 static int CheckCudaDevice(int device);
00076 private:
00077 void GenerateFeatureList(int i, int j, int reduction_count, vector<int>& hbuffer);
00078 public:
00079 PyramidCU(SiftParam& sp);
00080 virtual ~PyramidCU();
00081 };
00082
00083
00084
00085 #endif
00086 #endif