[GRASS-dev] d.his vs. r.his

Hi,

I am trying to recreate the 'd.his brighten=' effect with r.his, but with r.his along with the brightness I get extremely high contrast output.

e.g.

#spearfish d.out.file help page example
r.shaded.relief map=elevation.dem shad=elev.shad_relf

r.mapcalc "elev.shad_relf_bright50 = elev.shad_relf * 1.5"
r.his h=elevation.dem i=elev.shad_relf_bright50 r=esr.r g=esr.g b=esr.b
d.rgb r=esr.r g=esr.g b=esr.b

# versus
d.his h=elevation.dem i=elev.shad_relf brighten=50

?

thanks,
Hamish

Hamish wrote:

I am trying to recreate the 'd.his brighten=' effect with r.his, but
with r.his along with the brightness I get extremely high contrast
output.

e.g.

#spearfish d.out.file help page example
r.shaded.relief map=elevation.dem shad=elev.shad_relf

$ r.info -r elev.shad_relf
min=-19.392856
max=95.629158

r.mapcalc "elev.shad_relf_bright50 = elev.shad_relf * 1.5"
r.his h=elevation.dem i=elev.shad_relf_bright50 r=esr.r g=esr.g b=esr.b
d.rgb r=esr.r g=esr.g b=esr.b

# versus
d.his h=elevation.dem i=elev.shad_relf brighten=50

?

You're forgetting the colour tables. Twice.

First, r.mapcalc needs to use the intensities for elev.shad_relf, not
its values.

Second, r.his uses the intensities for elev.shad_relf_bright50, not
its values. As you aren't setting a colour table, you get the default
rainbow colours.

Try this instead:

  r.mapcalc 'elev.shad_relf_bright50 = #elev.shad_relf * 1.5'
  r.colors elev.shad_relf_bright50 color=grey255
  d.rgb r=esr.r g=esr.g b=esr.b

It gives results similar to d.his.

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

Hamish wrote:
> I am trying to recreate the 'd.his brighten=' effect with r.his, but
> with r.his along with the brightness I get extremely high contrast
> output.

Glynn:

You're forgetting the colour tables. Twice.

First, r.mapcalc needs to use the intensities for elev.shad_relf, not
its values.

Second, r.his uses the intensities for elev.shad_relf_bright50, not
its values. As you aren't setting a colour table, you get the default
rainbow colours.

Try this instead:

  r.mapcalc 'elev.shad_relf_bright50 = #elev.shad_relf * 1.5'
  r.colors elev.shad_relf_bright50 color=grey255
> r.his h=elevation.dem i=elev.shad_relf_bright50 r=esr.r g=esr.g b=esr.b
  d.rgb r=esr.r g=esr.g b=esr.b

It gives results similar to d.his.

Yes, right, thanks. I think I need to read a book on advanced color theory
someday.

Hamish

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com