-
Notifications
You must be signed in to change notification settings - Fork 1
/
benchmark.sh
executable file
·112 lines (103 loc) · 4.36 KB
/
benchmark.sh
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
#!/bin/bash
set -euo pipefail
echo ""
echo "GDAL VRT derived band with python defined pixel function"
time gdal_translate landsat.vrt landsat_average_gdal_vrt.tif
echo ""
echo "gdal_calc.py"
time gdal_calc.py \
-A Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
-B Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
-C Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
-D Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
-E Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
-F Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
-G Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
-H Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
-I Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
--calc="(A+B+C+D+E+F+G+H+I)/9.0" \
--outfile=landsat_average_gdal_calc.tif
echo ""
echo "OTB BandMath"
time otbcli_BandMath -il \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
-out landsat_average_otb_BandMath.tif int16 \
-exp "(im1b1 + im2b1 + im3b1 + im4b1 + im5b1 + im6b1 + im7b1 + im8b1 + im9b1)/9.0"
echo ""
echo "OTB BandMathX"
time otbcli_BandMathX -il \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
-out landsat_average_otb_BandMathX.tif int16 \
-exp "(im1b1 + im2b1 + im3b1 + im4b1 + im5b1 + im6b1 + im7b1 + im8b1 + im9b1)/9.0"
echo ""
echo "OTB C++ (based on itk::NaryAddImageFilter)"
time \
otbApplicationLauncherCommandLine TimeAverage build/ -il \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
-out landsat_average_otb_cpp.tif int16
echo ""
echo "OTB C++ (based on itk::NaryFunctorImageFilter)"
time \
otbApplicationLauncherCommandLine FunctorTimeAverage build/ -il \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
-out landsat_average_otb_cpp_functor.tif int16
echo ""
echo "OTB C++ (no application)"
time \
./build/exeFunctorTimeAverage \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
landsat_average_otb_cpp_noapp.tif
echo ""
echo "OTB C++ (no application, no streaming)"
time \
./build/exeFunctorTimeAverage \
Data/LANDSAT_MultiTempIm_clip_GapF_20140309.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140401.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140417.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140528.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140620.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140731.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20140901.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141003.tif \
Data/LANDSAT_MultiTempIm_clip_GapF_20141026.tif \
"landsat_average_otb_cpp_noapp_nostreaming.tif?&streaming:type=none"