-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.h
executable file
·50 lines (48 loc) · 1.68 KB
/
template.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
#ifndef TEMPLATE_H
#define TEMPLATE_H
#define widthsize 1280/2
#define heightsize 720/2
//#include <QString>
//#include <QImage>
//#include <QObject>
class TemplateValue{
public:
TemplateValue() : distance(0), arc(0), id(-1) { }
TemplateValue(int d, int arc, int id) : distance(d), arc(arc), id(id) { }
TemplateValue(const TemplateValue &other) { distance = other.distance; arc = other.arc; id = other.id; }
~TemplateValue() { }
long long int distance;
int arc;
int id;
};
//Q_DECLARE_METATYPE(TemplateValue)
class HueTemplate {
public:
static int region1Arcs[8];
static int region2Arcs[8];
static int regionNums[8];
static int region2Shift[8];
static char names[8];
static int HueDis[7][360][360];
void HTcompute();
HueTemplate();
//TemplateValue computeDistance(QImage & image, int id);
TemplateValue computeDistanceFast(int id, int totS[]) ;
long long int helpComputeDistance(int arc, int id, int h[widthsize][heightsize], int s[widthsize][heightsize]);
long long int computeArcDistance(int arc, int hue, int id);
int computeNearRegion(int arc, int hue, int id);
int targetHue(int arc, int hue, int id);
//int targetHue(int arc, int hue, int id, int border);
float counterOrcouterWise(int hue, int center);
int nearestDistance(int hue1, int hue2);
int distance(int hue1, int hue2, int direction);
//long long int * computeArcDistanceLabel(int arc, int hue, int id);
//int targetHueWithSpatialLocality(int i, int j, QImage &image, TemplateValue m_TV);
};
/*
class GlobalTemplate {
public:
TemplateValue m_TV;
QImage m_image;
};*/
#endif // TEMPLATE_H