Skip to content

Check band index on each pixel

This MR implements the check-on-every-pixel solution, that appears to not increase computation time.

Simple benchmark

nb : I'm not sure these benchmarks are relevant, please comment.

With check

guillaume@PC17475LX:~/src/otb/Modules/Filtering$ time otbApplicationLauncherCommandLine BandMathX -il ~/data/otb-guided-tour/xt_SENTINEL2A_20180706-110918-241_L2A_T30TWT_D_V1-8_RVBPIR.tif -out ~/data/big-1948-ok.tif -exp "bands(im1,{1,2,3,4,1,2,3,4,<snip>,1,2,3,4})"
2019-10-09 10:56:12 (INFO) BandMathX: Default RAM limit for OTB is 256 MB
2019-10-09 10:56:12 (INFO) BandMathX: GDAL maximum cache size is 793 MB
2019-10-09 10:56:12 (INFO) BandMathX: OTB will use at most 6 threads
2019-10-09 10:56:12 (INFO) BandMathX: Image #1 has 4 components
...
2019-10-09 10:56:12 (INFO): Estimated memory for full processing: 9704.52MB (avail.: 256 MB), optimal image partitioning: 38 blocks
2019-10-09 10:56:12 (INFO): File /home/guillaume/data/big-1948-ok.tif will be written in 39 blocks of 2410x54 pixels
Writing /home/guillaume/data/big-1948-ok.tif...: 100% [**************************************************] (36s)

real	0m36,231s
user	2m53,026s
sys	0m3,019s

Without check

guillaume@PC17475LX:~/src/otb/Modules/Filtering$ time otbApplicationLauncherCommandLine BandMathX -il ~/data/otb-guided-tour/xt_SENTINEL2A_20180706-110918-241_L2A_T30TWT_D_V1-8_RVBPIR.tif -out ~/data/big-develop-ok.tif -exp "bands(im1,{1,2,3,4,1,2,3,4,<snip>,1,2,3,4})"
2019-10-09 10:52:19 (INFO) BandMathX: Default RAM limit for OTB is 256 MB
2019-10-09 10:52:19 (INFO) BandMathX: GDAL maximum cache size is 793 MB
2019-10-09 10:52:19 (INFO) BandMathX: OTB will use at most 6 threads
2019-10-09 10:52:19 (INFO) BandMathX: Image #1 has 4 components
...
2019-10-09 10:52:19 (INFO): Estimated memory for full processing: 9704.52MB (avail.: 256 MB), optimal image partitioning: 38 blocks
2019-10-09 10:52:19 (INFO): File /home/guillaume/data/big-develop-ok.tif will be written in 39 blocks of 2410x54 pixels
Writing /home/guillaume/data/big-develop-ok.tif...: 100% [**************************************************] (36s)

real	0m36,104s
user	2m52,415s
sys	0m2,745s

Closes #1948 (closed)

Merge request reports