CMakeLists.txt 37.2 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
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
10
SET(TOL 0.0)
Romain Garrigues's avatar
nomsg    
Romain Garrigues committed
11

12
13
14
#Tolerance sur la difference des valeurs numeriques dans le --compare-ascii
SET(EPS 0.001)

Thomas Feuvrier's avatar
Thomas Feuvrier committed
15
#Tolerance sur diff pixel image
16
#EPSILON est different de 0.0 pour les tests multiplateformes avec différentes options de compilation.
Julien Michel's avatar
Julien Michel committed
17
SET(EPSILON 0.00000001)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests1 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

ADD_TEST(feTvAlignMV2ITK ${FEATUREEXTRACTION_TESTS1}  
35
   --compare-ascii ${EPS}     ${BASELINE_FILES}/feAlign.txt
36
                        ${TEMP}/feAlign.txt
37
        otbAlignImageToPath 
38
	${INPUTDATA}/poupees.hdr
39
	${TEMP}/feAlign.txt)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
40
41

# -------            otb::Draw   ------------------------------
Patrick Imbo's avatar
nomsg    
Patrick Imbo committed
42
		
43
ADD_TEST(feTvDrawPathTestCarre ${FEATUREEXTRACTION_TESTS1}  
44
45
  --compare-image ${TOL}  ${BASELINE}/feDrawPathDessinCarre.png
                          ${TEMP}/feDrawPathDessinCarre.png
Patrick Imbo's avatar
Patrick Imbo committed
46
47
48
        otbDrawPathDessinCarre
	${INPUTDATA}/DeuxTraits.png
	${TEMP}/feDrawPathDessinCarre.png)
Patrick Imbo's avatar
Patrick Imbo committed
49

50
ADD_TEST(feTvDrawPathTestAlign ${FEATUREEXTRACTION_TESTS1}  
51
52
  --compare-image ${TOL}  ${BASELINE}/feDrawPathAlignDeuxTraits.png
                          ${TEMP}/feDrawPathAlignDeuxTraits.png
Patrick Imbo's avatar
Patrick Imbo committed
53
54
55
        otbDrawPathAlign
	${INPUTDATA}/DeuxTraits.png
	${TEMP}/feDrawPathAlignDeuxTraits.png)
Patrick Imbo's avatar
Patrick Imbo committed
56
	
57
ADD_TEST(feTuComplexMomentImage ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
nomsg    
Patrick Imbo committed
58
59
        otbComplexMomentImage
	${INPUTDATA}/TeteAToto.png 1 1)
Patrick Imbo's avatar
Patrick Imbo committed
60

61
ADD_TEST(feTuHuImage ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
62
63
        otbHuImage
	${INPUTDATA}/TeteAToto.png)
Patrick Imbo's avatar
Patrick Imbo committed
64

65
ADD_TEST(feTuFlusserImage ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
66
67
        otbFlusserImage
	${INPUTDATA}/TeteAToto.png)
Patrick Imbo's avatar
Patrick Imbo committed
68
	
69
ADD_TEST(feTuComplexMomentPathNew ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
70
71
        otbComplexMomentPathNew)
	
72
ADD_TEST(feTuComplexMomentPath ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
73
        otbComplexMomentPath 1 1)
Patrick Imbo's avatar
Patrick Imbo committed
74

75
ADD_TEST(feTuComplexMomentPathFloat ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
76
77
        otbComplexMomentPath 1 1)

78
ADD_TEST(feTuHuPathNew ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
79
        otbHuPathNew)
Patrick Imbo's avatar
Patrick Imbo committed
80

