![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <PyramidGL.h>


Public Member Functions | |
| void | InitializeContext () |
| void | SetLevelFeatureNum (int idx, int num) |
| void | GetTextureStorageSize (int num, int &fw, int &fh) |
| void | GetAlignedStorageSize (int num, int align, int &fw, int &fh) |
| virtual void | DownloadKeypoints () |
| virtual int | ResizeFeatureStorage () |
| virtual void | DestroyPerLevelData () |
| virtual void | DestroySharedData () |
| virtual void | GetFeatureDescriptors () |
| virtual void | GenerateFeatureListTex () |
| virtual void | ReshapeFeatureListCPU () |
| virtual void | GenerateFeatureDisplayVBO () |
| virtual void | CleanUpAfterSIFT () |
| virtual GLTexImage * | GetBaseLevel (int octave, int dataName=DATA_GAUSSIAN)=0 |
| PyramidGL (SiftParam &sp) | |
| virtual | ~PyramidGL () |
Public Member Functions inherited from SiftPyramid | |
| virtual void | RunSIFT (GLTexInput *input) |
| virtual void | SaveSIFT (const char *szFileName) |
| virtual void | CopyFeatureVector (float *keys, float *descriptors) |
| virtual void | SetKeypointList (int num, const float *keys, int run_on_current, int skip_orientation) |
| virtual void | GenerateFeatureListCPU ()=0 |
| virtual void | GenerateFeatureList ()=0 |
| virtual GLTexImage * | GetLevelTexture (int octave, int level)=0 |
| virtual GLTexImage * | GetLevelTexture (int octave, int level, int dataName)=0 |
| virtual void | BuildPyramid (GLTexInput *input)=0 |
| virtual void | ResizePyramid (int w, int h)=0 |
| virtual void | InitPyramid (int w, int h, int ds=0)=0 |
| virtual void | DetectKeypointsEX ()=0 |
| virtual void | ComputeGradient ()=0 |
| virtual void | GetFeatureOrientations ()=0 |
| virtual void | GetSimplifiedOrientation ()=0 |
| virtual int | IsUsingRectDescription () |
| void | SetFailStatus () |
| inline functions, shared by all implementations More... | |
| int | GetSucessStatus () |
| int | GetFeatureNum () |
| int | GetHistLevelNum () |
| const GLuint * | GetFeatureDipslayVBO () |
| const GLuint * | GetPointDisplayVBO () |
| const int * | GetLevelFeatureNum () |
| void | GetPyramidTiming (float *timing) |
| void | CleanupBeforeSIFT () |
| SiftPyramid (SiftParam &sp) | |
| virtual | ~SiftPyramid () |
Static Public Member Functions | |
| static void | InterlaceDescriptorF2 (int w, int h, float *buf, float *pd, int step) |
| static void | NormalizeDescriptor (int num, float *pd) |
Static Public Member Functions inherited from SiftPyramid | |
| static int | GetRequiredOctaveNum (int inputsz) |
Static Public Member Functions inherited from GlobalUtil | |
| static double | CLOCK () |
| static void | StopTimer () |
| static void | StartTimer (const char *event) |
| static float | GetElapsedTime () |
| static void | FitViewPort (int width, int height) |
| static void | SetTextureParameter () |
| static void | SetTextureParameterUS () |
| static void | CheckErrorsGL (const char *location=NULL) |
| static bool | CheckFramebufferStatus () |
| static void | SelectDisplay () |
| static void | InitGLParam (int NotTargetGL=0) |
| static void | SetGLParam () |
| static int | CreateWindowEZ () |
| static void | CleanupOpenGL () |
| static void | SetDeviceParam (int argc, char **argv) |
| static int | CreateWindowEZ (LiteWindow *window) |
Protected Attributes | |
| GLTexImage * | _histoPyramidTex |
| GLTexImage * | _featureTex |
| GLTexImage * | _descriptorTex |
| GLTexImage * | _orientationTex |
Protected Attributes inherited from SiftPyramid | |
| SiftParam & | param |
| int | _hpLevelNum |
| int * | _levelFeatureNum |
| int | _featureNum |
| float * | _histo_buffer |
| int | _existing_keypoints |
| vector< int > | _keypoint_index |
| GLuint * | _featureDisplayVBO |
| GLuint * | _featurePointVBO |
Additional Inherited Members | |
Public Types inherited from SiftPyramid | |
| enum | { DATA_GAUSSIAN = 0 , DATA_DOG = 1 , DATA_KEYPOINT = 2 , DATA_GRAD = 3 , DATA_ROT = 4 , DATA_NUM = 5 } |
| enum | { SIFT_SKIP_FILTERING = 0x01 , SIFT_SKIP_DETECTION = 0x02 , SIFT_SKIP_ORIENTATION = 0x04 , SIFT_RECT_DESCRIPTION = 0x08 } |
Public Attributes inherited from SiftPyramid | |
| float | _timing [8] |
| int | _octave_min |
| int | _octave_num |
| int | _pyramid_octave_num |
| int | _pyramid_octave_first |
| int | _pyramid_width |
| int | _pyramid_height |
| int | _down_sample_factor |
| int | _allocated |
| int | _alignment |
| int | _siftgpu_failed |
| vector< float > | _keypoint_buffer |
| vector< float > | _descriptor_buffer |
Static Public Attributes inherited from GlobalParam | |
| static GLuint | _texTarget = GL_TEXTURE_RECTANGLE_ARB |
| static GLuint | _iTexFormat =GL_RGBA32F_ARB |
| static int | _texMaxDim = 3200 |
| static int | _texMaxDimGL = 4096 |
| static int | _texMinDim = 16 |
| static int | _MemCapGPU = 0 |
| static int | _FitMemoryCap = 0 |
| static int | _verbose = 1 |
| static int | _timingS = 1 |
| static int | _timingO = 0 |
| static int | _timingL = 0 |
| static int | _usePackedTex = 1 |
| static int | _IsNvidia = 0 |
| static int | _KeepShaderLoop = 0 |
| static int | _UseCUDA = 0 |
| static int | _UseOpenCL = 0 |
| static int | _UseDynamicIndexing = 0 |
| static int | _debug = 0 |
| static int | _MaxFilterWidth = -1 |
| static float | _FilterWidthFactor = 4.0f |
| static float | _OrientationWindowFactor = 2.0f |
| static float | _DescriptorWindowFactor = 3.0f |
| static int | _MaxOrientation = 2 |
| static int | _OrientationPack2 = 0 |
| static int | _ListGenGPU = 1 |
| static int | _ListGenSkipGPU = 6 |
| static int | _SupportNVFloat = 0 |
| static int | _SupportTextureRG = 0 |
| static int | _FullSupported = 1 |
| static float | _MaxFeaturePercent = 0.005f |
| static int | _MaxLevelFeatureNum = 4096 |
| static int | _DescriptorPPR = 8 |
| static int | _DescriptorPPT = 16 |
| static int | _FeatureTexBlock = 4 |
| static int | _NarrowFeatureTex = 0 |
| static int | _SubpixelLocalization = 1 |
| static int | _ProcessOBO = 0 |
| static int | _TruncateMethod = 0 |
| static int | _PreciseBorder = 1 |
| static int | _UseSiftGPUEX = 0 |
| static int | _ForceTightPyramid = 0 |
| static int | _octave_min_default =0 |
| static int | _octave_num_default =-1 |
| static int | _InitPyramidWidth =0 |
| static int | _InitPyramidHeight =0 |
| static int | _PreProcessOnCPU = 1 |
| static int | _GoodOpenGL = -1 |
| static int | _FixedOrientation = 0 |
| static int | _LoweOrigin = 0 |
| static int | _ExitAfterSIFT = 0 |
| static int | _NormalizedSIFT = 1 |
| static int | _BinarySIFT = 0 |
| static int | _KeepExtremumSign = 0 |
| static int | _FeatureCountThreshold = -1 |
| static int | _KeyPointListForceLevel0 = 0 |
| static int | _DarknessAdaption = 0 |
| static float | _OrientationExtraFactor |
| static float | _OrientationGaussianFactor = 1.5f |
| static float | _MulitiOrientationThreshold = 0.8f |
| static int | _WindowInitX = -1 |
| static int | _WindowInitY = -1 |
| static const char * | _WindowDisplay = NULL |
| static int | _DeviceIndex = 0 |
Definition at line 35 of file PyramidGL.h.
| PyramidGL::PyramidGL | ( | SiftParam & | sp | ) |
Definition at line 159 of file PyramidGL.cpp.
References _descriptorTex, _featureTex, _histoPyramidTex, _orientationTex, InitializeContext(), and NULL.
|
virtual |
Definition at line 169 of file PyramidGL.cpp.
References DestroyPerLevelData(), ShaderMan::DestroyShaders(), and DestroySharedData().
|
virtual |
Reimplemented from SiftPyramid.
Definition at line 1459 of file PyramidGL.cpp.
References GlobalUtil::CleanupOpenGL(), FrameBufferObject::DeleteGlobalFBO(), GLTexImage::UnbindMultiTex(), and ShaderMan::UnloadProgram().
|
virtual |
Definition at line 185 of file PyramidGL.cpp.
References SiftParam::_dog_level_num, SiftPyramid::_featureDisplayVBO, SiftPyramid::_featurePointVBO, _featureTex, SiftPyramid::_levelFeatureNum, SiftPyramid::_octave_num, _orientationTex, NULL, and SiftPyramid::param.
Referenced by PyramidNaive::ResizePyramid(), PyramidPacked::ResizePyramid(), and ~PyramidGL().
|
virtual |
Definition at line 223 of file PyramidGL.cpp.
References _descriptorTex, SiftPyramid::_histo_buffer, _histoPyramidTex, SiftPyramid::_hpLevelNum, and NULL.
Referenced by ~PyramidGL().
|
virtual |
Implements SiftPyramid.
Definition at line 1790 of file PyramidGL.cpp.
References SiftParam::_dog_level_num, SiftPyramid::_down_sample_factor, SiftPyramid::_featureNum, _featureTex, SiftPyramid::_keypoint_buffer, SiftPyramid::_keypoint_index, SiftPyramid::_levelFeatureNum, GlobalParam::_LoweOrigin, SiftPyramid::_octave_min, SiftPyramid::_octave_num, GLTexImage::AttachToFBO(), GLTexImage::FitRealTexViewPort(), GLTexImage::GetImgHeight(), GLTexImage::GetImgWidth(), offset, and SiftPyramid::param.
|
virtual |
Implements SiftPyramid.
Definition at line 1022 of file PyramidGL.cpp.
References SiftPyramid::_alignment, _descriptorTex, SiftParam::_dog_level_num, SiftPyramid::_featureDisplayVBO, SiftPyramid::_featurePointVBO, _featureTex, SiftParam::_level_min, SiftPyramid::_levelFeatureNum, SiftPyramid::_octave_num, GLTexImage::AttachToFBO(), FrameBufferObject::BindFBO(), GLTexImage::BindTex(), cloudViewer::utility::ceil(), count, GLTexImage::DrawQuad(), GLTexImage::FitTexViewPort(), GlobalUtil::FitViewPort(), GetAlignedStorageSize(), GLTexImage::GetImgHeight(), GLTexImage::GetImgWidth(), SiftParam::GetLevelSigma(), NULL, SiftPyramid::param, ShaderMan::UseShaderCopyKeypoint(), and ShaderMan::UseShaderGenVBO().
|
virtual |
Implements SiftPyramid.
Definition at line 1849 of file PyramidGL.cpp.
References SiftParam::_dog_level_num, SiftPyramid::_down_sample_factor, SiftPyramid::_featureNum, _featureTex, SiftPyramid::_keypoint_buffer, SiftPyramid::_keypoint_index, GlobalParam::_KeyPointListForceLevel0, SiftParam::_level_min, SiftPyramid::_levelFeatureNum, GlobalParam::_LoweOrigin, SiftPyramid::_octave_min, SiftPyramid::_octave_num, GlobalParam::_texTarget, GlobalParam::_verbose, GLTexImage::AttachToFBO(), GLTexImage::BindTex(), GLTexImage::GetImgHeight(), GLTexImage::GetImgWidth(), SiftParam::GetLevelSigma(), SiftPyramid::IsUsingRectDescription(), min(), offset, SiftPyramid::param, SetLevelFeatureNum(), and GLTexImage::UnbindTex().
| void PyramidGL::GetAlignedStorageSize | ( | int | num, |
| int | align, | ||
| int & | fw, | ||
| int & | fh | ||
| ) |
Definition at line 71 of file PyramidGL.cpp.
References GlobalParam::_NarrowFeatureTex, GlobalParam::_texMaxDim, and cloudViewer::utility::ceil().
Referenced by GenerateFeatureDisplayVBO(), GetFeatureDescriptors(), and ResizeFeatureStorage().
|
pure virtual |
Implemented in PyramidPacked, and PyramidNaive.
Referenced by GetFeatureDescriptors(), and ResizeFeatureStorage().
|
virtual |
Implements SiftPyramid.
Definition at line 1667 of file PyramidGL.cpp.
References SiftPyramid::_descriptor_buffer, GlobalParam::_DescriptorPPR, GlobalParam::_DescriptorPPT, _descriptorTex, SiftParam::_dog_level_num, SiftPyramid::_featureNum, _featureTex, GlobalParam::_IsNvidia, SiftPyramid::_keypoint_index, SiftParam::_level_min, SiftPyramid::_levelFeatureNum, GlobalParam::_NormalizedSIFT, SiftPyramid::_octave_min, SiftPyramid::_octave_num, GlobalParam::_timingS, GLTexImage::BindTex(), cloudViewer::utility::ceil(), count, SiftPyramid::DATA_GRAD, SiftPyramid::DATA_ROT, GLTexImage::DrawQuad(), GlobalUtil::FitViewPort(), GetAlignedStorageSize(), GetBaseLevel(), SiftParam::GetLevelSigma(), GLTexImage::GetTexHeight(), GLTexImage::GetTexID(), InterlaceDescriptorF2(), SiftPyramid::IsUsingRectDescription(), min(), NormalizeDescriptor(), NULL, SiftPyramid::param, FrameBufferObject::UnattachTex(), GLTexImage::UnbindMultiTex(), ShaderMan::UnloadProgram(), and ShaderMan::UseShaderDescriptor().
| void PyramidGL::GetTextureStorageSize | ( | int | num, |
| int & | fw, | ||
| int & | fh | ||
| ) |
Definition at line 106 of file PyramidGL.cpp.
References GlobalParam::_FeatureTexBlock, GlobalParam::_NarrowFeatureTex, GlobalParam::_texMaxDim, and cloudViewer::utility::ceil().
Referenced by ResizeFeatureStorage(), and SetLevelFeatureNum().
| void PyramidGL::InitializeContext | ( | ) |
Definition at line 176 of file PyramidGL.cpp.
References GlobalParam::_GoodOpenGL, GlobalUtil::InitGLParam(), ShaderMan::InitShaderMan(), and SiftPyramid::param.
Referenced by PyramidGL().
|
inlinestatic |
Definition at line 1583 of file PyramidGL.cpp.
References GlobalParam::_DescriptorPPR.
Referenced by GetFeatureDescriptors().
|
inlinestatic |
Definition at line 1541 of file PyramidGL.cpp.
References min().
Referenced by GetFeatureDescriptors().
|
virtual |
Implements SiftPyramid.
Definition at line 1263 of file PyramidGL.cpp.
References SiftParam::_dog_level_num, SiftPyramid::_down_sample_factor, SiftPyramid::_existing_keypoints, SiftPyramid::_featureNum, _featureTex, SiftPyramid::_keypoint_buffer, SiftPyramid::_levelFeatureNum, GlobalParam::_LoweOrigin, SiftPyramid::_octave_min, SiftPyramid::_octave_num, GlobalParam::_OrientationPack2, _orientationTex, GlobalParam::_texTarget, GlobalParam::_verbose, GLTexImage::AttachToFBO(), GLTexImage::BindTex(), GLTexImage::DetachFBO(), QtCompat::endl(), GLTexImage::FitTexViewPort(), GLTexImage::GetImgHeight(), GLTexImage::GetImgWidth(), NULL, offset, SiftPyramid::param, SetLevelFeatureNum(), and GLTexImage::UnbindTex().
|
virtual |
Definition at line 467 of file PyramidGL.cpp.
References SiftPyramid::_alignment, GlobalParam::_DescriptorPPT, _descriptorTex, SiftParam::_dog_level_num, _featureTex, SiftPyramid::_histo_buffer, _histoPyramidTex, SiftPyramid::_hpLevelNum, SiftPyramid::_levelFeatureNum, GlobalParam::_ListGenGPU, GlobalParam::_ListGenSkipGPU, GlobalParam::_MaxFeaturePercent, GlobalParam::_MaxLevelFeatureNum, GlobalParam::_MaxOrientation, SiftPyramid::_octave_min, SiftPyramid::_octave_num, GlobalParam::_OrientationPack2, _orientationTex, GLTexImage::AttachToFBO(), cloudViewer::utility::ceil(), GetAlignedStorageSize(), GetBaseLevel(), GLTexImage::GetDrawHeight(), GLTexImage::GetDrawWidth(), GLTexImage::GetImgHeight(), GLTexImage::GetImgWidth(), GLTexImage::GetTexHeight(), GetTextureStorageSize(), GLTexImage::GetTexWidth(), GLTexImage::InitTexture(), max(), NULL, and SiftPyramid::param.
Referenced by PyramidNaive::ResizePyramid(), and PyramidPacked::ResizePyramid().
|
inline |
Definition at line 1439 of file PyramidGL.cpp.
References _featureTex, GlobalParam::_NarrowFeatureTex, _orientationTex, cloudViewer::utility::ceil(), GLTexImage::GetTexHeight(), GetTextureStorageSize(), GLTexImage::GetTexWidth(), GLTexImage::InitTexture(), and GLTexImage::SetImageSize().
Referenced by PyramidNaive::GenerateFeatureListCPU(), PyramidPacked::GenerateFeatureListCPU(), GenerateFeatureListTex(), and ReshapeFeatureListCPU().
|
protected |
Definition at line 40 of file PyramidGL.h.
Referenced by DestroySharedData(), GenerateFeatureDisplayVBO(), GetFeatureDescriptors(), PyramidGL(), and ResizeFeatureStorage().
|
protected |
Definition at line 39 of file PyramidGL.h.
Referenced by DestroyPerLevelData(), DownloadKeypoints(), GenerateFeatureDisplayVBO(), PyramidNaive::GenerateFeatureListCPU(), PyramidPacked::GenerateFeatureListCPU(), GenerateFeatureListTex(), GetFeatureDescriptors(), PyramidNaive::GetFeatureOrientations(), PyramidPacked::GetFeatureOrientations(), PyramidNaive::GetSimplifiedOrientation(), PyramidPacked::GetSimplifiedOrientation(), PyramidGL(), ReshapeFeatureListCPU(), ResizeFeatureStorage(), and SetLevelFeatureNum().
|
protected |
Definition at line 38 of file PyramidGL.h.
Referenced by DestroySharedData(), PyramidNaive::FitHistogramPyramid(), PyramidPacked::FitHistogramPyramid(), PyramidGL(), and ResizeFeatureStorage().
|
protected |
Definition at line 41 of file PyramidGL.h.
Referenced by DestroyPerLevelData(), PyramidNaive::GetFeatureOrientations(), PyramidPacked::GetFeatureOrientations(), PyramidGL(), ReshapeFeatureListCPU(), ResizeFeatureStorage(), and SetLevelFeatureNum().