[GRASS-dev] Linearly stretch an image to match another image's Mean and StdDev

Hi Devs & Advanced Users.

Part of an image processing algorithm is "linearly stretching an image to
match another image's Mean and StdDev".

How can we replicate this in GRASS? Already implemented as part of an existing
GRASS module? Is i.histo.match actually doing this?

Thank you, Nikos

On Sun, Nov 3, 2013 at 3:15 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

Hi Devs & Advanced Users.

Part of an image processing algorithm is "linearly stretching an image to
match another image's Mean and StdDev".

How can we replicate this in GRASS? Already implemented as part of an existing
GRASS module? Is i.histo.match actually doing this?

Yes, this is offered by i.histo.match:
http://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/i.histo.match.html

I agree that the manual page could be a bit more exhaustive :slight_smile:

Markus

Nikos A:

> Part of an image processing algorithm is "linearly stretching an image to
> match another image's Mean and StdDev".
>
> How can we replicate this in GRASS? Already implemented as part of an
> existing GRASS module? Is i.histo.match actually doing this?

Markus N:

Yes, this is offered by i.histo.match:
http://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/i.histo
.match.html

Is it really exactly that? I remember asking this (more or less) on
"22/02/2013 14:24" ("Re: [GRASS-dev] On i.histo.match (Re: On (Landsat)
imagery naming patterns)").

This is then a Real Hit! :smiley:

Thank you Markus

Hi Nikos,

it is not identical since i.histo.match uses a more advanced way. With
a simple linear scaling you can likely not gain much.

Markus

On Sunday 03 of November 2013 16:57:34 Markus Neteler wrote:

Hi Nikos,

it is not identical since i.histo.match uses a more advanced way. With
a simple linear scaling you can likely not gain much.

Thank you for the clarification Markus.

Nikos

Hmmm, I need to check what is happening there.

Also nikos, take care, as I noticed i.histo.match [0] uses reclass to
produce the output map. Which makes it very sensitive in the input
data type.

N

[0] https://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/i.histo.match.py

On Sun, Nov 3, 2013 at 6:00 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

On Sunday 03 of November 2013 16:57:34 Markus Neteler wrote:

Hi Nikos,

it is not identical since i.histo.match uses a more advanced way. With
a simple linear scaling you can likely not gain much.

Thank you for the clarification Markus.

Nikos

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Nick Ves wrote:

Also nikos, take care, as I noticed i.histo.match [0] uses reclass to
produce the output map. Which makes it very sensitive in the input
data type.

[0]
https://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/i.his
to.match.py

Thanks Nik. This is already "known". See also:

<http://lists.osgeo.org/pipermail/grass-dev/2013-February/062159.html&gt; and
follow-ups.

N

On Mon, Nov 4, 2013 at 4:54 AM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

Nick Ves wrote:

Also nikos, take care, as I noticed i.histo.match [0] uses reclass to
produce the output map. Which makes it very sensitive in the input
data type.

[0]
https://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/i.his
to.match.py

Thanks Nik. This is already "known". See also:

<http://lists.osgeo.org/pipermail/grass-dev/2013-February/062159.html&gt; and
follow-ups.

Please open a ticket for this.

Markus

Nikos Alexandris wrote:

Part of an image processing algorithm is "linearly stretching an image to

match another image’s Mean and StdDev". How can we replicate this in GRASS?

Already implemented as part of…

“i.pansharpen”, code lines 348 - 431 maybe?

Thanks, Nikos