PyramidGL.h
Go to the documentation of this file.
00001 
00002 //      File:           PyramidGL.h
00003 //      Author:         Changchang Wu
00004 //      Description : interface for the PyramdGL
00005 //              class PyramidNaive and PyramidPacked are derived from PyramidGL
00006 //
00007 //      Copyright (c) 2007 University of North Carolina at Chapel Hill
00008 //      All Rights Reserved
00009 //
00010 //      Permission to use, copy, modify and distribute this software and its
00011 //      documentation for educational, research and non-profit purposes, without
00012 //      fee, and without a written agreement is hereby granted, provided that the
00013 //      above copyright notice and the following paragraph appear in all copies.
00014 //      
00015 //      The University of North Carolina at Chapel Hill make no representations
00016 //      about the suitability of this software for any purpose. It is provided
00017 //      'as is' without express or implied warranty. 
00018 //
00019 //      Please send BUG REPORTS to ccwu@cs.unc.edu
00020 //
00022 
00023 
00024 
00025 #ifndef _PYRAMID_GL_H
00026 #define _PYRAMID_GL_H
00027 
00028 class GLTexImage;
00029 class SiftParam;
00030 class ProgramGPU;
00031 class ShaderMan;
00032 class GlobalUtil;
00033 class SiftPyramid;
00034 
00035 class PyramidGL:public SiftPyramid
00036 {
00037 protected:
00038         GLTexImage* _histoPyramidTex;
00039         GLTexImage* _featureTex;
00040         GLTexImage* _descriptorTex;
00041         GLTexImage* _orientationTex;
00042 public:
00043     void InitializeContext();
00044         void SetLevelFeatureNum(int idx, int num);
00045         void GetTextureStorageSize(int num, int &fw, int& fh);
00046         void GetAlignedStorageSize(int num, int align, int &fw, int &fh);
00047         static void InterlaceDescriptorF2(int w, int h, float* buf, float* pd, int step);
00048         static void NormalizeDescriptor(int num, float*pd);
00049         virtual void DownloadKeypoints();
00050         virtual int ResizeFeatureStorage();
00052         virtual void DestroyPerLevelData();
00053         virtual void DestroySharedData();
00054         virtual void GetFeatureDescriptors();
00055         virtual void GenerateFeatureListTex();
00056         virtual void ReshapeFeatureListCPU();
00057         virtual void GenerateFeatureDisplayVBO();
00058     virtual void CleanUpAfterSIFT();
00059         virtual GLTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN)=0;
00060 public:
00061         PyramidGL(SiftParam&sp);
00062         virtual ~PyramidGL();
00063 };
00064 
00065 class PyramidNaive:public PyramidGL, public ShaderMan  
00066 {
00067 protected:
00068         GLTexImage * _texPyramid;
00069         GLTexImage * _auxPyramid;
00070 public:
00071         void DestroyPyramidData();
00072         void GetSimplifiedOrientation();
00073         void GenerateFeatureListCPU();
00074         virtual void GetFeatureOrientations();
00075         virtual void GenerateFeatureList();
00076         void DetectKeypointsEX();
00077         void ComputeGradient();
00078         GLTexImage* GetLevelTexture(int octave, int level);
00079         GLTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN);
00080         GLTexImage* GetLevelTexture(int octave, int level, int dataName);
00081         void BuildPyramid(GLTexInput * input);
00082         void InitPyramid(int w, int h, int ds);
00083         void FitPyramid(int w, int h);
00084         void ResizePyramid(int w, int h);
00085         void FitHistogramPyramid();
00086         PyramidNaive(SiftParam & sp);
00087         ~PyramidNaive();
00088 private:
00089     void GenerateFeatureList(int i, int j);
00090 };
00091 
00092 
00093 class PyramidPacked:public PyramidGL, public ShaderMan
00094 {
00095         GLTexPacked * _allPyramid;
00096 public:
00097         PyramidPacked(SiftParam& sp);
00098         ~PyramidPacked();
00099         void DestroyPyramidData();
00100         void DetectKeypointsEX();
00101         void ComputeGradient();
00102         void BuildPyramid(GLTexInput * input);
00103         void InitPyramid(int w, int h, int ds);
00104         void FitPyramid(int w, int h);
00105         void ResizePyramid(int w, int h);
00106         void FitHistogramPyramid();
00107         void GenerateFeatureListCPU();
00108         void GenerateFeatureList();
00109         void GetSimplifiedOrientation();
00110         void GetFeatureOrientations();
00111         GLTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN);
00112         GLTexImage* GetLevelTexture(int octave, int level);
00113         GLTexImage* GetLevelTexture(int octave, int level, int dataName);
00114     virtual int  IsUsingRectDescription(){return _existing_keypoints & SIFT_RECT_DESCRIPTION; }
00115 private:
00116     void GenerateFeatureList(int i, int j);
00117 };
00118 
00119 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rgbd_registration
Author(s): Ross Kidson
autogenerated on Sun Oct 6 2013 12:00:40