No subject

Net.Noise owner news at max.cecer.army.mil
Mon Feb 8 14:41:14 EST 1993


Newsgroups: info.grass.user
Path: zorro.cecer.army.mil!shapiro
From: shapiro at zorro.cecer.army.mil (Michael Shapiro)
Subject: Re: i.median
Message-ID: <C25Aon.A7C at news.cecer.army.mil>
Sender: news at news.cecer.army.mil (Net.Noise owner)
Organization: US Army Corps of Engineers Construction Engineering Research Labs
References: <9302010839.AA03190 at lua.local>
Date: Mon, 8 Feb 1993 19:41:10 GMT
Lines: 44

In <9302010839.AA03190 at lua.local> cis at lua.fct.unl.pt (Cristina Isabel Seabra [Ambiente]) writes:


>Hello GRASS user's,

>Can someone tell me what is the difference between i.median and i.composite?
>It looks like both create a raster map with red, green and blue components.
>I've tried both the commands and the output is quite different.

>Thanks in advance,

>Cristina Seabra


>cis at fct.unl.pt

I can provide an answer for i.composite, and a guess about i.median.

i.composite processes each color component independently - dividing
the red values into 10 groups, the green into 10 groups, and the blue into
10 groups. The grouping will not necessarily be the same for each color.
If the input bands to i.composite have a histogram, then each color is
"histogram-stretched" into 10 groups.  If the histograms are missing,
then each color is linearly streched into 10 groups.  This provides a
10x10x10=1000 colors for the color lookup table for the resultant
image.  Each pixel then is assigned a red value based on which group its
red-band value falls into, a blue value based on the blue grouping,
etc, resulting in one of the 1000 possible colors.


i.median on the other hand considers the red,green,blue color components
together. It partitions the color space (using an oct-tree approach)
to find a partition which has 256 components with approximately the
same number of pixels.

The choice of 1000 in i.composite is arbitrary (except that it be a cube: 
10^3 = 1000).
The choice of 256 in i.median is also arbitrary.

-- 


Michael Shapiro U.S. Army CERL
Environmental Division       



More information about the grass-user mailing list