CMakeLists.txt 74.1 KB
Newer Older
1

Thomas Feuvrier's avatar
Thomas Feuvrier committed
2
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
3

4
5
6
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
7
8
SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)

Thomas Feuvrier's avatar
Thomas Feuvrier committed
9
#Tolerance de base
10
SET(NOTOL 0.0)
Romain Garrigues's avatar
nomsg    
Romain Garrigues committed
11

12
#Tolerance sur la difference des valeurs numeriques dans le --compare-ascii
13
14
SET(EPSILON_1 0.1)
SET(EPSILON_2 0.01)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
15
SET(EPSILON_3 0.001)
16

Thomas Feuvrier's avatar
Thomas Feuvrier committed
17
#Tolerance sur diff pixel image
18
#EPSILON est different de 0.0 pour les tests multiplateformes avec différentes options de compilation.
19
SET(EPSILON_6 0.000001)
20
SET(EPSILON_8 0.00000001)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
21

22
23
24
25
26
27
28
29
30
SET(FEATUREEXTRACTION_TESTS1 ${CXX_TEST_PATH}/otbFeatureExtractionTests1)
SET(FEATUREEXTRACTION_TESTS2 ${CXX_TEST_PATH}/otbFeatureExtractionTests2)
SET(FEATUREEXTRACTION_TESTS3 ${CXX_TEST_PATH}/otbFeatureExtractionTests3)
SET(FEATUREEXTRACTION_TESTS4 ${CXX_TEST_PATH}/otbFeatureExtractionTests4)
SET(FEATUREEXTRACTION_TESTS5 ${CXX_TEST_PATH}/otbFeatureExtractionTests5)
SET(FEATUREEXTRACTION_TESTS6 ${CXX_TEST_PATH}/otbFeatureExtractionTests6)
SET(FEATUREEXTRACTION_TESTS7 ${CXX_TEST_PATH}/otbFeatureExtractionTests7)
SET(FEATUREEXTRACTION_TESTS8 ${CXX_TEST_PATH}/otbFeatureExtractionTests8)
SET(FEATUREEXTRACTION_TESTS9 ${CXX_TEST_PATH}/otbFeatureExtractionTests9)
31
32
SET(FEATUREEXTRACTION_TESTS10 ${CXX_TEST_PATH}/otbFeatureExtractionTests10)
SET(FEATUREEXTRACTION_TESTS11 ${CXX_TEST_PATH}/otbFeatureExtractionTests11)
Cyrille Valladeau's avatar
Cyrille Valladeau committed
33
SET(FEATUREEXTRACTION_TESTS12 ${CXX_TEST_PATH}/otbFeatureExtractionTests12)
34
SET(FEATUREEXTRACTION_TESTS13 ${CXX_TEST_PATH}/otbFeatureExtractionTests13)
Cyrille Valladeau's avatar
MRG    
Cyrille Valladeau committed
35
SET(FEATUREEXTRACTION_TESTS14 ${CXX_TEST_PATH}/otbFeatureExtractionTests14)
Cyrille Valladeau's avatar
Cyrille Valladeau committed
36
SET(FEATUREEXTRACTION_TESTS15 ${CXX_TEST_PATH}/otbFeatureExtractionTests15)
37

38
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests1 ~~~~~~~~~~~~~~~~~~~~~
40
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41

42
ADD_TEST(feTvAlignMV2ITK ${FEATUREEXTRACTION_TESTS1}
43
   --compare-ascii ${EPSILON_3}     ${BASELINE_FILES}/feAlign.txt
44
                        ${TEMP}/feAlign.txt
45
        otbAlignImageToPath
46
	${INPUTDATA}/poupees.hdr
47
	${TEMP}/feAlign.txt)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
48
49

# -------            otb::Draw   ------------------------------
50
51

ADD_TEST(feTvDrawPathTestCarre ${FEATUREEXTRACTION_TESTS1}
52
  --compare-image ${NOTOL}  ${BASELINE}/feDrawPathDessinCarre.png
53
                          ${TEMP}/feDrawPathDessinCarre.png
Patrick Imbo's avatar
Patrick Imbo committed
54
55
56
        otbDrawPathDessinCarre
	${INPUTDATA}/DeuxTraits.png
	${TEMP}/feDrawPathDessinCarre.png)
Patrick Imbo's avatar
Patrick Imbo committed
57

58
ADD_TEST(feTvDrawPathTestAlign ${FEATUREEXTRACTION_TESTS1}
59
  --compare-image ${NOTOL}  ${BASELINE}/feDrawPathAlignDeuxTraits.png
60
                          ${TEMP}/feDrawPathAlignDeuxTraits.png
Patrick Imbo's avatar
Patrick Imbo committed
61
62
63
        otbDrawPathAlign
	${INPUTDATA}/DeuxTraits.png
	${TEMP}/feDrawPathAlignDeuxTraits.png)
64

65
ADD_TEST(feTvComplexMomentImage ${FEATUREEXTRACTION_TESTS1}
66
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feComplexMomentImage.txt
67
                        ${TEMP}/feComplexMomentImage.txt
Patrick Imbo's avatar
nomsg    
Patrick Imbo committed
68
        otbComplexMomentImage
69
	${INPUTDATA}/TeteAToto.png
70
71
72
73
74
  1
  1
  ${TEMP}/feComplexMomentImage.txt)

ADD_TEST(feTvHuImage ${FEATUREEXTRACTION_TESTS1}
75
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feHuImage.txt
76
                        ${TEMP}/feHuImage.txt
Patrick Imbo's avatar
Patrick Imbo committed
77
        otbHuImage
78
79
	${INPUTDATA}/TeteAToto.png
  ${TEMP}/feHuImage.txt)
