File: PyramidCL.h

package info (click to toggle)
colmap 3.5-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 20,564 kB
  • sloc: ansic: 170,595; cpp: 95,339; python: 2,335; makefile: 183; sh: 51
file content (83 lines) | stat: -rwxr-xr-x 2,708 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
////////////////////////////////////////////////////////////////////////////
//	File:		PyramidCL.h
//	Author:		Changchang Wu
//	Description : interface for the PyramdCL
//
//	Copyright (c) 2007 University of North Carolina at Chapel Hill
//	All Rights Reserved
//
//	Permission to use, copy, modify and distribute this software and its
//	documentation for educational, research and non-profit purposes, without
//	fee, and without a written agreement is hereby granted, provided that the
//	above copyright notice and the following paragraph appear in all copies.
//	
//	The University of North Carolina at Chapel Hill make no representations
//	about the suitability of this software for any purpose. It is provided
//	'as is' without express or implied warranty. 
//
//	Please send BUG REPORTS to ccwu@cs.unc.edu
//
////////////////////////////////////////////////////////////////////////////



#ifndef _PYRAMID_CL_H
#define _PYRAMID_CL_H
#if defined(CL_SIFTGPU_ENABLED)

class CLTexImage;
class SiftPyramid;
class ProgramBagCL;
class PyramidCL: public SiftPyramid
{
	CLTexImage* 	_inputTex;
	CLTexImage* 	_allPyramid;
	CLTexImage* 	_histoPyramidTex;
	CLTexImage* 	_featureTex;
	CLTexImage* 	_descriptorTex;
	CLTexImage* 	_orientationTex;
    ProgramBagCL*   _OpenCL;
    GLTexImage*     _bufferTEX;
public:
	virtual void GetFeatureDescriptors();
	virtual void GenerateFeatureListTex();
	virtual void ReshapeFeatureListCPU();
	virtual void GenerateFeatureDisplayVBO();
	virtual void DestroySharedData();
	virtual void DestroyPerLevelData();
	virtual void DestroyPyramidData();
	virtual void DownloadKeypoints();
	virtual void GenerateFeatureListCPU();
	virtual void GenerateFeatureList();
	virtual GLTexImage* GetLevelTexture(int octave, int level);
	virtual GLTexImage* GetLevelTexture(int octave, int level, int dataName);
	virtual void BuildPyramid(GLTexInput * input);
	virtual void DetectKeypointsEX();
	virtual void ComputeGradient();
	virtual void GetFeatureOrientations();
	virtual void GetSimplifiedOrientation();
	virtual void InitPyramid(int w, int h, int ds = 0);
	virtual void ResizePyramid(int w, int h);
	
	//////////
	void CopyGradientTex();
	void FitPyramid(int w, int h);

    void InitializeContext();
	int ResizeFeatureStorage();
	int FitHistogramPyramid(CLTexImage* tex);
	void SetLevelFeatureNum(int idx, int fcount);
	void ConvertInputToCL(GLTexInput* input, CLTexImage* output);
	GLTexImage* ConvertTexCL2GL(CLTexImage* tex, int dataName);
	CLTexImage* GetBaseLevel(int octave, int dataName = DATA_GAUSSIAN);
private:
	void GenerateFeatureList(int i, int j, int reduction_count, vector<int>& hbuffer);
public:
	PyramidCL(SiftParam& sp);
	virtual ~PyramidCL();
};


#endif
#endif