[GRASSLIST:6001] Re: r.his and i.his.rgb confusion
Glynn Clements
glynn at gclements.plus.com
Fri Mar 4 03:17:14 EST 2005
Maciek Sieczka wrote:
> The outputs of r.his and i.his.rgb are completely different but according
> the manual and the comands' syntax I can't understand why. They seem to
> provide exactly the same functionality. Could somebody clear it out to dumb
> me?
AFAICT, i.his.rgb does correct HIS->RGB translation, while r.his is a
fudge. I believe that the hsv.rgb.sh script in 5.3 (omitted from
5.7/6.0 for some reason) will produce results similar to i.his.rgb.
For i.his.rgb, the three input maps correspond directly to the Hue,
Saturation and Intensity (aka Value or Brightness) components of the
HIS (aka HSV or HSB) colour space. The values should lie in the range
0-255, corresponding to 0-360 degrees for the hue map and 0-100% for
the other two. The maps' colour tables are ignored.
OTOH, r.his obtains an (R,G,B) colour triplet from the colour table
for the "hue" map, then modifies the intensity and saturation of the
colour according to the intensities from the colour tables of the
intensity and saturation maps (which should have grey-scale colour
tables).
Intensities of 255 for both maps will result in the output map
essentially being a copy of the hue map, split into separate R/G/B
components. A lower intensity for the intensity map will result in the
output colour being a darker version of the input colour, while a
lower intensity for the saturation map will produce a lighter version.
AFAIK, r.his exists solely to provide a specific visual effect. If you
use an existing coloured map as the hue map, create an intensity map
which simulates solar illumination (e.g. by obtaining the slope from a
DEM using r.slope.aspect) and a saturation map by scaling a DEM, the
end result looks (slightly) like an illuminated relief map, tinted
according to the hue map and with "fog" in the valleys.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list