[GRASS-dev] [GRASS GIS] #2048: i.pansharpen limited to 8-bit imagery
GRASS GIS
trac at osgeo.org
Wed Jul 31 11:11:06 PDT 2013
#2048: i.pansharpen limited to 8-bit imagery
-----------------------------------------------------------------------+----
Reporter: nikosa | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Imagery | Version: svn-trunk
Keywords: i.pansharpen, sharpening, fusion, brovey, ihs, pca, 8-bit | Platform: Unspecified
Cpu: All |
-----------------------------------------------------------------------+----
Comment(by mlennert):
Replying to [comment:5 nikosa]:
> However, I'd like to kindly ask again if it is possible to alter the
documentation? It is not a nice surprise trying to work with i.pansharpen
and getting strange colors or empty images as a result. See also
[http://gis.stackexchange.com/q/39174/5256]. At least mention the current
limitation or... other ideas? Then again, it is in G7, the development
version :-)
I just (r57332) added a sentence to the NOTES section about the module
currently working only for 8-bit images.
Several remarks to justify that:
- The histogram matching algorithm in the module is limited to 8-bit as it
reclasses only sources values between 0 and 255 to target value between 0
and 255 (it also calls r.stats with the -i flag, and so rounds everything
to integer, IIUC). In other words, any values above 255 silently ignored !
To check, just comment out line where the temporary histogram matched
(reclassed) images are g.removed. As the histogram matching is used in all
three algorithms, they are all limited to 8-bit.
- the i.rgb.his/i.his.rgb modules are also limited to 8-bit, AFAIK. There
is an old ticket with a patch proposed by Hamish on that: #774. See also
[1]
So, in conclusion, to be able to use i.pansharpen with >8-bit images, the
histogram matching algorithm needs to be rewritten. You could try to just
skip the histogram matching part (just comment out the relevant call to
the function and replace the panmatch images by the pan image and see what
happens (I'll have to read up on the theory again to understand why
histogram matching is necessary here).
You can also apply the brovey or pca method yourself using r.mapcalc and
i.pca.
[1] http://lists.osgeo.org/pipermail/grass-
user/2009-September/052573.html
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2048#comment:13>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list