equal area colour distribution
Hal Mueller
hal at seanet.com
Sat Dec 4 15:11:13 EST 1999
At 10:09 AM +0000 12/3/99, Marc Pelletier wrote:
>Hello,
>
>I would like to do an equal area colour distribution using a blue to red
>color map. The default color map is fine, but seems to be linear.
There's a nice concise description in Ballard and Brown's book
"Computer Vision". The computer graphics literature refers to the
technique as histogram equalization.
You need to keep track of two histograms. One is the hist of values
in your original image layer. The other is the histogram of color
indices in your displayed image. Since you know the size of your
layer, you know how many pixels (or areal units of your choice) are
in the image. Just divide number of pixels in the image by number of
color levels.
Build your color transformation map from lowest to highest value of
the original image. Keep a running total of how many pixels are
represented by the current output value.
----
Hal Mueller hal at seanet.com
Mobile Geographics LLC
Seattle, Washington (206) 297-9575
More information about the grass-user
mailing list