[GRASS-user] i.spec.unmix - scale results to 0-100%

Hi,
I am using i.spec.unmix for spectral unmixing of Sentinel-2 imagery. I define 6 endmembers and the results look pretty fine, but when I add the output maps up, they don’t sum up to 100%, but rather anything from 23 till 67…
I tried to linearly scale the output maps to 0-100% and then add them up, but this does not sum up to 100% either.
In the manual there is a small comment “# todo: reclass to 0…100%”. How do I perform the reclassification manually?

Thanks for any help.
Zofie

On Fri, Nov 3, 2017 at 11:10 AM, Žofie Cimburová
<zoficimburova@gmail.com> wrote:

Hi,
I am using i.spec.unmix for spectral unmixing of Sentinel-2 imagery. I
define 6 endmembers and the results look pretty fine, but when I add the
output maps up, they don't sum up to 100%, but rather anything from 23 till
67...
I tried to linearly scale the output maps to 0-100% and then add them up,
but this does not sum up to 100% either.
In the manual there is a small comment "# todo: reclass to 0..100%".

There was a change for this but probably not catching the problem:

On Tue, Jul 4, 2017 at 10:53 PM, <svn_grass@osgeo.org> wrote:

Author: ychemin
Date: 2017-07-04 13:53:58 -0700 (Tue, 04 Jul 2017)
New Revision: 71240

Modified:
   grass-addons/grass7/imagery/i.spec.unmix/main.c
Log:
trying to rescale from 0-256 to 0-100, with according colour scheme

How do I perform the reclassification manually?

Probably
https://grass.osgeo.org/grass72/manuals/r.rescale.html
but it would be better to get the Addon completed.

Best
Markus

Hi,
On Fri, Nov 3, 2017 at 5:06 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Nov 3, 2017 at 11:10 AM, Žofie Cimburová
<zoficimburova@gmail.com> wrote:
> Hi,
> I am using i.spec.unmix for spectral unmixing of Sentinel-2 imagery. I
> define 6 endmembers and the results look pretty fine, but when I add the
> output maps up, they don't sum up to 100%, but rather anything from 23
till
> 67...
> I tried to linearly scale the output maps to 0-100% and then add them up,
> but this does not sum up to 100% either.
> In the manual there is a small comment "# todo: reclass to 0..100%".

There was a change for this but probably not catching the problem:

On Tue, Jul 4, 2017 at 10:53 PM, <svn_grass@osgeo.org> wrote:
> Author: ychemin
> Date: 2017-07-04 13:53:58 -0700 (Tue, 04 Jul 2017)
> New Revision: 71240
>
> Modified:
> grass-addons/grass7/imagery/i.spec.unmix/main.c
> Log:
> trying to rescale from 0-256 to 0-100, with according colour scheme

> How do I perform the reclassification manually?

Probably
https://grass.osgeo.org/grass72/manuals/r.rescale.html
but it would be better to get the Addon completed.

This does not solve my problem - the output maps are not scaled to 0-255.
The ranges of my output maps are e.g. Map 1-water: 0-34, Map 2-builtup:
0-65, Map 3-forest:0-13, ....
I tried to r.rescale each map to 0-100, but they then don't sum up to 100
either. Is there probably different scaling for each output map? Or how
else can I interpret the results if not in form of ratios?

Thanks,
Zofie

Oops, forgot to copy the list…

···

From: Stefan Blumentrath
Sent: mandag 6. november 2017 13.15
To: ‘Žofie Cimburová’ zoficimburova@gmail.com
Subject: RE: [GRASS-user] i.spec.unmix - scale results to 0-100%

My guess would be that you have to normalize the data for every layer in each pixel, like

r.mapcalc expression=”water_n= float (water-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water, builtup, forest))\

builtup _n= float (builtup-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water, builtup, forest))\

water_n=float(forest-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water, builtup, forest))”

Or something like that…

Cheers

Stefan

From: grass-user [mailto:grass-user-bounces@lists.osgeo.org] On Behalf Of Žofie Cimburová
Sent: mandag 6. november 2017 11.18
To: Markus Neteler <neteler@osgeo.org>
Cc: GRASS user list <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] i.spec.unmix - scale results to 0-100%

Hi,

On Fri, Nov 3, 2017 at 5:06 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Nov 3, 2017 at 11:10 AM, Žofie Cimburová
<zoficimburova@gmail.com> wrote:

Hi,
I am using i.spec.unmix for spectral unmixing of Sentinel-2 imagery. I
define 6 endmembers and the results look pretty fine, but when I add the
output maps up, they don’t sum up to 100%, but rather anything from 23 till
67…
I tried to linearly scale the output maps to 0-100% and then add them up,
but this does not sum up to 100% either.
In the manual there is a small comment “# todo: reclass to 0…100%”.

There was a change for this but probably not catching the problem:

On Tue, Jul 4, 2017 at 10:53 PM, <svn_grass@osgeo.org> wrote:

Author: ychemin
Date: 2017-07-04 13:53:58 -0700 (Tue, 04 Jul 2017)
New Revision: 71240

Modified:
grass-addons/grass7/imagery/i.spec.unmix/main.c
Log:
trying to rescale from 0-256 to 0-100, with according colour scheme

How do I perform the reclassification manually?

Probably
https://grass.osgeo.org/grass72/manuals/r.rescale.html
but it would be better to get the Addon completed.

This does not solve my problem - the output maps are not scaled to 0-255. The ranges of my output maps are e.g. Map 1-water: 0-34, Map 2-builtup: 0-65, Map 3-forest:0-13, …

I tried to r.rescale each map to 0-100, but they then don’t sum up to 100 either. Is there probably different scaling for each output map? Or how else can I interpret the results if not in form of ratios?

Thanks,

Zofie