@@ -59,6 +59,8 @@ using namespace std;
59
59
using namespace cv ;
60
60
using namespace cv ::reg;
61
61
62
+ #define REG_DEBUG_OUTPUT 0
63
+
62
64
63
65
class RegTest : public testing ::Test
64
66
{
@@ -91,10 +93,11 @@ void RegTest::testShift()
91
93
92
94
// Print result
93
95
MapShift* mapShift = dynamic_cast <MapShift*>(mapPtr.get ());
96
+ #if REG_DEBUG_OUTPUT
94
97
cout << endl << " --- Testing shift mapper ---" << endl;
95
98
cout << Mat (shift) << endl;
96
99
cout << Mat (mapShift->getShift ()) << endl;
97
-
100
+ # endif
98
101
// Check accuracy
99
102
Ptr<Map> mapInv (mapShift->inverseMap ());
100
103
mapTest.compose (*mapInv.get ());
@@ -123,12 +126,13 @@ void RegTest::testEuclidean()
123
126
124
127
// Print result
125
128
MapAffine* mapAff = dynamic_cast <MapAffine*>(mapPtr.get ());
129
+ #if REG_DEBUG_OUTPUT
126
130
cout << endl << " --- Testing Euclidean mapper ---" << endl;
127
131
cout << Mat (linTr) << endl;
128
132
cout << Mat (shift) << endl;
129
133
cout << Mat (mapAff->getLinTr ()) << endl;
130
134
cout << Mat (mapAff->getShift ()) << endl;
131
-
135
+ # endif
132
136
// Check accuracy
133
137
Ptr<Map> mapInv (mapAff->inverseMap ());
134
138
mapTest.compose (*mapInv.get ());
@@ -161,11 +165,13 @@ void RegTest::testSimilarity()
161
165
162
166
// Print result
163
167
MapAffine* mapAff = dynamic_cast <MapAffine*>(mapPtr.get ());
168
+ #if REG_DEBUG_OUTPUT
164
169
cout << endl << " --- Testing similarity mapper ---" << endl;
165
170
cout << Mat (linTr) << endl;
166
171
cout << Mat (shift) << endl;
167
172
cout << Mat (mapAff->getLinTr ()) << endl;
168
173
cout << Mat (mapAff->getShift ()) << endl;
174
+ #endif
169
175
170
176
// Check accuracy
171
177
Ptr<Map> mapInv (mapAff->inverseMap ());
@@ -195,11 +201,13 @@ void RegTest::testAffine()
195
201
196
202
// Print result
197
203
MapAffine* mapAff = dynamic_cast <MapAffine*>(mapPtr.get ());
204
+ #if REG_DEBUG_OUTPUT
198
205
cout << endl << " --- Testing affine mapper ---" << endl;
199
206
cout << Mat (linTr) << endl;
200
207
cout << Mat (shift) << endl;
201
208
cout << Mat (mapAff->getLinTr ()) << endl;
202
209
cout << Mat (mapAff->getShift ()) << endl;
210
+ #endif
203
211
204
212
// Check accuracy
205
213
Ptr<Map> mapInv (mapAff->inverseMap ());
@@ -230,9 +238,11 @@ void RegTest::testProjective()
230
238
// Print result
231
239
MapProjec* mapProj = dynamic_cast <MapProjec*>(mapPtr.get ());
232
240
mapProj->normalize ();
241
+ #if REG_DEBUG_OUTPUT
233
242
cout << endl << " --- Testing projective transformation mapper ---" << endl;
234
243
cout << Mat (projTr) << endl;
235
244
cout << Mat (mapProj->getProjTr ()) << endl;
245
+ #endif
236
246
237
247
// Check accuracy
238
248
Ptr<Map> mapInv (mapProj->inverseMap ());
0 commit comments