Patrick Imbo's avatar
Patrick Imbo committed
80

81
ADD_TEST(feTuFlusserImage ${FEATUREEXTRACTION_TESTS1}
82
   --compare-ascii ${EPSILON_8}     ${BASELINE_FILES}/feFlusserImage.txt
83
                        ${TEMP}/feFlusserImage.txt
Patrick Imbo's avatar
Patrick Imbo committed
84
        otbFlusserImage
85
86
	${INPUTDATA}/TeteAToto.png
  ${TEMP}/feFlusserImage.txt)
87
88

ADD_TEST(feTuComplexMomentPathNew ${FEATUREEXTRACTION_TESTS1}
Patrick Imbo's avatar
Patrick Imbo committed
89
        otbComplexMomentPathNew)
90

91
ADD_TEST(feTvComplexMomentPath ${FEATUREEXTRACTION_TESTS1}
92
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feComplexMomentPath.txt
93
                        ${TEMP}/feComplexMomentPath.txt
94
        otbComplexMomentPath
95
96
97
98
99
  1
  1
  ${TEMP}/feComplexMomentPath.txt)

ADD_TEST(feTvComplexMomentPathFloat ${FEATUREEXTRACTION_TESTS1}
100
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feComplexMomentPathFloat.txt
101
102
103
104
105
                        ${TEMP}/feComplexMomentPathFloat.txt
        otbComplexMomentPathFloat
  1
  1
  ${TEMP}/feComplexMomentPathFloat.txt)
Patrick Imbo's avatar
Patrick Imbo committed
106

107
ADD_TEST(feTuHuPathNew ${FEATUREEXTRACTION_TESTS1}
Patrick Imbo's avatar
Patrick Imbo committed
108
        otbHuPathNew)
Patrick Imbo's avatar
Patrick Imbo committed
109

110
ADD_TEST(feTvHuPath ${FEATUREEXTRACTION_TESTS1}
111
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feHuPath.txt
112
113
114
                        ${TEMP}/feHuPath.txt
        otbHuPath
  ${TEMP}/feHuPath.txt)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
115

116
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests2 ~~~~~~~~~~~~~~~~~~~~~
118
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119

120
ADD_TEST(feTuFlusserPathNew ${FEATUREEXTRACTION_TESTS2}
Patrick Imbo's avatar
Patrick Imbo committed
121
122
        otbFlusserPathNew)

123
ADD_TEST(feTvFlusserPath ${FEATUREEXTRACTION_TESTS2}
124
   --compare-ascii ${NOTOL}     ${BASELINE_FILES}/feFlusserPath.txt
125
126
127
128
                        ${TEMP}/feFlusserPath.txt
        otbFlusserPath
  ${TEMP}/feFlusserPath.txt)

129

130
# -------            otb::OrientationPathFunction   ------------------------
131
132

ADD_TEST(feTuOrientationPathNew ${FEATUREEXTRACTION_TESTS2}
133
134
        otbOrientationPathNew)

135
ADD_TEST(feTuOrientationPath_000 ${FEATUREEXTRACTION_TESTS2}
136
137
        otbOrientationPath 0.0)

138
ADD_TEST(feTuOrientationPath_045 ${FEATUREEXTRACTION_TESTS2}
139
140
        otbOrientationPath 45.0)

141
ADD_TEST(feTuOrientationPath_090 ${FEATUREEXTRACTION_TESTS2}
142
143
        otbOrientationPath 90.0)

144
ADD_TEST(feTuOrientationPath1_80 ${FEATUREEXTRACTION_TESTS2}
145
        otbOrientationPath 180.0)
Patrick Imbo's avatar
Patrick Imbo committed
146

147
# -------            otb::CompacityPathFunction   ------------------------
148
149

ADD_TEST(feTuCompacityPathNew ${FEATUREEXTRACTION_TESTS2}
150
151
        otbCompacityPathNew)

152
ADD_TEST(feTuCompacityPathCircle ${FEATUREEXTRACTION_TESTS2}
153
154
        otbCompacityPathCircle 1000)

155
ADD_TEST(feTuCompacityPathSquare ${FEATUREEXTRACTION_TESTS2}
156
157
        otbCompacityPathSquare 10.0)

158
ADD_TEST(feTuCompacityPathRectangle ${FEATUREEXTRACTION_TESTS2}
159
        otbCompacityPathRectangle 10.0  20.0)
160
161

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests3 ~~~~~~~~~~~~~~~~~~~~~
163
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
165


Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
166
167
# -------            otb::TouziEdgeDetector   ------------------------------

168
ADD_TEST(feTuTouziNew ${FEATUREEXTRACTION_TESTS3}
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
169
        otbTouziEdgeDetectorNew)
170

171
ADD_TEST(feTvTouzi ${FEATUREEXTRACTION_TESTS3}
172
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreTouzi_amst_3.hdr
173
                          ${TEMP}/feFiltreTouzi_amst_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
174
        otbTouziEdgeDetector
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
175
	${INPUTDATA}/amst.png
176
	${TEMP}/feFiltreTouzi_amst_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
177
	3)
178

179
ADD_TEST(feTvTouziDir ${FEATUREEXTRACTION_TESTS3}
180
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreTouzi_amst_dir_3.hdr
181
                          ${TEMP}/feFiltreTouzi_amst_dir_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
182
        otbTouziEdgeDetectorDirection
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
183
	${INPUTDATA}/amst.png
184
	${TEMP}/feFiltreTouzi_amst_dir_3.hdr
185
	3)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
186

187
188
# -------            otb::LineDetectorBase   ------------------------------

