-
Notifications
You must be signed in to change notification settings - Fork 3
/
harris.h
59 lines (50 loc) · 1.67 KB
/
harris.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
/**
*@author Wanlei Zhao
*@version 1.0
*All rights reserved by Wanlei Zhao
*
*Anyone receive this code should not redistribute it to other people
*without permission of the author
*
*This code should only be used for non-commercial purpose
**/
#ifndef HARRIS_H
#define HARRIS_H
#include "abstractdetector.h"
class Harris:public AbstractDetector
{
private:
///parameters for user
int numb;
float thresh;
float sigma;
///for detector
private:
static const float sigma0;
static const float _SIGMA;
static const float k0;
static const int BORDER;
static const int SCALES;
static const int THRESH;
static const float mag;
static const float dfactor;
static const int DEGREE;
static const int NumOrient;
static const int DEGPERBIN;
static const float NwKpThresh;
public:
Harris();
int keypDetect(const float dsigma, const int level, const int scale);
///inherited from AbstractDetector
public:
bool paramsCheck();
bool isSpatialPeak(Image *image, const int x, const int y);
vector<KeyPoint*> FindPeaksScales(const int octave, vector<Image*> HarImages);
vector<KeyPoint*> FindOrientByGrad(vector<KeyPoint *> &kps, vector<vector<Image *> > & GOctaves);
bool KeypointBuild(const char *fn, const char *dstfn, const char *descfn, const char *dvfn);
vector<Image* > BuildHarrisScales(vector<Image *> &gxScales, vector<Image *> &gyScales);
vector<vector<Image *> > BuildHarrisOctaves(vector<vector<Image *> > & GxOctaves,
vector<vector<Image *> > & GyOctaves);
static void test();
};
#endif