Dear GRASS GIS users,
together with Nikos Ves, we share the “i.fusion.hpf” idea/proof of concept. At the moment, we have a custom shell script named i.fusion.hpf
(an attempt for a proper GRASS add-on), which implements the High Pass Filter Additive (HPFA) Fusion Technique for Pan-Sharpening [*]. Nikos V started already porting to Python. How can we proceed in sharing it?
We require some help in testing. Specifically, comparing the results between the steps implemented in GRASS GIS and the respective “HPF Resolution Merge” in ERDAS. It seems that GRASS’ outputs are slightly more smooth. I will upload some screenshots in the Wiki. Perhaps I have done something wrong in the order of applying the algorithm’s steps (in the shell script)!?
Note, however, that the script misses the (optional, as explained in the related publication) histogram matching step. In ERDAS’ implementation, it seems that histo-matching is performed by default. Though, it might be possible to extract the “model” and subtract this final optional step so as to get 1:1 comparable outputs.
Background
HPFA seems to outperform the well known Pan-Sharpening techniques (incl. Brovey, IHS, PCA). The algorithm comprises the following steps:
-
Computing ratio of low (Multi-Spectral) to high (Panchromatic) resolutions
-
High Pass Filtering the Panchromatic Image
-
Resampling MSX image to the higher resolution
-
Adding weighted High-Pass-Filetred image to the upsampled MSX image
-
Optionally, matching histogram of Pansharpened image to the one of the original MSX image
A few more words on the script
-
Stunning!, Crisp and colorful images (- currently after applying color rebalancing manually)
-
Extremely easy to use, i.e.: “i.fusion.hpf pan=Pan_DNs msx=Band1[,Band2,Band3,…]”
-
Grasping and testing the various parameters that define the High-Pass filter’s kernel size and center value is also a matter of short time.
-
It will work with any kind of imagery (after minor modifications)
-
However, it can be easily adapted for GRASS 7 / converted to Python
-
The attached script, badly coded by a non-programer, is in Bash for G64.
-
Currently works only for integers (with minor tweaking it can work with r.mfilter.fp to crunch Floating Points as well)
-
Lacks of the histogram matching operation
-
Something I don’t understand about g.tempfile – how to use it?
Two questions
? Can someone confirm that the part of the existing “i.pansharpen” code that performs histogram matching (code lines 348 - 431), do so as “linearly stretching an image to match another image’s Mean and StdDev”?
? Would it be desired to get the HPFA algorithm integrated in i.pansharpen?
For the records, the replication of the HPFA fusion technique in GRASS-GIS, as well as the “filter creation” bash one-liner, were Nikos Ve’s ideas. I followed-up with a bash proof of concept.
Nikos
[*] Optimizing the High-Pass Filter Addition Technique for Image Fusion (2008) by Ute G. Gangkofner, Pushkar S. Pradhan, and Derrold W. Holcomb
(attachments)
i.fusion.hpf.tar.gz (8.27 KB)