189
ADD_TEST(feTuLineDetectorBaseNew ${FEATUREEXTRACTION_TESTS3}
190
        otbLineDetectorBaseNew)
191

192
# -------            otb::LineCorrelationDetector   ------------------------------
193
194

ADD_TEST(feTuLineCorrelationNew ${FEATUREEXTRACTION_TESTS3}
195
        otbLineCorrelationDetectorNew)
196
197

ADD_TEST(feTvLineCorrelationLinear ${FEATUREEXTRACTION_TESTS3}
198
  --compare-n-images ${EPSILON_8} 2
199
			  ${BASELINE}/feFiltreLineCorrelationLinear_amst_2_3.hdr
200
                          ${TEMP}/feFiltreLineCorrelationLinear_amst_2_3.hdr
201
202
			  ${BASELINE}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
                          ${TEMP}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
203
204
        otbLineCorrelationDetectorLinear
	${INPUTDATA}/amst.png
205
	${TEMP}/feFiltreLineCorrelationLinear_amst_2_3.hdr
206
	${TEMP}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
207
	2 3)
208
209

ADD_TEST(feTvLineCorrelation ${FEATUREEXTRACTION_TESTS3}
210
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreLineCorrelation_amst_2_3.hdr
211
212
213
214
215
                          ${TEMP}/feFiltreLineCorrelation_amst_2_3.hdr
        otbLineCorrelationDetector
	${INPUTDATA}/amst.png
	${TEMP}/feFiltreLineCorrelation_amst_2_3.hdr
	2 3)
216

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
217
218
# -------            otb::LineRatioDetector   ------------------------------

219
ADD_TEST(feTuLineRatioNew ${FEATUREEXTRACTION_TESTS3}
220
        otbLineRatioDetectorNew)
221
222

ADD_TEST(feTvLineRatioLinear ${FEATUREEXTRACTION_TESTS3}
223
  --compare-n-images ${EPSILON_8} 2
224
225
226
227
228
229
230
231
232
			  ${BASELINE}/feFiltreLineRatioLinear_amst_2_3.hdr
                          ${TEMP}/feFiltreLineRatioLinear_amst_2_3.hdr
			  ${BASELINE}/feFiltreLineRatioLinear_amst_dir_2_3.hdr
                          ${TEMP}/feFiltreLineRatioLinear_amst_dir_2_3.hdr
        otbLineRatioDetectorLinear
	${INPUTDATA}/amst.png
	${TEMP}/feFiltreLineRatioLinear_amst_2_3.hdr
	${TEMP}/feFiltreLineRatioLinear_amst_dir_2_3.hdr
	2 3)
233
234

ADD_TEST(feTvLineRatioLinearAmsters1 ${FEATUREEXTRACTION_TESTS3}
235
  --compare-n-images ${EPSILON_8} 2
236
237
238
239
240
241
242
243
244
			  ${BASELINE}/feFiltreLineRatioLinear_amst_ers1_ima_extrait.hdr
                          ${TEMP}/feFiltreLineRatioLinear_amst_ers1_ima_extrait.hdr
			  ${BASELINE}/feFiltreLineRatioLinear_amst_dir_ers1_ima_extrait.hdr
			  ${TEMP}/feFiltreLineRatioLinear_amst_dir_ers1_ima_extrait.hdr
        otbLineRatioDetectorLinear
	${INPUTDATA}/amst_ers1.ima.extrait.419_187_70_66.hdr
	${TEMP}/feFiltreLineRatioLinear_amst_ers1_ima_extrait.hdr
	${TEMP}/feFiltreLineRatioLinear_amst_dir_ers1_ima_extrait.hdr
	1 2)
245
246

ADD_TEST(feTvLineRatio ${FEATUREEXTRACTION_TESTS3}
247
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreLineRatio_amst_2_3.hdr
248
249
250
251
252
                          ${TEMP}/feFiltreLineRatio_amst_2_3.hdr
        otbLineRatioDetector
	${INPUTDATA}/amst.png
	${TEMP}/feFiltreLineRatio_amst_2_3.hdr
	2 3)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
253
254


255
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
256
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests4 ~~~~~~~~~~~~~~~~~~~~~
257
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
258

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
259
# -------            otb::AssociativeSymmetricalSum   ------------------------------
260
261

ADD_TEST(feTuAssociativeSymmetricalSumNew ${FEATUREEXTRACTION_TESTS4}
262
        otbAssociativeSymmetricalSumNew)
263
264

ADD_TEST(feTvAssociativeSymmetricalSum ${FEATUREEXTRACTION_TESTS4}
265
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreASS_amst_2_3.hdr
266
267
                          ${TEMP}/feFiltreASS_amst_2_3.hdr
        otbAssociativeSymmetricalSum
Julien Michel's avatar
Julien Michel committed
268
269
        ${BASELINE}/feFiltreLineRatioLinear_amst_2_3.hdr
        ${BASELINE}/feFiltreLineCorrelationLinear_amst_2_3.hdr
270
        ${TEMP}/feFiltreASS_amst_2_3.hdr)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
271
272

# -------            otb::AssymmetricFusionOfLineDetector   ------------------------------
273
274

ADD_TEST(feTuAssymmetricFusionOfLineDetectorNew ${FEATUREEXTRACTION_TESTS4}
275
        otbAssymmetricFusionOfLineDetectorNew)
276

277
ADD_TEST(feTlAssymmetricFusionOfLineDetector ${FEATUREEXTRACTION_TESTS4}
278
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreAssymmetricFusion_amst_2_3.hdr
279
280
281
282
283
                          ${TEMP}/feFiltreAssymmetricFusion_amst_2_3.hdr
        otbAssymmetricFusionOfLineDetector
	${INPUTDATA}/amst.png
	${TEMP}/feFiltreAssymmetricFusion_amst_2_3.hdr
	2 3)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
