Statistics
| Branch: | Revision:

root / rgbdslam / external / siftgpu / src / SiftGPU / PyramidCL.h @ 9240aaa3

History | View | Annotate | Download (2.64 KB)

1
////////////////////////////////////////////////////////////////////////////
2
//        File:                PyramidCL.h
3
//        Author:                Changchang Wu
4
//        Description : interface for the PyramdCL
5
//
6
//        Copyright (c) 2007 University of North Carolina at Chapel Hill
7
//        All Rights Reserved
8
//
9
//        Permission to use, copy, modify and distribute this software and its
10
//        documentation for educational, research and non-profit purposes, without
11
//        fee, and without a written agreement is hereby granted, provided that the
12
//        above copyright notice and the following paragraph appear in all copies.
13
//        
14
//        The University of North Carolina at Chapel Hill make no representations
15
//        about the suitability of this software for any purpose. It is provided
16
//        'as is' without express or implied warranty. 
17
//
18
//        Please send BUG REPORTS to ccwu@cs.unc.edu
19
//
20
////////////////////////////////////////////////////////////////////////////
21

    
22

    
23

    
24
#ifndef _PYRAMID_CL_H
25
#define _PYRAMID_CL_H
26
#if defined(CL_SIFTGPU_ENABLED)
27

    
28
class CLTexImage;
29
class SiftPyramid;
30
class ProgramBagCL;
31
class PyramidCL: public SiftPyramid
32
{
33
        CLTexImage*         _inputTex;
34
        CLTexImage*         _allPyramid;
35
        CLTexImage*         _histoPyramidTex;
36
        CLTexImage*         _featureTex;
37
        CLTexImage*         _descriptorTex;
38
        CLTexImage*         _orientationTex;
39
    ProgramBagCL*   _OpenCL;
40
    GLTexImage*     _bufferTEX;
41
public:
42
        virtual void GetFeatureDescriptors();
43
        virtual void GenerateFeatureListTex();
44
        virtual void ReshapeFeatureListCPU();
45
        virtual void GenerateFeatureDisplayVBO();
46
        virtual void DestroySharedData();
47
        virtual void DestroyPerLevelData();
48
        virtual void DestroyPyramidData();
49
        virtual void DownloadKeypoints();
50
        virtual void GenerateFeatureListCPU();
51
        virtual void GenerateFeatureList();
52
        virtual GLTexImage* GetLevelTexture(int octave, int level);
53
        virtual GLTexImage* GetLevelTexture(int octave, int level, int dataName);
54
        virtual void BuildPyramid(GLTexInput * input);
55
        virtual void DetectKeypointsEX();
56
        virtual void ComputeGradient();
57
        virtual void GetFeatureOrientations();
58
        virtual void GetSimplifiedOrientation();
59
        virtual void InitPyramid(int w, int h, int ds = 0);
60
        virtual void ResizePyramid(int w, int h);
61
        
62
        //////////
63
        void CopyGradientTex();
64
        void FitPyramid(int w, int h);
65

    
66
    void InitializeContext();
67
        int ResizeFeatureStorage();
68
        int FitHistogramPyramid(CLTexImage* tex);
69
        void SetLevelFeatureNum(int idx, int fcount);
70
        void ConvertInputToCL(GLTexInput* input, CLTexImage* output);
71
        GLTexImage* ConvertTexCL2GL(CLTexImage* tex, int dataName);
72
        CLTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN);
73
private:
74
        void GenerateFeatureList(int i, int j, int reduction_count, vector<int>& hbuffer);
75
public:
76
        PyramidCL(SiftParam& sp);
77
        virtual ~PyramidCL();
78
};
79

    
80

    
81
#endif
82
#endif
83