forked from raulbatalha/vlpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHOGNMS.h
55 lines (41 loc) · 1.17 KB
/
HOGNMS.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
#ifndef __HOG_NMS__
#define __HOG_NMS__
#include <iostream>
#include "cvaux.h"
#include "cv.h"
#include <ios>
#include "highgui.h"
#include <vector>
#include <fstream>
#include <ctype.h>
#include <dirent.h>
#include <stdexcept>
#include <ctype.h>
using namespace std;
using namespace cv;
#include "HOG_Result.h"
class HOGNMS
{
private:
Point3f *at, *ms, *tomode, *nmsToMode;
HOG_Result *nmsResultsLocal;
float* wt;
float center, scale;
float nonmaxSigma[3];
float nsigma[3];
float modeEpsilon;
float epsFinalDist;
int maxIterations;
bool isAllocated;
float sigmoid(float score) { return (score > center) ? scale * (score - center) : 0.0f; }
void nvalue(Point3f* ms, Point3f* at, float* wt, int length);
void nvalue(Point3f* ms, Point3f* msnext, Point3f* at, float* wt, int length);
void fvalue(Point3f* modes, HOG_Result* results, int lengthModes, Point3f* at, float* wt, int length);
void shiftToMode(Point3f* ms, Point3f* at, float* wt, Point3f *tomode, int length);
float distqt(Point3f *p1, Point3f *p2);
public:
vector<HOG_Result> ComputeNMSResults(Size my_window,vector<HOG_Result> meus_results);
HOGNMS();
~HOGNMS(void);
};
#endif