284
285

# -------            otb::HarrisImage   ------------------------------
286
287

ADD_TEST(feTvHarrisImage ${FEATUREEXTRACTION_TESTS4}
288
  --compare-image ${NOTOL}  ${BASELINE}/feHarrisImage.png
289
                          ${TEMP}/feHarrisImage.png
290
        otbHarrisImage
Patrick Imbo's avatar
Patrick Imbo committed
291
292
293
	${INPUTDATA}/TeteAToto.png
	${TEMP}/feHarrisImage.png
	1.0 2.0 0.0)
Patrick Imbo's avatar
Patrick Imbo committed
294

295
ADD_TEST(feTvHarrisPoupee ${FEATUREEXTRACTION_TESTS4}
296
  --compare-image ${NOTOL}  ${BASELINE}/feHarris_poupees.png
297
                          ${TEMP}/feHarris_poupees.png
298
        otbHarrisImage
299
	${INPUTDATA}/poupees_1canal.c1.hdr
Patrick Imbo's avatar
Patrick Imbo committed
300
301
	${TEMP}/feHarris_poupees.png
	1.0 1.0 1.0)
Patrick Imbo's avatar
Patrick Imbo committed
302

303
ADD_TEST(feTvMultiplyByScalarImage ${FEATUREEXTRACTION_TESTS4}
Patrick Imbo's avatar
Patrick Imbo committed
304
305
         otbMultiplyByScalarImageFilterTest)

306
307
308
309
310
ADD_TEST(feTuThresholdImageToPointSetFilterNew ${FEATUREEXTRACTION_TESTS4}
         otbThresholdImageToPointSetFilterNew
)


