[GRASS-dev] Implementation of the High Pass Filter Additive Fusion technique (i.fusion.hpf)

Nikos Alexandris nik at nikosalexandris.net
Sat Nov 16 16:46:17 PST 2013


Michael Barton wrote:

> > I took a look at the i.pansharpen code. The method matchhist does the
> > histogram matching. It creates cumulative distribution functions (CDF) of
> > the source and target histograms and then finds the closest values to
> > match at each point on the CDF. It is pretty thoroughly documented in the
> > code. There are other methods of histogram matching, but IIRC, this was
> > the most basic and widespread. As some others have commented, it assumes
> > that images have 256 integer grey values. A more sophisticated histogram
> > matching algorithm could utilize floating point values and a wider range
> > of values. Hope this helps

Markus Neteler wrote:

> How does it compare to the one used in the Addon "i.hist.match"?
> (grass-addons/grass7/imagery/i.histo.match/i.histo.match.py)

My rough guess is that it is about the same logic. In the case of pansharpen 
there is one reference cdf. In the case of i.histo.match there are some 
assumptions I guess and some averaged values are used as a reference. See also 
Moritz' comment:

"	Replying to cmbarton:
	If you have an image set that is more than 8bit, I can use it to test some 	
	things. i.histo.match is a nice module. But its objective is different from 
	histogram matching in i.pan.sharpen. So it would need modification to be 		
	used in this context. When I was writing i.pan.sharpen, I looked at the 		
	i.histo.match code but it was easier to use a much simpler algorithm. But 	
	since you know i.histo.match maybe you can see where the code could be 		
	modified to be used in i.pan.sharpen.

Your histogram matching code matches the histogram of a source image to that 
of a target image, whereas i.histo.match matches the histogram of each given 
image to the cumulative histogram of all images. Both approaches are valid, 
and both should be available in a histogram matching module.   "


> There I don't see a 8bit limitation (I may be wrong). This might solve
> ticket #2048.

Note, the IHS method for example depends on the respective modules which are 
8-bit based too if I am not wrong.

Nikos





More information about the grass-dev mailing list