81
ADD_TEST(feTuHuPath ${FEATUREEXTRACTION_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
82
        otbHuPath)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
83

84
85
86
87
88
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests2 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

ADD_TEST(feTuFlusserPathNew ${FEATUREEXTRACTION_TESTS2}  
Patrick Imbo's avatar
Patrick Imbo committed
89
90
        otbFlusserPathNew)

91
ADD_TEST(feTuFlusserPath ${FEATUREEXTRACTION_TESTS2}  
Patrick Imbo's avatar
Patrick Imbo committed
92
        otbFlusserPath)
93
94
95
	
# -------            otb::OrientationPathFunction   ------------------------
 	
96
ADD_TEST(feTuOrientationPathNew ${FEATUREEXTRACTION_TESTS2}  
97
98
        otbOrientationPathNew)

99
ADD_TEST(feTuOrientationPath_000 ${FEATUREEXTRACTION_TESTS2}  
100
101
        otbOrientationPath 0.0)

102
ADD_TEST(feTuOrientationPath_045 ${FEATUREEXTRACTION_TESTS2}  
103
104
        otbOrientationPath 45.0)

105
ADD_TEST(feTuOrientationPath_090 ${FEATUREEXTRACTION_TESTS2}  
106
107
        otbOrientationPath 90.0)

108
ADD_TEST(feTuOrientationPath1_80 ${FEATUREEXTRACTION_TESTS2}  
109
        otbOrientationPath 180.0)
Patrick Imbo's avatar
Patrick Imbo committed
110

111
112
# -------            otb::CompacityPathFunction   ------------------------
 	
113
ADD_TEST(feTuCompacityPathNew ${FEATUREEXTRACTION_TESTS2}  
114
115
        otbCompacityPathNew)

116
ADD_TEST(feTuCompacityPathCircle ${FEATUREEXTRACTION_TESTS2}  
117
118
        otbCompacityPathCircle 1000)

119
ADD_TEST(feTuCompacityPathSquare ${FEATUREEXTRACTION_TESTS2}  
120
121
        otbCompacityPathSquare 10.0)

122
ADD_TEST(feTuCompacityPathRectangle ${FEATUREEXTRACTION_TESTS2}  
123
124
        otbCompacityPathRectangle 10.0  20.0)
	
125
126
127
128
129
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests3 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
130
131
# -------            otb::TouziEdgeDetector   ------------------------------

132
ADD_TEST(feTuTouziNew ${FEATUREEXTRACTION_TESTS3}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
133
134
        otbTouziEdgeDetectorNew)
		
135
ADD_TEST(feTvTouzi ${FEATUREEXTRACTION_TESTS3}
136
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreTouzi_amst_3.hdr
137
                          ${TEMP}/feFiltreTouzi_amst_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
138
        otbTouziEdgeDetector
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
139
	${INPUTDATA}/amst.png
140
	${TEMP}/feFiltreTouzi_amst_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
141
142
	3)
	
143
ADD_TEST(feTvTouziDir ${FEATUREEXTRACTION_TESTS3}
144
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreTouzi_amst_dir_3.hdr
145
                          ${TEMP}/feFiltreTouzi_amst_dir_3.hdr  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
146
        otbTouziEdgeDetectorDirection
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
147
	${INPUTDATA}/amst.png
148
	${TEMP}/feFiltreTouzi_amst_dir_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
149
	3)	
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
150

151
152
# -------            otb::LineDetectorBase   ------------------------------

153
ADD_TEST(feTuLineDetectorBaseNew ${FEATUREEXTRACTION_TESTS3}  
154
155
156
157
        otbLineDetectorBaseNew)
	
# -------            otb::LineCorrelationDetector   ------------------------------
	
158
ADD_TEST(feTuLineCorrelationNew ${FEATUREEXTRACTION_TESTS3}  
159
160
        otbLineCorrelationDetectorNew)
        
161
ADD_TEST(feTvLineCorrelationLinear ${FEATUREEXTRACTION_TESTS3}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
162
  --compare-n-images ${EPSILON} 2
163
			  ${BASELINE}/feFiltreLineCorrelationLinear_amst_2_3.hdr
164
                          ${TEMP}/feFiltreLineCorrelationLinear_amst_2_3.hdr
165
166
			  ${BASELINE}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
                          ${TEMP}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
167
168
        otbLineCorrelationDetectorLinear
	${INPUTDATA}/amst.png
169
	${TEMP}/feFiltreLineCorrelationLinear_amst_2_3.hdr
170
	${TEMP}/feFiltreLineCorrelationLinear_amst_dir_2_3.hdr
171
172
	2 3)
		
173
ADD_TEST(feTvLineCorrelation ${FEATUREEXTRACTION_TESTS3}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
174
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreLineCorrelation_amst_2_3.hdr
175
176
177
178
179
180
                          ${TEMP}/feFiltreLineCorrelation_amst_2_3.hdr
        otbLineCorrelationDetector
	${INPUTDATA}/amst.png
	${TEMP}/feFiltreLineCorrelation_amst_2_3.hdr
	2 3)
	
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
181
182
# -------            otb::LineRatioDetector   ------------------------------

183
ADD_TEST(feTuLineRatioNew ${FEATUREEXTRACTION_TESTS3}  
184
185
        otbLineRatioDetectorNew)
        
186
ADD_TEST(feTvLineRatioLinear ${FEATUREEXTRACTION_TESTS3}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
187
  --compare-n-images ${EPSILON} 2
188
189
190
191
192
193
194
195
196
197
			  ${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)
	
198
ADD_TEST(feTvLineRatioLinearAmsters1 ${FEATUREEXTRACTION_TESTS3}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
199
  --compare-n-images ${EPSILON} 2
200
201
202
203
204
205
206
207
208
209
			  ${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)
				
210
ADD_TEST(feTvLineRatio ${FEATUREEXTRACTION_TESTS3}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
211
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreLineRatio_amst_2_3.hdr
212
213
214
215
216
                          ${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
217
218


219
220
221
222
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests4 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
223
# -------            otb::AssociativeSymmetricalSum   ------------------------------
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
224
	
225
ADD_TEST(feTuAssociativeSymmetricalSumNew ${FEATUREEXTRACTION_TESTS4}  
226
227
        otbAssociativeSymmetricalSumNew)
        
228
ADD_TEST(feTvAssociativeSymmetricalSum ${FEATUREEXTRACTION_TESTS4}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
229
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreASS_amst_2_3.hdr
230
231
                          ${TEMP}/feFiltreASS_amst_2_3.hdr
        otbAssociativeSymmetricalSum
Julien Michel's avatar
Julien Michel committed
232
233
        ${BASELINE}/feFiltreLineRatioLinear_amst_2_3.hdr
        ${BASELINE}/feFiltreLineCorrelationLinear_amst_2_3.hdr
234
        ${TEMP}/feFiltreASS_amst_2_3.hdr)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
235
236

# -------            otb::AssymmetricFusionOfLineDetector   ------------------------------
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
237
        
238
ADD_TEST(feTuAssymmetricFusionOfLineDetectorNew ${FEATUREEXTRACTION_TESTS4}  
239
240
        otbAssymmetricFusionOfLineDetectorNew)
       
241
ADD_TEST(feTvAssymmetricFusionOfLineDetector ${FEATUREEXTRACTION_TESTS4}  
Thomas Feuvrier's avatar
Thomas Feuvrier committed
242
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreAssymmetricFusion_amst_2_3.hdr
243
244
245
246
247
                          ${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
248
249

# -------            otb::HarrisImage   ------------------------------
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
250
        
251
ADD_TEST(feTvHarrisImage ${FEATUREEXTRACTION_TESTS4}  
252
253
  --compare-image ${TOL}  ${BASELINE}/feHarrisImage.png
                          ${TEMP}/feHarrisImage.png
Patrick Imbo's avatar
Patrick Imbo committed
254
255
256
257
        otbHarrisImage 
	${INPUTDATA}/TeteAToto.png
	${TEMP}/feHarrisImage.png
	1.0 2.0 0.0)
Patrick Imbo's avatar
Patrick Imbo committed
258

259
ADD_TEST(feTvHarrisPoupee ${FEATUREEXTRACTION_TESTS4}  
260
261
  --compare-image ${TOL}  ${BASELINE}/feHarris_poupees.png
                          ${TEMP}/feHarris_poupees.png
Patrick Imbo's avatar
Patrick Imbo committed
262
        otbHarrisImage 
263
	${INPUTDATA}/poupees_1canal.c1.hdr
Patrick Imbo's avatar
Patrick Imbo committed
264
265
	${TEMP}/feHarris_poupees.png
	1.0 1.0 1.0)
Patrick Imbo's avatar
Patrick Imbo committed
266

267
ADD_TEST(feTvMultiplyByScalarImage ${FEATUREEXTRACTION_TESTS4}  
Patrick Imbo's avatar
Patrick Imbo committed
268
269
         otbMultiplyByScalarImageFilterTest)

270
271
272
273
274
ADD_TEST(feTuThresholdImageToPointSetFilterNew ${FEATUREEXTRACTION_TESTS4}
         otbThresholdImageToPointSetFilterNew
)


275
ADD_TEST(feTuThresholdImageToPointSet1 ${FEATUREEXTRACTION_TESTS4}  
276
277
  --compare-ascii ${EPS} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To255.txt
                   ${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
278
        otbThresholdImageToPointSetTest 
279
280
281
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_0To255.txt
	0 255 )
282
ADD_TEST(feTuThresholdImageToPointSet2 ${FEATUREEXTRACTION_TESTS4}  
283
284
285
286
287
288
  --compare-ascii ${EPS} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_0To0.txt
                   ${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
        otbThresholdImageToPointSetTest 
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_0To0.txt
	0 0 )
289
ADD_TEST(feTuThresholdImageToPointSet3 ${FEATUREEXTRACTION_TESTS4}  
290
291
292
293
294
295
  --compare-ascii ${EPS} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_255To255.txt
                   ${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
        otbThresholdImageToPointSetTest 
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_255To255.txt
	255 255 )
296
ADD_TEST(feTuThresholdImageToPointSet4 ${FEATUREEXTRACTION_TESTS4}  
297
298
299
300
301
302
303
  --compare-ascii ${EPS} ${BASELINE_FILES}/feThresholdImageToPointSet_Threshold_1To200.txt
                   ${TEMP}/feThresholdImageToPointSet_Threshold_1To200.txt
        otbThresholdImageToPointSetTest 
	${INPUTDATA}/small_points.hdr
	${TEMP}/feThresholdImageToPointSet_Threshold_1To200.txt
	1 200 )

304
ADD_TEST(feTvHarrisProduceImageToValidHarrisToPointSet ${FEATUREEXTRACTION_TESTS4}  
305
306
307
308
        otbHarrisImage 
	${INPUTDATA}/small_points.hdr
	${TEMP}/small_points_harris.hdr
	1.0 1.0 1.0)
Patrick Imbo's avatar
Patrick Imbo committed
309

310
311
312
313
314
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests5 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

ADD_TEST(feTvHarrisToPointSet1 ${FEATUREEXTRACTION_TESTS5}  
315
316
  --compare-ascii ${EPS}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_2To255.txt
                                ${TEMP}/feHarrisToPointSet_Threshold_2To255.txt
317
        otbHarrisToPointSet 
318
319
320
	${INPUTDATA}/small_points.hdr
	${TEMP}/feHarrisToPointSet_Threshold_2To255.txt
	1.0 1.0 1.0 2.0 255.0)
321
ADD_TEST(feTvHarrisToPointSet2 ${FEATUREEXTRACTION_TESTS5}  
322
323
324
325
326
327
  --compare-ascii ${EPS}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_20To90.txt
                                ${TEMP}/feHarrisToPointSet_Threshold_20To90.txt
        otbHarrisToPointSet 
	${INPUTDATA}/small_points.hdr
	${TEMP}/feHarrisToPointSet_Threshold_20To90.txt
	1.0 1.0 1.0 20 90)
328
ADD_TEST(feTvHarrisToPointSet3 ${FEATUREEXTRACTION_TESTS5}  
329
330
331
332
333
334
  --compare-ascii ${EPS}        ${BASELINE_FILES}/feHarrisToPointSet_Threshold_100To160.txt
                                ${TEMP}/feHarrisToPointSet_Threshold_100To160.txt
        otbHarrisToPointSet 
	${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
335
336

# -------            otb::PixelSuppressionByDirection   ------------------------------
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
337
	
338
ADD_TEST(feTuPixelSuppressionByDirectionNew ${FEATUREEXTRACTION_TESTS5}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
339
        otbPixelSuppressionByDirectionNew)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
340
        
341
ADD_TEST(feTvPixelSuppressionByDirection ${FEATUREEXTRACTION_TESTS5}
342
343
  --compare-image ${TOL}  ${BASELINE}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
                          ${TEMP}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
344
        otbPixelSuppressionByDirection
345
346
347
	${INPUTDATA}/ImageLine_hd.bsq.hdr
	${INPUTDATA}/ImageLineDir.bsq.hdr
	${TEMP}/feFiltrePixelSuppr_ImageLine_2_0_3.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
348
	2 0.3)
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
349
350
351

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

352
ADD_TEST(feTuLocalHoughNew ${FEATUREEXTRACTION_TESTS5}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
353
354
        otbLocalHoughNew)

355
ADD_TEST(feTvLocalHoughDraw ${FEATUREEXTRACTION_TESTS5}  
356
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
357
                          ${TEMP}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
358
        otbLocalHoughDraw
359
360
	${INPUTDATA}/ImageLine.bsq.hdr
	${TEMP}/feFiltreLocalHoughDraw_ImageLine_20_20_2.hdr
361
	20 20 1)        
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
362

363
ADD_TEST(feTvLocalHoughDrawBis ${FEATUREEXTRACTION_TESTS5}  
364
  --compare-image ${EPSILON}  ${BASELINE}/feFiltreLocalHoughDraw_Line_20_10_2.png
365
                          ${TEMP}/feFiltreLocalHoughDraw_Line_20_10_2.png
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
366
        otbLocalHoughDraw
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
367
368
	${INPUTDATA}/Line.png
	${TEMP}/feFiltreLocalHoughDraw_Line_20_10_2.png
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
369
370
	20 10 2)   
	        
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
371
372
# -------            otb::FillGapsFilter   ------------------------------        

373
ADD_TEST(feTuFillGapsFilterNew ${FEATUREEXTRACTION_TESTS5}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
374
375
        otbFillGapsFilterNew)
        
376
#ADD_TEST(feTuFillGapsFilter ${FEATUREEXTRACTION_TESTS5}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
377
378
379
380
#        otbFillGapsFilter
#	${INPUTDATA}/vide.png
#	${TEMP}/feFillGaps.png)

381
382
383
# -------            otb::ImageToModulusAndDirectionImageFilter   ------------------------------
# -------            otb::ModulusAndDirectionImageToImageFilter   ------------------------------

384
ADD_TEST(feTuModulusAndDirectionImageFiltersNew ${FEATUREEXTRACTION_TESTS5}  
385
386
        otbModulusAndDirectionImageFiltersNew)

387
388
389
390

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests6 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
391
       
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
392
393
# -------            otb::ExtractSegments   ------------------------------

394
ADD_TEST(feTuExtractSegmentsNew ${FEATUREEXTRACTION_TESTS6}  
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
395
396
        otbExtractSegmentsNew)
        
397
ADD_TEST(feTvExtractSegments ${FEATUREEXTRACTION_TESTS6}  
398
399
  --compare-image ${TOL}  ${BASELINE}/feFiltreExtractSegments_ImageLine.hdr
                          ${TEMP}/feFiltreExtractSegments_ImageLine.hdr
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
400
        otbExtractSegments
401
402
	${INPUTDATA}/ImageLine_hd.bsq.hdr
	${INPUTDATA}/ImageLineDir.bsq.hdr
403
	${TEMP}/feFiltreExtractSegments_ImageLine.hdr
404
	2 0.3 20 20 2 10 0.5)                
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
405

406
407
# -------            otb::ForwardFourierMellinTransformImageFilter   -------------

408
409
#ADD_TEST(feTuForwardFourierMellinImageFilterNew ${FEATUREEXTRACTION_TESTS6} 
#         otbFourierMellinImageFilterNew)  
410

411
#ADD_TEST(feTuForwardFourierMellinImageFilterCroix ${FEATUREEXTRACTION_TESTS6}  
412
413
414
415
416
417
418
419
420
421
422
# --compare-n-images ${TOL} 2 
#		    ${BASELINE}/feFourierMellinCroixOutputModulus.hdr
#		    ${TEMP}/feFourierMellinCroixOutputModulus.hdr
#		    ${BASELINE}/feFourierMellinCroixOutputPhase.hdr
#		    ${TEMP}/feFourierMellinCroixOutputPhase.hdr
#        otbFourierMellinImageFilter
#        ${INPUTDATA}/TestFFT.hdr
#	${TEMP}/feFourierMellinCroixOutputModulus.hdr
#	${TEMP}/feFourierMellinCroixOutputPhase.hdr
#)

423
#ADD_TEST(feTuForwardFourierMellinImageFilter3Croix ${FEATUREEXTRACTION_TESTS6}  
424
425
426
427
428
429
430
431
432
433
#   --compare-n-images   ${TOL} 2  
#			${BASELINE}/feFourierMellin3CroixOutputModulus.hdr
#                        ${TEMP}/feFourierMellin3CroixOutputModulus.hdr
#			${BASELINE}/feFourierMellin3CroixOutputPhase.hdr
#                        ${TEMP}/feFourierMellin3CroixOutputPhase.hdr
#    otbFourierMellinImageFilter
#        ${INPUTDATA}/TestFFT3Croix.hdr
#	${TEMP}/feFourierMellin3CroixOutputModulus.hdr
#	${TEMP}/feFourierMellin3CroixOutputPhase.hdr
#)
434

435
ADD_TEST(feTvForwardFourierMellinImageFilter ${FEATUREEXTRACTION_TESTS6}  
436
437
438
439
440
  --compare-n-images ${EPSILON} 2 
		     ${BASELINE}/feForwardFourierMellinImageFilterReal.hdr
                     ${TEMP}/feForwardFourierMellinImageFilterReal.hdr
		     ${BASELINE}/feForwardFourierMellinImageFilterImag.hdr
                     ${TEMP}/feForwardFourierMellinImageFilterImag.hdr
441
        otbFourierMellinImageFilter
442
        ${INPUTDATA}/circle.hdr
443
444
	${TEMP}/feForwardFourierMellinImageFilterReal.hdr
	${TEMP}/feForwardFourierMellinImageFilterImag.hdr)
445

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
446
# -----------------------------------------------------------------------
447
448
# -------            otb::ImageToEdgePathFilter   -------------

449
ADD_TEST(feTuImageToEdgePathFilterNew ${FEATUREEXTRACTION_TESTS6} 
450
451
         otbImageToEdgePathFilterNew) 

452
ADD_TEST(feTvImageToEdgePathFilter ${FEATUREEXTRACTION_TESTS6}  
453
454
455
456
457
458
459
460
  --compare-image ${EPSILON}
		     ${BASELINE}/feImageToEdgePathFilter_rcc8_mire4.png
             ${TEMP}/feImageToEdgePathFilter_rcc8_mire4.png
        otbImageToEdgePathFilter
        ${INPUTDATA}/rcc8_mire4.png
        ${TEMP}/feImageToEdgePathFilter_rcc8_mire4.png
        255
        )
461
ADD_TEST(feTvImageToEdgePathFilterBis ${FEATUREEXTRACTION_TESTS6}  
462
463
464
465
466
467
468
469
  --compare-image ${EPSILON}
		     ${BASELINE}/feImageToEdgePathFilter_maskrom.png
             ${TEMP}/feImageToEdgePathFilter_maskrom.png
        otbImageToEdgePathFilter
        ${INPUTDATA}/maskrom.png
        ${TEMP}/feImageToEdgePathFilter_maskrom.png
        0
        )
470
471
472
# -------            otb::NeighborhoodScalarProductFilter   -------------


473
ADD_TEST(feTuNeighborhoodScalarProductFilterNew ${FEATUREEXTRACTION_TESTS6} 
474
475
         otbNeighborhoodScalarProductFilterNew) 

476
ADD_TEST(feTvNeighborhoodScalarProductFilter ${FEATUREEXTRACTION_TESTS6}  
Julien Michel's avatar
Julien Michel committed
477
478
479
480
481
  --compare-n-images ${EPSILON} 2
		      ${BASELINE}/feTvNeigborhoodScalarProductModulusOutput.hdr
		      ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
		      ${BASELINE}/feTvNeigborhoodScalarProductDirectionOutput.hdr
		      ${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
482
        otbNeighborhoodScalarProductFilter
483
        ${INPUTDATA}/InputForRoadDetection_SpectralAngle.hdr
484
485
        ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
	${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
486
        1.0
487
        )
488

489
490
491
492
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests7 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

493
494
# -------            otb::RemoveIsolatedByDirectionFilter   -------------

495
ADD_TEST(feTuRemoveIsolatedByDirectionFilterNew ${FEATUREEXTRACTION_TESTS7} 
496
497
         otbRemoveIsolatedByDirectionFilterNew) 

498
ADD_TEST(feTvRemoveIsolatedByDirectionFilter ${FEATUREEXTRACTION_TESTS7}  
499
500
501
502
  --compare-image ${EPSILON}
		      ${BASELINE}/feTvRemoveIsolatedByDirectionOutput.hdr
		      ${TEMP}/feTvRemoveIsolatedByDirectionOutput.hdr
        otbRemoveIsolatedByDirectionFilter
503
504
       ${INPUTDATA}/InputForRoadDetectionScalarProductMod.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
505
506
507
508
509
       ${TEMP}/feTvRemoveIsolatedByDirectionOutput.hdr
        )

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

510
ADD_TEST(feTuRemoveWrongDirectionFilterNew ${FEATUREEXTRACTION_TESTS7} 
511
512
         otbRemoveWrongDirectionFilterNew) 

513
ADD_TEST(feTvRemoveWrongDirectionFilter ${FEATUREEXTRACTION_TESTS7}  
514
515
516
517
  --compare-image ${EPSILON}
		      ${BASELINE}/feTvRemoveWrongDirectionOutput.hdr
		      ${TEMP}/feTvRemoveWrongDirectionOutput.hdr
        otbRemoveWrongDirectionFilter
518
519
       ${INPUTDATA}/InputForRoadDetection_IsolatedRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
520
521
522
523
524
       ${TEMP}/feTvRemoveWrongDirectionOutput.hdr
        )

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

525
ADD_TEST(feTuNonMaxRemovalByDirectionFilterNew ${FEATUREEXTRACTION_TESTS7} 
526
527
         otbNonMaxRemovalByDirectionFilterNew) 

528
ADD_TEST(feTvNonMaxRemovalByDirectionFilter ${FEATUREEXTRACTION_TESTS7}  
529
530
531
532
  --compare-image ${EPSILON}
		      ${BASELINE}/feTvNonMaxRemovalByDirectionOutput.hdr
		      ${TEMP}/feTvNonMaxRemovalByDirectionOutput.hdr
        otbNonMaxRemovalByDirectionFilter
533
534
       ${INPUTDATA}/InputForRoadDetection_WrongRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
535
536
537
       ${TEMP}/feTvNonMaxRemovalByDirectionOutput.hdr
        )

538
539
# -------            otb::VectorizationPathListFilter   -------------

540
ADD_TEST(feTuVectorizationPathListFilterNew ${FEATUREEXTRACTION_TESTS7} 
541
542
         otbVectorizationPathListFilterNew) 

543
ADD_TEST(feTvVectorizationPathListFilterAsciiOutput ${FEATUREEXTRACTION_TESTS7}  
544
545
546
547
--compare-ascii ${EPS}  
		${BASELINE_FILES}/feTvVectorizationPathListOutput.txt
		${TEMP}/feTvVectorizationPathListOutput.txt
        otbVectorizationPathListFilter
548
549
       ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
550
       ${TEMP}/feTvVectorizationPathListOutput.txt
551
552
       ${TEMP}/feTvVectorizationPathListOutput.png
       0.0005
553
554
        )

555
ADD_TEST(feTvVectorizationPathListFilterImageOutput ${FEATUREEXTRACTION_TESTS7}  
556
557
558
559
--compare-image ${EPSILON}
		${BASELINE}/feTvVectorizationPathListOutput.png
		${TEMP}/feTvVectorizationPathListOutput.png
        otbVectorizationPathListFilter
560
561
       ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
       ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
562
563
       ${TEMP}/feTvVectorizationPathListOutput.txt
       ${TEMP}/feTvVectorizationPathListOutput.png
564
       0.0001
565
        )
566

567
568
# -------            otb::SimplifyPathFilter   -------------

569
ADD_TEST(feTuSimplifyPathListFilterNew ${FEATUREEXTRACTION_TESTS7} 
570
         otbSimplifyPathListFilterNew) 
571

572
ADD_TEST(feTvSimplifyPathListFilter ${FEATUREEXTRACTION_TESTS7}  
573
574
575
--compare-ascii ${EPS}  
		${BASELINE_FILES}/feTvSimplifyPathOutput.txt
		${TEMP}/feTvSimplifyPathOutput.txt
576
        otbSimplifyPathListFilter
577
578
579
580
581
582
583
584
	${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
        )

585
586
# -------            otb::BreakAngularPathListFilter   -------------

587
ADD_TEST(feTuBreakAngularPathListFilterNew ${FEATUREEXTRACTION_TESTS7} 
588
589
         otbBreakAngularPathListFilterNew) 

590
ADD_TEST(feTvBreakAngularPathListFilter ${FEATUREEXTRACTION_TESTS7} 
Thomas Feuvrier's avatar
Thomas Feuvrier committed
591
592
--compare-ascii ${TOL}  ${BASELINE_FILES}/feBreakAngularPathListOutput.txt
         				${TEMP}/feBreakAngularPathListOutput.txt
593
         otbBreakAngularPathListFilter
Thomas Feuvrier's avatar
Thomas Feuvrier committed
594
595
         ${TEMP}/feBreakAngularPathListOutput.txt
         10 20 30 50 90 140 180 |
596
597
598
         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
599
600
601
602
603
         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 |
         1 1  31 1 41 1  
604
         ) 
605

606
607
608
609
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTests8 ~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

610
# -------            otb::RemoveTortuousPathListFilter   -------------
611

612
ADD_TEST(feTuRemoveTortuousPathListFilterNew ${FEATUREEXTRACTION_TESTS8} 
613
         otbRemoveTortuousPathListFilterNew) 
614

615
ADD_TEST(feTvRemoveTortuousPathListFilter ${FEATUREEXTRACTION_TESTS8}  
616
617
618
--compare-ascii ${EPS}  
		${BASELINE_FILES}/feTvRemoveTortuousPathOutput.txt
		${TEMP}/feTvRemoveTortuousPathOutput.txt
619
        otbRemoveTortuousPathListFilter
620
621
622
623
624
625
626
	${TEMP}/feTvRemoveTortuousPathOutput.txt
         10.0
         1 1   1 11  | 
         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
        )
627

628
# -------            otb::LinkPathListFilter   -------------
629

630
ADD_TEST(feTuLinkPathListFilterNew ${FEATUREEXTRACTION_TESTS8} 
631
         otbLinkPathListFilterNew) 
632

633

634
ADD_TEST(feTvLinkPathListFilter ${FEATUREEXTRACTION_TESTS8}  
635
636
637
--compare-ascii ${EPS}  
		${BASELINE_FILES}/feTvLinkPathOutput.txt
		${TEMP}/feTvLinkPathOutput.txt
638
        otbLinkPathListFilter
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
	${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 |
	  11 171  11 141 
        )
654

655
# -------            otb::LikehoodPathListFilter   -------------
656

657
ADD_TEST(feTuLikehoodPathListFilterNew ${FEATUREEXTRACTION_TESTS8} 
658
         otbLikehoodPathListFilterNew) 
659

660
ADD_TEST(feTvLikehoodPathListFilter ${FEATUREEXTRACTION_TESTS8}  
661
662
663
--compare-ascii ${EPS}  
		${BASELINE_FILES}/feTvLikehoodPathOutput.txt
		${TEMP}/feTvLikehoodPathOutput.txt
664
        otbLikehoodPathListFilter
665
666
667
668
669
670
671
672
	${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
	${TEMP}/feTvLikehoodPathOutput.txt
	157 335 204 376 |
	21 305 35 308 77 354 85 358 |
	73 160 126 173 
        )


673
674
# -------            otb::RoadExtractionFilter   -------------

675
ADD_TEST(feTuRoadExtractionFilterNew ${FEATUREEXTRACTION_TESTS8} 
676
677
         otbRoadExtractionFilterNew) 

678
ADD_TEST(feTvRoadExtractionFilter ${FEATUREEXTRACTION_TESTS8} 
679
680
681
682
       --compare-image ${EPSILON}
		${BASELINE}/feTvOutputRoadDetection.hdr
		${TEMP}/feTvOutputRoadDetection.hdr
	 otbRoadExtractionFilter
683
		 ${INPUTDATA}/qb_RoadExtract.img.hdr
684
                 ${TEMP}/feTvOutputRoadDetection.hdr
685
         337 557 432 859  # ReferencePixel
686
687
688
689
690
691
692
693
         1.0              # Alpha
         0.00005          # AmplitudeThreshold
         1.0              # Tolerance
         22.5             # (degre) MaxAngle (3.14159265358979323846/8.)
         1.0              # FirstMeanDistanceThreshold 
         10.0             # SecondMeanDistanceThreshold 
         25.	          # DistanceThreshold for LinkPathFiler
         22.5	          # AngularThreshold for LinkPathFiler
694
         ) 
695

696
# -------            otb::AddCarvingPathFilter   -------------
697
ADD_TEST(feTuAddCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8} 
698
699
700
701
         otbAddCarvingPathFilterNew) 
         

# -------            otb::RemoveCarvingPathFilter   -------------
702
ADD_TEST(feTuRemoveCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8} 
703
704
705
         otbRemoveCarvingPathFilterNew) 

# -------            otb::ImageToCarvingPathFilter   -------------
706
ADD_TEST(feTuImageToCarvingPathFilterNew ${FEATUREEXTRACTION_TESTS8} 
707
708
         otbImageToCarvingPathFilterNew) 
         
709
710
711
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbFeatureExtractionTest9 ~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
712
713
714
715
716
717
718


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

ADD_TEST(feTuImageToSIFTKeyPointSetFilterNew ${FEATUREEXTRACTION_TESTS9} 
         otbImageToSIFTKeyPointSetFilterNew)

719
720
721
722
723
724
725
ADD_TEST(feTvImageToSIFTKeyPointSetFilterSceneOutputImage ${FEATUREEXTRACTION_TESTS9}
--compare-image ${EPSILON}  
		${BASELINE}/feTvImageToSIFTKeyPointSetFilterSceneImageOutput.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneImageOutput.png
         otbImageToSIFTKeyPointSetFilterOutputImage
		${INPUTDATA}/scene.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneImageOutput.png
Mathieu Deltorre's avatar
Mathieu Deltorre committed
726
		6 3 0.08 10.0 
727
728
729
730
731
732
733
734
735
)

ADD_TEST(feTvImageToSIFTKeyPointSetFilterSceneOutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutput.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutput.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/scene.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSceneKeysOutput.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
736
		6 3 0.08 10.0 
737
738
739
740
741
742
743
744
745
)

ADD_TEST(feTvImageToSIFTKeyPointSetFilterSquareOutputImage ${FEATUREEXTRACTION_TESTS9}
--compare-image ${EPSILON}
		${BASELINE}/feTvImageToSIFTKeyPointSetFilterSquareImageOutput.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareImageOutput.png
         otbImageToSIFTKeyPointSetFilterOutputImage
		${INPUTDATA}/carre.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareImageOutput.png
Mathieu Deltorre's avatar
Mathieu Deltorre committed
746
		7 3 0.01 10.0 
747
748
749
750
751
752
753
754
755
)

ADD_TEST(feTvImageToSIFTKeyPointSetFilterSquareOutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/carre.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
756
		7 3 0.01 10.0 
757
758
)

Mathieu Deltorre's avatar
Mathieu Deltorre committed
759
760
761
762
763
764
765
ADD_TEST(feTvImageToSIFTKeyPointSetFilterSquareRotatedOutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/carre_ori.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
766
		7 3 0.01 10.0
Mathieu Deltorre's avatar
Mathieu Deltorre committed
767
768
)

769
770
771
772
773
774
775
ADD_TEST(feTvImageToSIFTKeyPointSetFilterGridOutputImage ${FEATUREEXTRACTION_TESTS9}
--compare-image ${EPSILON}
		${BASELINE}/feTvImageToSIFTKeyPointSetFilterGridImageOutput.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterGridImageOutput.png
         otbImageToSIFTKeyPointSetFilterOutputImage
		${INPUTDATA}/damier.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterGridImageOutput.png
Mathieu Deltorre's avatar
Mathieu Deltorre committed
776
		7 3 0.01 10.0 
777
778
779
780
781
782
783
784
785
)

ADD_TEST(feTvImageToSIFTKeyPointSetFilterGridOutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterGridKeysOutput.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterGridKeysOutput.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/damier.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterGridKeysOutput.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
786
		7 3 0.01 10.0 
787
)
Mathieu Deltorre's avatar
Mathieu Deltorre committed
788

Mathieu Deltorre's avatar
Mathieu Deltorre committed
789
790
791
792
793
794
795
ADD_TEST(feTvImageToSIFTKeyPointSetFilterSquare2OutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput2.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput2.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/carre.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareKeysOutput2.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
796
		1 3 0.5 10.0 
Mathieu Deltorre's avatar
Mathieu Deltorre committed
797
798
799
800
801
802
803
804
805
)

ADD_TEST(feTvImageToSIFTKeyPointSetFilterSquareRotated2OutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput2.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput2.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/carre_ori.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterSquareRotatedKeysOutput2.txt
Mathieu Deltorre's avatar
Mathieu Deltorre committed
806
		1 3 0.215 10.0
Mathieu Deltorre's avatar
Mathieu Deltorre committed
807
808
)

809
810
811
812
813
814
815
816
817
818
ADD_TEST(feTvImageToSIFTKeyPointSetFilterQB_SuburbOutputAscii ${FEATUREEXTRACTION_TESTS9}
--compare-ascii ${EPS}
		${BASELINE_FILES}/feTvImageToSIFTKeyPointSetFilterQB_SuburbOutputAscii.txt
		${TEMP}/feTvImageToSIFTKeyPointSetFilterQB_SuburbOutputAscii.txt
         otbImageToSIFTKeyPointSetFilterOutputAscii
		${INPUTDATA}/QB_Suburb.png
		${TEMP}/feTvImageToSIFTKeyPointSetFilterQB_SuburbOutputAscii.txt
		2 3 5.0 0.0
)

819
820


821
# A enrichir
822
SET(BasicFeatureExtraction_SRCS1
Patrick Imbo's avatar
Patrick Imbo committed
823
otbAlignImageToPath.cxx
Patrick Imbo's avatar
Patrick Imbo committed
824
otbDrawPath.cxx
Patrick Imbo's avatar
Patrick Imbo committed
825
otbDrawPathAlign.cxx
Patrick Imbo's avatar
nomsg    
Patrick Imbo committed
826
otbComplexMomentImage.cxx
Patrick Imbo's avatar
Patrick Imbo committed
827
otbHuImage.cxx
Patrick Imbo's avatar
Patrick Imbo committed
828
otbFlusserImage.cxx
Patrick Imbo's avatar
Patrick Imbo committed
829
830
otbComplexMomentPathNew.cxx
otbComplexMomentPath.cxx
Patrick Imbo's avatar
Patrick Imbo committed
831
otbComplexMomentPathFloat.cxx
Patrick Imbo's avatar
Patrick Imbo committed
832
otbHuPathNew.cxx
Patrick Imbo's avatar
Patrick Imbo committed
833
otbHuPath.cxx
834
835
)
SET(BasicFeatureExtraction_SRCS2
Patrick Imbo's avatar
Patrick Imbo committed
836
837
otbFlusserPathNew.cxx
otbFlusserPath.cxx
838
839
otbOrientationPathNew.cxx
otbOrientationPath.cxx
840
841
842
843
otbCompacityPathNew.cxx
otbCompacityPathCircle.cxx
otbCompacityPathSquare.cxx
otbCompacityPathRectangle.cxx
844
845
)
SET(BasicFeatureExtraction_SRCS3
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
846
otbTouziEdgeDetectorNew.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
847
otbTouziEdgeDetector.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
848
otbTouziEdgeDetectorDirection.cxx
849
otbLineDetectorBaseNew.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
850
851
otbLineCorrelationDetectorNew.cxx
otbLineCorrelationDetectorLinear.cxx
852
853
854
855
otbLineCorrelationDetector.cxx
otbLineRatioDetectorNew.cxx
otbLineRatioDetectorLinear.cxx
otbLineRatioDetector.cxx
856
857
)
SET(BasicFeatureExtraction_SRCS4
858
859
860
861
otbAssociativeSymmetricalSumNew.cxx
otbAssociativeSymmetricalSum.cxx
otbAssymmetricFusionOfLineDetectorNew.cxx
otbAssymmetricFusionOfLineDetector.cxx
Patrick Imbo's avatar
Patrick Imbo committed
862
otbHarrisImage.cxx
Patrick Imbo's avatar
Patrick Imbo committed
863
otbMultiplyByScalarImageTest.cxx
864
otbThresholdImageToPointSetFilterNew.cxx
Patrick Imbo's avatar
Patrick Imbo committed
865
otbThresholdImageToPointSetTest.cxx
866
867
)
SET(BasicFeatureExtraction_SRCS5
Patrick Imbo's avatar
Patrick Imbo committed
868
otbHarrisToPointSet.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
869
otbPixelSuppressionByDirectionNew.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
870
otbPixelSuppressionByDirection.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
871
otbFillGapsFilterNew.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
872
873
874
otbLocalHoughNew.cxx
otbLocalHough.cxx
otbLocalHoughDraw.cxx
875
876
877
otbModulusAndDirectionImageFiltersNew.cxx
)
SET(BasicFeatureExtraction_SRCS6
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
878
879
otbExtractSegmentsNew.cxx
otbExtractSegments.cxx
880
#otbFourierMellinImageFilterNew.cxx #Comment because generate error "duplicate vnl_fft_base<3...>" with otbFourierMellinImageFilter.cxx test on Mac OSX platform
Thomas Feuvrier's avatar
Thomas Feuvrier committed
881
#otbFourierMellinImageFilterTestFFT.cxx
882
otbFourierMellinImageFilter.cxx
883
884
otbImageToEdgePathFilterNew.cxx
otbImageToEdgePathFilter.cxx
885
886
otbNeighborhoodScalarProductFilterNew.cxx
otbNeighborhoodScalarProductFilter.cxx
887
888
)
SET(BasicFeatureExtraction_SRCS7
889
890
891
892
893
894
otbRemoveIsolatedByDirectionFilterNew.cxx
otbRemoveIsolatedByDirectionFilter.cxx
otbRemoveWrongDirectionFilterNew.cxx
otbRemoveWrongDirectionFilter.cxx
otbNonMaxRemovalByDirectionFilterNew.cxx
otbNonMaxRemovalByDirectionFilter.cxx
895
896
otbVectorizationPathListFilterNew.cxx
otbVectorizationPathListFilter.cxx
897
898
otbSimplifyPathListFilterNew.cxx
otbSimplifyPathListFilter.cxx
899
900
otbBreakAngularPathListFilterNew.cxx
otbBreakAngularPathListFilter.cxx
901
902
)
SET(BasicFeatureExtraction_SRCS8
903
904
905
906
907
908
otbRemoveTortuousPathListFilterNew.cxx
otbRemoveTortuousPathListFilter.cxx
otbLinkPathListFilterNew.cxx
otbLinkPathListFilter.cxx
otbLikehoodPathListFilterNew.cxx
otbLikehoodPathListFilter.cxx
909
910
otbRoadExtractionFilterNew.cxx
otbRoadExtractionFilter.cxx
911
912
913
otbAddCarvingPathFilterNew.cxx
otbRemoveCarvingPathFilterNew.cxx
otbImageToCarvingPathFilterNew.cxx
914
)
915
SET(BasicFeatureExtraction_SRCS9
916
otbImageToSIFTKeyPointSetFilterNew.cxx
917
918
919
920
otbImageToSIFTKeyPointSetFilterValid.cxx
otbImageToSIFTKeyPointSetFilterDistanceMap.cxx
otbImageToSIFTKeyPointSetFilterOutputImage.cxx
otbImageToSIFTKeyPointSetFilterOutputAscii.cxx
921
)
922
923
924

INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")

925
ADD_EXECUTABLE(otbFeatureExtractionTests1 otbFeatureExtractionTests1.cxx ${BasicFeatureExtraction_SRCS1})
926
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests1  OTBFeatureExtraction OTBIO)
927
ADD_EXECUTABLE(otbFeatureExtractionTests2 otbFeatureExtractionTests2.cxx ${BasicFeatureExtraction_SRCS2})
928
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests2  OTBFeatureExtraction OTBIO)
929
ADD_EXECUTABLE(otbFeatureExtractionTests3 otbFeatureExtractionTests3.cxx ${BasicFeatureExtraction_SRCS3})
930
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests3  OTBFeatureExtraction OTBIO)
931
ADD_EXECUTABLE(otbFeatureExtractionTests4 otbFeatureExtractionTests4.cxx ${BasicFeatureExtraction_SRCS4})
932
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests4  OTBFeatureExtraction OTBIO)
933
ADD_EXECUTABLE(otbFeatureExtractionTests5 otbFeatureExtractionTests5.cxx ${BasicFeatureExtraction_SRCS5})
934
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests5  OTBFeatureExtraction OTBIO)
935
ADD_EXECUTABLE(otbFeatureExtractionTests6 otbFeatureExtractionTests6.cxx ${BasicFeatureExtraction_SRCS6})
936
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests6  OTBFeatureExtraction OTBIO)
937
ADD_EXECUTABLE(otbFeatureExtractionTests7 otbFeatureExtractionTests7.cxx ${BasicFeatureExtraction_SRCS7})
938
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests7  OTBFeatureExtraction OTBIO)
939
ADD_EXECUTABLE(otbFeatureExtractionTests8 otbFeatureExtractionTests8.cxx ${BasicFeatureExtraction_SRCS8})
940
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests8  OTBFeatureExtraction OTBIO)
941
ADD_EXECUTABLE(otbFeatureExtractionTests9 otbFeatureExtractionTests9.cxx ${BasicFeatureExtraction_SRCS9})
942
TARGET_LINK_LIBRARIES(otbFeatureExtractionTests9  OTBFeatureExtraction OTBIO)
943

944
# ADD_EXECUTABLE(roadDetect roadDetect.cxx)
945
# TARGET_LINK_LIBRARIES(roadDetect  OTBFeatureExtraction OTBIO)
946

947

Thomas Feuvrier's avatar
Thomas Feuvrier committed
948
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
949