Wrong estimation of split map in ImageRegionAdaptativeSplitter
Mantis Issue 983, reported by mgrizonnet, assigned to jmichel, created: 2014-11-06
I think that there is something wrong in the way that we're computing the split map in the ImageRegionAdaptativeSplitter class in the EstimateSplitMap.
In some cases it could lead to empty split map (empty region)
I provide parameters that can be used with the existing test which allow to reproduce the issue (see Steps to reproduce)
I found this bug using OTB applications with the extended parameters "box" and saw that the application terminate without error but without writing any output file on the disk.
Digging into the ImageFileWriter, I found that the estimated number of stream division was null (thats an other issue IMHO -> we should avoid to get a null value from stream division from StreamingManagers).
Don
1437385570 - rashadkm16320 17428 4000 4000 2048 2048 5 ~/temporary/otbImageRegionAdaptativeSplitter.txt
Here the index is outside and raising an error is only required in this case right?
or Am I missing something else?
1442221778 - julienI just had a look at the code, and this is worse than I thought : the adaptative splitter (and possibly others as well) is ment for splitting regions starting à index [0,0]. It therefore procudes a splitmap outside of the actual image region (because it ignores the start index), and there is a filtering of splits according to Crop operation success. Hence, the splitmap ends up empty ... But even without this filtering, the splitmap will be wrong.
1442843834 - julienFixed here: https://git.orfeo-toolbox.org/otb.git/commit/3f1903fa0051ad2df9416ee3ace8a7aba7437f45
Merged in branches develop and release-5.0.
1442935123 - grizonnetmworks now with the set of parameters provided when I've opened the bug.
cf test output:
/home/grizonnetm/projets/otb/