-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurf.h
executable file
·71 lines (48 loc) · 1.99 KB
/
surf.h
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
/***********************************************************
* --- 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 SURF_H
#define SURF_H
#include "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<Ipoint> &ipts);
//! Describe all features in the supplied vector
void getDescriptors(bool upright);
private:
//---------------- Private Functions -----------------//
//! Assign the current Ipoint an orientation
void getOrientation();
//! Get the descriptor vector of the current Ipoint
void getDescriptor();
//! Get the upright descriptor vector of the current Ipoint
void getUprightDescriptor();
//! 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 Ipoint in the vector
int index;
};
#endif