-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsurf.h
More file actions
68 lines (46 loc) · 1.89 KB
/
surf.h
File metadata and controls
68 lines (46 loc) · 1.89 KB
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
/***********************************************************
* --- OpenSURF --- *
* This library is distributed under the GNU GPL. Please *
* contact chris.evans@irisys.co.uk for more information. *
* *
* C. Evans, Research Into Robust Visual Features, *
* MSc University of Bristol, 2008. *
* *
************************************************************/
#ifndef _OPENSURF_SURFH
#define _OPENSURF_SURFH
#include "opencv/cv.h"
#include "ipoint.h"
#include "integral.h"
#include <vector>
class Surf {
public:
//! Destructor
~Surf();
//! Standard Constructor (img is an integral image)
Surf(IplImage *img, std::vector<OpenSurfInterestPoint> &ipts);
//! Describe all features in the supplied vector
void getDescriptors(bool bUpright = false);
private:
//---------------- Private Functions -----------------//
//! Assign the current OpenSurfInterestPoint an orientation
void getOrientation();
//! Get the descriptor. See Agrawal ECCV 08
void getDescriptor(bool bUpright = false);
//! Calculate the value of the 2d gaussian at x,y
inline float gaussian(int x, int y, float sig);
inline float gaussian(float x, float y, float sig);
//! Calculate Haar wavelet responses in x and y directions
inline float haarX(int row, int column, int size);
inline float haarY(int row, int column, int size);
//! Get the angle from the +ve x-axis of the vector given by [X Y]
float getAngle(float X, float Y);
//---------------- Private Variables -----------------//
//! Integral image where Ipoints have been detected
IplImage *img;
//! Ipoints vector
IpVec &ipts;
//! Index of current OpenSurfInterestPoint in the vector
int index;
};
#endif