311
ADD_TEST(feTuThresholdImageToPointSet1 ${FEATUREEXTRACTION_TESTS4}
312
  --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To255.txt
313
                   ${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
314
        otbThresholdImageToPointSetTest
315
316
317
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
	0 255 )
318
ADD_TEST(feTuThresholdImageToPointSet2 ${FEATUREEXTRACTION_TESTS4}
319
  --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To0.txt
320
                   ${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
321
        otbThresholdImageToPointSetTest
322
323
324
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
	0 0 )
325
ADD_TEST(feTuThresholdImageToPointSet3 ${FEATUREEXTRACTION_TESTS4}
326
  --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_255To255.txt
327
                   ${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
328
        otbThresholdImageToPointSetTest
329
330
331
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
	255 255 )
332
ADD_TEST(feTuThresholdImageToPointSet4 ${FEATUREEXTRACTION_TESTS4}
333
  --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_1To200.txt
334
                   ${TEMP}/feThresholdImageToPointSet_Threshold_1To200.txt
335
        otbThresholdImageToPointSetTest
336
337
338
339
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_1To200.txt
	1 200 )

340
341
ADD_TEST(feTvHarrisProduceImageToValidHarrisToPointSet ${FEATUREEXTRACTION_TESTS4}
        otbHarrisImage
342
343
344
	${INPUTDATA}/small_points.hdr
	${TEMP}/small_points_harris.hdr
	1.0 1.0 1.0)
Patrick Imbo's avatar
Patrick Imbo committed
345

346
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests5 ~~~~~~~~~~~~~~~~~~~~~
348
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349

350
ADD_TEST(feTvHarrisToPointSet1 ${FEATUREEXTRACTION_TESTS5}
351
  --compare-ascii ${EPSILON_3}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_2To255.txt
352
                                ${TEMP}/feHarrisToPointSet_Threshold_2To255.txt
353
        otbHarrisToPointSet
354
355
356
	${INPUTDATA}/small_points.hdr
	${TEMP}/feHarrisToPointSet_Threshold_2To255.txt
	1.0 1.0 1.0 2.0 255.0)
357
ADD_TEST(feTvHarrisToPointSet2 ${FEATUREEXTRACTION_TESTS5}
358
  --compare-ascii ${EPSILON_3}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_20To90.txt
359
                                ${TEMP}/feHarrisToPointSet_Threshold_20To90.txt
360
        otbHarrisToPointSet
361
362
363
	${INPUTDATA}/small_points.hdr
	${TEMP}/feHarrisToPointSet_Threshold_20To90.txt
	1.0 1.0 1.0 20 90)
364
ADD_TEST(feTvHarrisToPointSet3 ${FEATUREEXTRACTION_TESTS5}
365
  --compare-ascii ${EPSILON_3}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_100To160.txt
366
                                ${TEMP}/feHarrisToPointSet_Threshold_100To160.txt
367
        otbHarrisToPointSet
368
369
370
	${INPUTDATA}/small_points.hdr
	${TEMP}/feHarrisToPointSet_Threshold_100To160.txt
	1.0 1.0 1.0 100 160)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
371
372

# -------            otb::PixelSuppressionByDirection   ------------------------------
373
374

ADD_TEST(feTuPixelSuppressionByDirectionNew ${FEATUREEXTRACTION_TESTS5}
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
375
        otbPixelSuppressionByDirectionNew)
376

377
ADD_TEST(feTvPixelSuppressionByDirection ${FEATUREEXTRACTION_TESTS5}
378
  --compare-image ${NOTOL}  ${BASELINE}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
379
                          ${TEMP}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
380
        otbPixelSuppressionByDirection
381
382
383
	${INPUTDATA}/ImageLine_hd.bsq.hdr
	${INPUTDATA}/ImageLineDir.bsq.hdr
	${TEMP}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
384
	2 0.3)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
385
386
387

# -------            otb::LocalHough   ------------------------------

388
ADD_TEST(feTuLocalHoughNew ${FEATUREEXTRACTION_TESTS5}
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
389
390
        otbLocalHoughNew)

391

392
ADD_TEST(feTvLocalHough ${FEATUREEXTRACTION_TESTS5}
393
  --compare-ascii ${EPSILON_3}  ${BASELINE_FILES}/feTvLocaLHoughLinesDetected.txt
394
395
396
397
                                ${TEMP}/feTvLocaLHoughLinesDetected.txt
        otbLocalHough
	${INPUTDATA}/ImageLine.bsq.hdr
	${TEMP}/feTvLocaLHoughLinesDetected.txt
398
	20 20 1)
399

400
ADD_TEST(feTvLocalHoughDraw ${FEATUREEXTRACTION_TESTS5}
401
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
402
                          ${TEMP}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
403
        otbLocalHoughDraw
404
405
	${INPUTDATA}/ImageLine.bsq.hdr
	${TEMP}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
406
	20 20 1)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
407

408
ADD_TEST(feTlLocalHoughDraw2 ${FEATUREEXTRACTION_TESTS5}
409
  --compare-image ${EPSILON_8}  ${BASELINE}/feFilterLocalHoughDraw_amst_20_20_1.png
410
411
412
413
                          ${TEMP}/feFilterLocalHoughDraw_amst_20_20_1.png
        otbLocalHoughDraw
	${INPUTDATA}/amst.png
	${TEMP}/feFilterLocalHoughDraw_amst_20_20_1.png
414
	20 20 1)
415
416


417
ADD_TEST(feTvLocalHoughDrawBis ${FEATUREEXTRACTION_TESTS5}
418
  --compare-image ${EPSILON_8}  ${BASELINE}/feFiltreLocalHoughDraw_Line_20_10_2.png
419
                   ${TEMP}/feFiltreLocalHoughDraw_Line_20_10_2.png
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
420
        otbLocalHoughDraw
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
421
422
	${INPUTDATA}/Line.png
	${TEMP}/feFiltreLocalHoughDraw_Line_20_10_2.png
423
	20 10 2)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
424

425
426
427
# -------            otb::FillGapsFilter   ------------------------------

ADD_TEST(feTuFillGapsFilterNew ${FEATUREEXTRACTION_TESTS5}
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
428
        otbFillGapsFilterNew)
429

430
ADD_TEST(feTvFillGapsFilter ${FEATUREEXTRACTION_TESTS5}
431
	  --compare-image ${EPSILON_8}
432
433
434
435
436
	       ${BASELINE}/feTvFillGapfilter.png
               ${TEMP}/feTvFillGapfilter.png
        otbFillGapsFilter
	       ${INPUTDATA}/ImageLine.bsq.hdr
	       ${TEMP}/feTvFillGapfilter.png)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
437

438
# -------            otb::HoughTransform2DLinesImageTest ------------------------------
439

440
ADD_TEST(feTvHoughTransform2DLinesImage ${FEATUREEXTRACTION_TESTS5}
441
  --compare-image ${EPSILON_8}
442
443
444
445
		  ${BASELINE}/feFilterHoughTransformDraw.tif
	          ${TEMP}/feFilterHoughTransformDraw.tif
        otbHoughTransform2DLinesImageTest
	${TEMP}/feFilterHoughTransformDraw.tif
446
	)
447
448


449
450
451
# -------            otb::ImageToModulusAndDirectionImageFilter   ------------------------------
# -------            otb::ModulusAndDirectionImageToImageFilter   ------------------------------

452
ADD_TEST(feTuModulusAndDirectionImageFiltersNew ${FEATUREEXTRACTION_TESTS5}
453
454
        otbModulusAndDirectionImageFiltersNew)

455

456
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
457
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests6 ~~~~~~~~~~~~~~~~~~~~~
458
459
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
460
461
# -------            otb::ExtractSegments   ------------------------------

462
ADD_TEST(feTuExtractSegmentsNew ${FEATUREEXTRACTION_TESTS6}
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
463
        otbExtractSegmentsNew)
464
465

ADD_TEST(feTvExtractSegments ${FEATUREEXTRACTION_TESTS6}
466
  --compare-image ${NOTOL}  ${BASELINE}/feFiltreExtractSegments_ImageLine.hdr
467
                          ${TEMP}/feFiltreExtractSegments_ImageLine.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
468
        otbExtractSegments
469
470
	${INPUTDATA}/ImageLine_hd.bsq.hdr
	${INPUTDATA}/ImageLineDir.bsq.hdr
471
	${TEMP}/feFiltreExtractSegments_ImageLine.hdr
472
	10  0.3 10 10 3 10 0.5)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
473

474
475
# -------            otb::ForwardFourierMellinTransformImageFilter   -------------

476
477
#ADD_TEST(feTuForwardFourierMellinImageFilterNew ${FEATUREEXTRACTION_TESTS6}
#         otbFourierMellinImageFilterNew)
478

479
#ADD_TEST(feTuForwardFourierMellinImageFilterCroix ${FEATUREEXTRACTION_TESTS6}
480
# --compare-n-images ${NOTOL} 2
481
482
483
484
485
486
487
488
489
490
#		    ${BASELINE}/feFourierMellinCroixOutputModulus.hdr
#		    ${TEMP}/feFourierMellinCroixOutputModulus.hdr
#		    ${BASELINE}/feFourierMellinCroixOutputPhase.hdr
#		    ${TEMP}/feFourierMellinCroixOutputPhase.hdr
#        otbFourierMellinImageFilter
#        ${INPUTDATA}/TestFFT.hdr
#	${TEMP}/feFourierMellinCroixOutputModulus.hdr
#	${TEMP}/feFourierMellinCroixOutputPhase.hdr
#)

491
#ADD_TEST(feTuForwardFourierMellinImageFilter3Croix ${FEATUREEXTRACTION_TESTS6}
492
#   --compare-n-images   ${NOTOL} 2
493
494
495
496
497
498
499
500
501
#			${BASELINE}/feFourierMellin3CroixOutputModulus.hdr
#                        ${TEMP}/feFourierMellin3CroixOutputModulus.hdr
#			${BASELINE}/feFourierMellin3CroixOutputPhase.hdr
#                        ${TEMP}/feFourierMellin3CroixOutputPhase.hdr
#    otbFourierMellinImageFilter
#        ${INPUTDATA}/TestFFT3Croix.hdr
#	${TEMP}/feFourierMellin3CroixOutputModulus.hdr
#	${TEMP}/feFourierMellin3CroixOutputPhase.hdr
#)
502

503
ADD_TEST(feTvForwardFourierMellinImageFilter ${FEATUREEXTRACTION_TESTS6}
504
  --compare-n-images ${EPSILON_8} 2
505
506
507
508
		     ${BASELINE}/feForwardFourierMellinImageFilterReal.hdr
                     ${TEMP}/feForwardFourierMellinImageFilterReal.hdr
		     ${BASELINE}/feForwardFourierMellinImageFilterImag.hdr
                     ${TEMP}/feForwardFourierMellinImageFilterImag.hdr
509
        otbFourierMellinImageFilter
510
        ${INPUTDATA}/circle.hdr
511
512
	${TEMP}/feForwardFourierMellinImageFilterReal.hdr
	${TEMP}/feForwardFourierMellinImageFilterImag.hdr)
513

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
514
# -----------------------------------------------------------------------
515
516
# -------            otb::ImageToEdgePathFilter   -------------

517
518
ADD_TEST(feTuImageToEdgePathFilterNew ${FEATUREEXTRACTION_TESTS6}
         otbImageToEdgePathFilterNew)
519

520
ADD_TEST(feTvImageToEdgePathFilter ${FEATUREEXTRACTION_TESTS6}
521
  --compare-image ${EPSILON_8}
522
523
524
525
526
527
528
		     ${BASELINE}/feImageToEdgePathFilter_rcc8_mire4.png
             ${TEMP}/feImageToEdgePathFilter_rcc8_mire4.png
        otbImageToEdgePathFilter
        ${INPUTDATA}/rcc8_mire4.png
        ${TEMP}/feImageToEdgePathFilter_rcc8_mire4.png
        255
        )
529
ADD_TEST(feTvImageToEdgePathFilterBis ${FEATUREEXTRACTION_TESTS6}
530
  --compare-image ${EPSILON_8}
531
532
533
534
535
536
537
		     ${BASELINE}/feImageToEdgePathFilter_maskrom.png
             ${TEMP}/feImageToEdgePathFilter_maskrom.png
        otbImageToEdgePathFilter
        ${INPUTDATA}/maskrom.png
        ${TEMP}/feImageToEdgePathFilter_maskrom.png
        0
        )
538
539
540
# -------            otb::NeighborhoodScalarProductFilter   -------------


541
542
ADD_TEST(feTuNeighborhoodScalarProductFilterNew ${FEATUREEXTRACTION_TESTS6}
         otbNeighborhoodScalarProductFilterNew)
543

544
ADD_TEST(feTvNeighborhoodScalarProductFilter ${FEATUREEXTRACTION_TESTS6}
545
  --compare-n-images ${EPSILON_6} 2
Julien Michel's avatar
Julien Michel committed
546
547
548
549
		      ${BASELINE}/feTvNeigborhoodScalarProductModulusOutput.hdr
		      ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
		      ${BASELINE}/feTvNeigborhoodScalarProductDirectionOutput.hdr
		      ${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
550
        otbNeighborhoodScalarProductFilter
551
        ${INPUTDATA}/InputForRoadDetection_SpectralAngle.hdr
552
553
        ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
	${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
554
        1.0
555
        )
556

557
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
558
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests7 ~~~~~~~~~~~~~~~~~~~~~
559
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
560

561
562
# -------            otb::RemoveIsolatedByDirectionFilter   -------------

563
564
ADD_TEST(feTuRemoveIsolatedByDirectionFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbRemoveIsolatedByDirectionFilterNew)
565

566
ADD_TEST(feTvRemoveIsolatedByDirectionFilter ${FEATUREEXTRACTION_TESTS7}
567
  --compare-image ${EPSILON_8}
568
569
570
		      ${BASELINE}/feTvRemoveIsolatedByDirectionOutput.hdr
		      ${TEMP}/feTvRemoveIsolatedByDirectionOutput.hdr
        otbRemoveIsolatedByDirectionFilter
571
572
       ${INPUTDATA}/InputForRoadDetectionScalarProductMod.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
573
574
575
576
577
       ${TEMP}/feTvRemoveIsolatedByDirectionOutput.hdr
        )

# -------            otb::RemoveWrongDirectionFilter   -------------

578
579
ADD_TEST(feTuRemoveWrongDirectionFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbRemoveWrongDirectionFilterNew)
580

581
ADD_TEST(feTvRemoveWrongDirectionFilter ${FEATUREEXTRACTION_TESTS7}
582
  --compare-image ${EPSILON_8}
583
584
585
		      ${BASELINE}/feTvRemoveWrongDirectionOutput.hdr
		      ${TEMP}/feTvRemoveWrongDirectionOutput.hdr
        otbRemoveWrongDirectionFilter
586
587
       ${INPUTDATA}/InputForRoadDetection_IsolatedRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
588
589
590
591
592
       ${TEMP}/feTvRemoveWrongDirectionOutput.hdr
        )

# -------            otb::NonMaxRemovalByDirectionFilter   -------------

593
594
ADD_TEST(feTuNonMaxRemovalByDirectionFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbNonMaxRemovalByDirectionFilterNew)
595

596
ADD_TEST(feTvNonMaxRemovalByDirectionFilter ${FEATUREEXTRACTION_TESTS7}
597
  --compare-image ${EPSILON_8}
598
599
600
		      ${BASELINE}/feTvNonMaxRemovalByDirectionOutput.hdr
		      ${TEMP}/feTvNonMaxRemovalByDirectionOutput.hdr
        otbNonMaxRemovalByDirectionFilter
601
602
       ${INPUTDATA}/InputForRoadDetection_WrongRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
603
604
605
       ${TEMP}/feTvNonMaxRemovalByDirectionOutput.hdr
        )

606
607
# -------            otb::VectorizationPathListFilter   -------------

608
609
ADD_TEST(feTuVectorizationPathListFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbVectorizationPathListFilterNew)
610

611
ADD_TEST(feTvVectorizationPathListFilterAsciiOutput ${FEATUREEXTRACTION_TESTS7}
612
--compare-ascii ${EPSILON_3}
613
614
615
		${BASELINE_FILES}/feTvVectorizationPathListOutput.txt
		${TEMP}/feTvVectorizationPathListOutput.txt
        otbVectorizationPathListFilter
616
617
       ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
618
       ${TEMP}/feTvVectorizationPathListOutput.txt
619
620
       ${TEMP}/feTvVectorizationPathListOutput.png
       0.0005
621
622
        )

623
ADD_TEST(feTvVectorizationPathListFilterImageOutput ${FEATUREEXTRACTION_TESTS7}
624
--compare-image ${EPSILON_8}
625
626
627
		${BASELINE}/feTvVectorizationPathListOutput.png
		${TEMP}/feTvVectorizationPathListOutput.png
        otbVectorizationPathListFilter
628
629
       ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
630
631
       ${TEMP}/feTvVectorizationPathListOutput.txt
       ${TEMP}/feTvVectorizationPathListOutput.png
632
       0.0001
633
        )
634

635
636
# -------            otb::SimplifyPathFilter   -------------

637
638
ADD_TEST(feTuSimplifyPathListFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbSimplifyPathListFilterNew)
639

640
ADD_TEST(feTvSimplifyPathListFilter ${FEATUREEXTRACTION_TESTS7}
641
--compare-ascii ${EPSILON_3}
642
643
		${BASELINE_FILES}/feTvSimplifyPathOutput.txt
		${TEMP}/feTvSimplifyPathOutput.txt
644
        otbSimplifyPathListFilter
645
646
647
648
649
650
651
652
	${TEMP}/feTvSimplifyPathOutput.txt
         1.0
         1 1   5  1  7  1  11  1  21  1  31  1 |
         1 1   5  1  7  1  11  1  21 11  31 11 |
         1 1   5  5  7  7  11 11  21 21  31 31 41 41 |
         1 1   5  1  7  1  11  1  21 11  31 11 41 11 58 11 70 11
        )

653
654
# -------            otb::BreakAngularPathListFilter   -------------

655
656
ADD_TEST(feTuBreakAngularPathListFilterNew ${FEATUREEXTRACTION_TESTS7}
         otbBreakAngularPathListFilterNew)
657

658
ADD_TEST(feTvBreakAngularPathListFilter ${FEATUREEXTRACTION_TESTS7}
659
--compare-ascii ${NOTOL}  ${BASELINE_FILES}/feBreakAngularPathListOutput.txt
Thomas Feuvrier's avatar
Thomas Feuvrier committed
660
         				${TEMP}/feBreakAngularPathListOutput.txt
661
         otbBreakAngularPathListFilter
Thomas Feuvrier's avatar
Thomas Feuvrier committed
662
663
         ${TEMP}/feBreakAngularPathListOutput.txt
         10 20 30 50 90 140 180 |
664
665
666
         1 1  5 1  7 1  11 1  21 1  31 1 |
         1 1  5 1  7 1  11 1  21 11  31 11 |
         1 1  5 1  7 1  11 1  21 11  31 11 41 11  |
Thomas Feuvrier's avatar
Thomas Feuvrier committed
667
668
669
670
         1 1  5 1  7 1  11 1  21 11  31 11 41 11 58 11 70 11 |
         1 11  5 11  7 11  11 11  21 1  31 1 41 1 |
         1 1  5 1  7 1  11 1  21 11  31 21 41 31  |
         1 1  5 1  5 11  5 21 |
671
672
         1 1  31 1 41 1
         )
673

674
675


676
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
677
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests8 ~~~~~~~~~~~~~~~~~~~~~
678
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
679

680
# -------            otb::RemoveTortuousPathListFilter   -------------
681

682
683
ADD_TEST(feTuRemoveTortuousPathListFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbRemoveTortuousPathListFilterNew)
684

685
ADD_TEST(feTvRemoveTortuousPathListFilter ${FEATUREEXTRACTION_TESTS8}
686
--compare-ascii ${EPSILON_3}
687
688
		${BASELINE_FILES}/feTvRemoveTortuousPathOutput.txt
		${TEMP}/feTvRemoveTortuousPathOutput.txt
689
        otbRemoveTortuousPathListFilter
690
691
	${TEMP}/feTvRemoveTortuousPathOutput.txt
         10.0
692
         1 1   1 11  |
693
694
695
696
         1 1   5  1  7  1  11  1  |
         1 1   7  7 21 21  31 31 41 41 |
         1 1   5  1  7  1  11  1  21 11  31 11 41 11 58 11 70 11
        )
697

698
# -------            otb::LinkPathListFilter   -------------
699

700
701
ADD_TEST(feTuLinkPathListFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbLinkPathListFilterNew)
702

703

704
ADD_TEST(feTvLinkPathListFilter ${FEATUREEXTRACTION_TESTS8}
705
--compare-ascii ${EPSILON_3}
706
707
		${BASELINE_FILES}/feTvLinkPathOutput.txt
		${TEMP}/feTvLinkPathOutput.txt
708
        otbLinkPathListFilter
709
710
711
712
713
714
715
716
717
718
719
720
721
	${TEMP}/feTvLinkPathOutput.txt
         30  40
	  1 1 51 1 |
	 61 1 91 1 |
	111 11 211 11 |
	  1 51 51 51 |
	 71 71 71 91 |
	 71 131 71 201 |
	 141 111 101 111 |
	 151 111 191 111 |
	 111  71 141  71 |
	 181  71 151  71 |
	  11 131  11 101 |
722
	  11 171  11 141
723
        )
724

725
# -------            otb::LikelihoodPathListFilter   -------------
726

727
728
ADD_TEST(feTuLikelihoodPathListFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbLikelihoodPathListFilterNew)
729

730
ADD_TEST(feTvLikelihoodPathListFilter ${FEATUREEXTRACTION_TESTS8}
731
--compare-ascii ${EPSILON_3}
732
733
734
		${BASELINE_FILES}/feTvLikelihoodPathOutput.txt
		${TEMP}/feTvLikelihoodPathOutput.txt
        otbLikelihoodPathListFilter
735
	${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
736
	${TEMP}/feTvLikelihoodPathOutput.txt
737
738
	157 335 204 376 |
	21 305 35 308 77 354 85 358 |
739
	73 160 126 173
740
741
        )

Jordi Inglada's avatar
Jordi Inglada committed
742
743
# -------            otb::ParallelLinePathListFilter   -------------

744
ADD_TEST(feTuParallelLinePathListFilterNew ${FEATUREEXTRACTION_TESTS8}
745
746
         otbParallelLinePathListFilterNew)

747
748
749
ADD_TEST(feTvParallelLinePathListFilter ${FEATUREEXTRACTION_TESTS8}
         otbParallelLinePathListFilter)

750

751
752
# -------            otb::RoadExtractionFilter   -------------

753
754
ADD_TEST(feTuRoadExtractionFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbRoadExtractionFilterNew)
755

756
ADD_TEST(feTvRoadExtractionFilter ${FEATUREEXTRACTION_TESTS8}
757
       --compare-image ${EPSILON_8}
758
759
760
		${BASELINE}/feTvOutputRoadDetection.hdr
		${TEMP}/feTvOutputRoadDetection.hdr
	 otbRoadExtractionFilter
761
		 ${INPUTDATA}/qb_RoadExtract.img.hdr
762
                 ${TEMP}/feTvOutputRoadDetection.hdr
763
         337 557 432 859  # ReferencePixel
764
765
766
767
         1.0              # Alpha
         0.00005          # AmplitudeThreshold
         1.0              # Tolerance
         22.5             # (degre) MaxAngle (3.14159265358979323846/8.)
768
769
         1.0              # FirstMeanDistanceThreshold
         10.0             # SecondMeanDistanceThreshold
770
771
         25.	          # DistanceThreshold for LinkPathFiler
         22.5	          # AngularThreshold for LinkPathFiler
772
         )
773

774
# -------            otb::AddCarvingPathFilter   -------------
775
776
777
ADD_TEST(feTuAddCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbAddCarvingPathFilterNew)

778
779

# -------            otb::RemoveCarvingPathFilter   -------------
780
781
ADD_TEST(feTuRemoveCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbRemoveCarvingPathFilterNew)
782
783

# -------            otb::ImageToCarvingPathFilter   -------------
784
785
786
787
ADD_TEST(feTuImageToCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8}
         otbImageToCarvingPathFilterNew)

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
788
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTest9 ~~~~~~~~~~~~~~~~~~~~~~
789
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
790
791
792
793


# -------            otb::ImageToSIFTKeyPointSetFilter   -------------

794
ADD_TEST(feTuImageToSIFTKeyPointSetFilterNew ${FEATUREEXTRACTION_TESTS9}
795
796
         otbImageToSIFTKeyPointSetFilterNew)

797

798
ADD_TEST(feTlImageToSIFTKeyPointSetFilterDistanceMap ${FEATUREEXTRACTION_TESTS9}
799
#--compare-ascii ${EPSILON_3}
800
801
802
803
804
805
806
807
808
        #${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterDistanceMap.txt
        #${TEMP}/feTvImageToSIFTKeyPointSetFilterDistanceMap.txt
         otbImageToSIFTKeyPointSetFilterDistanceMap
        ${INPUTDATA}/scene.png
        6 3 0.08 10.0
        15.0 # rotation
        1.2 # zoom factor
        10 255
)
809
810

ADD_TEST(feTvImageToSIFTKeyPointSetFilterSceneOutputInterestPointAscii ${FEATUREEXTRACTION_TESTS9}
811
--ignore-order --compare-ascii ${EPSILON_3}
812
813
814
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutputInterestPoint.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutputInterestPoint.txt
         otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii
815
		${INPUTDATA}/scene.png
816
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutputInterestPoint.txt
817
		6 3 0.08 10.0
818
819
)