[GRASSLIST:5949] r.his and i.his.rgb confusion

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?

i.his.rgb hue_input=my.hue intensity_input=my.int saturation_input=my.sat red_output=my.red green_output=my.green blue_output=my.blue

r.his h_map=my2.hue i_map=my2.int s_map=my2.sat r_map=my2.red g_map=my2.green b_map=my2.blue

Maciek

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@gclements.plus.com>

Thanks, I get it now.

Maciek

----- Original Message ----- From: "Glynn Clements" <glynn@gclements.plus.com>
To: "Maciek Sieczka" <werchowyna@pf.pl>
Cc: <grasslist@baylor.edu>
Sent: Friday, March 04, 2005 9:17 AM
Subject: [GRASSLIST:6001] Re: r.his and i.his.rgb confusion

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@gclements.plus.com>

Dylan Beaudette wrote:

> 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.

I have used r.his with a hue and intensity map, for a semi-transparent raster
overlay type image.... but i don't quite understand what you mean by using a
rescaled DEM for the saturation component... could you please elaborate a bit
on this, as it sounds rather interesting!

The saturation component controls an interpolation between the
original colour (sat=255) and grey (sat=0).

If you rescale a DEM to the 0-255 range and use the result as the
saturation map, higher altitudes (peaks) will have their colour
determined by the hue and intensity maps, while the colour will "fade"
to grey at lower altitudes (valleys).

The effect is similar to looking down through fog; the peaks can be
seen clearly while the valleys blend into the fog.

Essentially, the idea is to represent altitude in intuitive manner.

--
Glynn Clements <glynn@gclements.plus.com>