[GRASS-dev] [GRASS GIS] #774: i.rgb.his, i.his.rgb, d.his support for >8 bit

GRASS GIS trac at osgeo.org
Wed Aug 24 17:48:14 PDT 2016


#774: i.rgb.his, i.his.rgb, d.his support for >8 bit
--------------------------+-----------------------------------------
  Reporter:  hamish       |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.0.5
 Component:  Raster       |    Version:  svn-develbranch6
Resolution:               |   Keywords:  i.rgb.his, i.his.rgb, d.his
       CPU:  All          |   Platform:  All
--------------------------+-----------------------------------------

Comment (by nikosa):

 The attached diff works for me, for bitnesses >8-bit. The outputs hue,
 saturation and intensity are in their expected range, as per the HSL/HSV
 color space model. There is still an issue on how to instruct the output
 to be DCELL and not FCELL. Accordingly, I'd like to modify i.his.rgb.

 Source for the math of concern are:

 - https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
 - https://en.wikipedia.org/wiki/HSL_and_HSV#From_HSL

 The current/old implementation is identical to the one documented at
 [http://www.gis.usu.edu/manuals/labbook/erdas/manuals/FieldGuide.pdf
 ERDAS' field guide]. I think, however, it was meant to deal/avoid the case
 when hue is undefined (this being the case when the max and min values of
 a band/image are identical) and, perhaps, other issues with floating point
 math(?).

 See also:
 - http://arxiv.org/abs/1107.3348

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/774#comment:9>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list