-
Notifications
You must be signed in to change notification settings - Fork 3
/
descfift.h
52 lines (43 loc) · 1.63 KB
/
descfift.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
#ifndef DESCFIFT_H
#define DESCFIFT_H
#include "abstractdescriptor.h"
#include "keypoint.h"
#include "filter.h"
#include "image.h"
#include <vector>
using namespace std;
/**
*@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
**/
class DescFIFT :public AbstractDescriptor{
private:
///for descriptor
static const int PatchSize;
static const int NumOrient;
static const int GRID;
static const int DSize;
static const int PSIFTLen;
static const int PatchMag;
vector<vector<float> > gMat;
vector<vector<float> > cgmat;
public:
DescFIFT(DESC desc);
int buildDescriptor(const int kpnum,vector<KeyPoint*> &kps, const char *descfn, const float resize_rate);
int buildPatchView(const int kpnum, vector<KeyPoint*> &kps, const char *dvfn, const float resize_rate);
static int getWinSize(KeyPoint *key,float &sizeratio);
int calcDescPatch(KeyPoint *keyp,float *myWin,const int Size);
int calcPatchCurl(KeyPoint *keyp,float *myWin,const int Size);
int getFIFTDescriptor(const float *myWin, const float sc);
int getFIFTDescriptor(Image *win, const float sizeratio);
static vector<vector<float> > GaussianWeight2D(const int winSize);
static vector<vector<float> > GaussianWeight2D(const float sigma, const int radius);
~DescFIFT();
};
#endif