-
Notifications
You must be signed in to change notification settings - Fork 0
/
Value.h
120 lines (98 loc) · 1.81 KB
/
Value.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#pragma once
#include <opencv2/opencv.hpp>
#include <vector>
using namespace std;
//class Position
//{
//protected:
// std::pair<int, int> position;
//
//public:
// std::pair<int, int> GetPosition()
// {
// return position;
// }
//};
class Moravec_Data
{
private:
double value;
cv::Point position;
public:
Moravec_Data() {}
Moravec_Data(double value, cv::Point position)
{
this->value = value;
this->position = position;
}
const cv::Point Get_Position() const
{
return position;
}
cv::Point Get_Position(vector<Moravec_Data> vector, int idx)
{
return vector.at(idx).position;
}
static bool Compare(const Moravec_Data& v1, const Moravec_Data& v2)
{
return v1.value > v2.value;
}
double GetValue()
{
return value;
}
};
class Euclidean_Data
{
private:
vector<Euclidean_Data> matching_data;
cv::Point img1_px; cv::Point img2_px;
public:
Euclidean_Data(){};
Euclidean_Data(cv::Point img1_px, cv::Point img2_px)
{
this->img1_px = img1_px;
this->img2_px = img2_px;
}
void Set_distanceV(vector<Euclidean_Data> vector)
{
this->matching_data = vector;
}
vector<Euclidean_Data> Get_distanceV() { return matching_data; }
const cv::Point Get_Position1() const
{
return img1_px;
}
const cv::Point Get_Position2() const
{
return img2_px;
}
cv::Point Get_Position1(vector<Euclidean_Data> vector, int idx)
{
return vector.at(idx).img1_px;
}
cv::Point Get_Position2(vector<Euclidean_Data> vector, int idx)
{
return vector.at(idx).img2_px;
}
};
class Homologous_pt
{
private:
cv::Point img1_px; cv::Point img2_px;
public:
Homologous_pt() { };
Homologous_pt(cv::Point img1_px, cv::Point img2_px)
{
this->img1_px = img1_px;
this->img2_px = img2_px;
}
const cv::Point Get_Position1() const
{
return img1_px;
}
const cv::Point Get_Position2() const
{
return img2_px;
}
};