Pansharpening EO-1 image with Monteverdi produces NaN
Mantis Issue 244, reported by sdinot, assigned to jmichel, created: 2011-03-03
I am trying to pansharpen an EO-1/ALI image with Monteverdi. It seems to run smoothly, but when I try to display the produced image at the end, the display is black, and the infobox shows values intervals of NaN and -NaN only.
Here are the steps I followed:
-
Using OTB and Monteverdi from mercurial, updated yesterday, on a Debian testing distribution. With gdal 1.8.0 compiled locally, with options -with-libtiff and -with-geotiff=/usr/include, to use the system libraries (no Bigtiff).
-
EO-1 image downloaded from USGS (free), for an area east of Tripoli, that includes, for example, Castelverde/Garabulli, and was taken on 2003-04-14. The exact reference is : EO1A1880372003104110PY . Bands are originally in single band geotiffs.
-
Merged bands 5, 4 and 3 (corresponding to Landsat 3, 2, and 1, from what I understand) for "natural colors", with gdal_merge.py -separate
-
Used Superimposition in Monteverdi to resize XS image (output looks ok)
-
The output of Pansharpening module is as described above.
After doing this once with the original 16 bits images, I thought the problem might be linked to this. So I started with converting the channels to 8 bits (with gdal_translate -ot Byte -scale), repeated the same process, and got the same result. (It took much longer though, which I found a bit surprising given that the files were half the size).
The pan image has 5461 columns and 10351 lines, so I don't think memory could be a problem. I did not notice any error message anyway.
Any idea what might be going wrong?
Thanks,
1299157354 - julienI just reproduced the processing. In fact, the output image is not all Nan : there are actually valid pixel values within the image footprint, but the rendering process is confused by the Nan value outside the image footprint, so you can not see it.
For instance, extract an ROI from the Pancrho first, with a ROI fully within the image footprint, and do the process again on this extract only: it is working perfectly (and the result is very nice).
So the fusion process introduce Nan when Pan and XS images both contains 0 valued pixels. This should be fixed very soon.
1299158890 - julienFixed in: http://hg.orfeo-toolbox.org/OTB/rev/91425479db23
1372256924 - grizonnetmThink that it was solved in 2011 with this commit, close now