-
Notifications
You must be signed in to change notification settings - Fork 16
/
configuration.hpp
204 lines (176 loc) · 4.1 KB
/
configuration.hpp
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*------------------------------------------------------*/
/* Copyright 2013, Dmytro Mishkin [email protected] */
/*------------------------------------------------------*/
#ifndef CONFIGURATION_HPP
#define CONFIGURATION_HPP
#include <vector>
#include <string>
#define WITH_ORSA
//verificator types
#ifdef WITH_ORSA
enum RANSAC_mode_t {LORANSAC,GR_TRUTH,LORANSACF,ORSA,GR_PLUS_RANSAC};
#else
enum RANSAC_mode_t {LORANSAC,GR_TRUTH,LORANSACF,GR_PLUS_RANSAC};
#endif
//detector types
const int HESAFF = 0;
const int DOG = 1;
const int MSER = 2;
const int MSER_TYPES = 2;
const int HA_TYPES = 3;
const int DOG_TYPES = 2;
const int HAR_TYPES = 2;
const int MODE_RANDOM = 0;
const int MODE_FGINN = 1;
const int MODE_DISTANCE = 2;
const int MODE_BIGGER_REGION = 3;
struct drawingParams
{
int writeImages;
int drawEpipolarLines;
int drawOnlyCenters;
int drawReprojected;
bool drawDetectedRegions;
drawingParams()
{
writeImages = 1;
drawOnlyCenters = 1;
drawEpipolarLines = 0;
drawReprojected = 1;
drawDetectedRegions = false;
}
};
struct outputParams
{
int verbose;
int timeLog;
int writeKeypoints;
int writeMatches;
int featureComplemetaryLog;
int outputAllTentatives;
int outputEstimatedHorF;
outputParams()
{
verbose = 0;
timeLog = 1;
writeKeypoints = 1;
writeMatches = 1;
outputAllTentatives = 0;
featureComplemetaryLog = 0;
outputEstimatedHorF = 0;
}
};
struct filteringParams
{
int useSCV;
int doBeforeRANSAC;
double duplicateDist;
int mode;
filteringParams()
{
useSCV = 0;
doBeforeRANSAC = 1;
duplicateDist = 3.0;
mode = MODE_RANDOM;
}
};
struct parameters
{
std::string img1_fname;
std::string img2_fname;
std::string out1_fname;
std::string out2_fname;
std::string k1_fname;
std::string k2_fname;
std::string matchings_fname;
std::string log_fname;
std::string ground_truth_fname;
std::string config_fname;
std::string iters_fname;
int doCLAHE;
int det_type;
RANSAC_mode_t ver_type;
int tilt_numb;
int rot_numb;
double phi;
double zoom;
double initSigma;
char doBlur;
std::vector <double> tilt_set;
std::vector <double> scale_set;
int logOnly;
parameters()
{
config_fname="config_iter.ini";
iters_fname="iters.ini";
det_type = HESAFF;
ver_type = LORANSAC;
tilt_numb = 2;
phi = 72.;
rot_numb = 1;
zoom = 1.0;
initSigma = 0.5;
doBlur = 1;
logOnly = 1;
doCLAHE = 0;
// overlap_error = 0.04;
tilt_set.push_back(1.0);
scale_set.push_back(1.0);
}
};
struct logs
{
int TrueMatch;
int TrueMatch1st;
int TrueMatch1stRANSAC;
int Tentatives;
int Tentatives1st;
int Tentatives1stRANSAC;
double InlierRatio1st;
double InlierRatio1stRANSAC;
int OtherTrueMatch;
int OtherTrueMatch1st;
int OtherTrueMatch1stRANSAC;
double OtherInlierRatio1st;
double OtherInlierRatio1stRANSAC;
int OtherTentatives;
int OtherTentatives1st;
int OtherTentatives1stRANSAC;
int OrientReg1;
int OrientReg2;
int UnorientedReg1;
int UnorientedReg2;
double TotalArea;
int Syms;
double FinalTime;
int OverlapMatches;
int FinalStep;
RANSAC_mode_t VerifMode;
double densificationCoef;
logs()
{
TrueMatch = 0;
TrueMatch1st = 0;
TrueMatch1stRANSAC = 0;
Tentatives = 0;
Tentatives1st = 0;
Tentatives1stRANSAC = 0;
OtherTrueMatch = 0;
OtherTrueMatch1st = 0;
OtherTrueMatch1stRANSAC = 0;
OtherTentatives = 0;
OtherTentatives1st = 0;
OtherTentatives1stRANSAC = 0;
OrientReg1 = 0;
OrientReg2 = 0;
UnorientedReg1 = 0;
UnorientedReg2 = 0;
Syms = 0;
FinalTime = 0;
OverlapMatches = 0;
TotalArea = 1;
FinalStep=1;
densificationCoef = 1.0;
}
};
#endif // CONFIGURATION_HPP