[GRASS-SVN] r69432 - sandbox/alexandris/i.rgb.hsl

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 10 15:01:09 PDT 2016


Author: nikosa
Date: 2016-09-10 15:01:09 -0700 (Sat, 10 Sep 2016)
New Revision: 69432

Modified:
   sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.html
   sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.md
Log:
Updated documentation

Modified: sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.html
===================================================================
--- sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.html	2016-09-10 20:08:21 UTC (rev 69431)
+++ sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.html	2016-09-10 22:01:09 UTC (rev 69432)
@@ -2,29 +2,45 @@
 <p><em>i.rgb.his</em> is an image processing program that processes three input raster map layers as red, green, and blue components and produces three output raster map layers representing the hue, intensity, and saturation of the data. The output raster map layers are created by a standard red-green-blue (RGB) to hue-intensity-saturation (HIS) color transformation. Each output raster map layer is given a linear gray scale color table. The current geographic region definition and mask settings are respected.</p>
 <h2 id="examples">EXAMPLES</h2>
 <h2 id="bit">8-bit</h2>
-<p>The digital numbers for the 8-bit Landsat 7 bands red, green and blue, range between 0 and 255:</p>
-<p><code>for BAND in 10 20 30 ;do echo</code>echo -e "Band <span class="math inline">${BAND}: " && r.info -r lsat7_2002_$</span>BAND<code>;done</code></p>
-<pre><code>Band 10: min=42 max=255
+<p>The digital numbers of the 8-bit Landsat 7 bands red, green and blue, range between 0 and 255:</p>
+<pre><code>for BAND in 10 20 30 ;do echo `echo -e "Band ${BAND}: " && r.info -r lsat7_2002_$BAND` ;done
+
+Band 10: min=42 max=255
 Band 20: min=28 max=255
 Band 30: min=1 max=255</code></pre>
-<p>Coverting these to hue, saturation and lightness:</p>
-<p><code>i.rgb.hsl r=lsat7_2002_30 g=lsat7_2002_20 bl=lsat7_2002_10 hue=h lightness=l saturation=s</code></p>
+<p>Coverting these bands to hue, saturation and lightness:</p>
+<pre><code>i.rgb.hsl r=lsat7_2002_30 g=lsat7_2002_20 bl=lsat7_2002_10 hue=h lightness=l saturation=s</code></pre>
 <p>The output images range within:</p>
-<p><code>for DIMENSION in h s l; do echo</code>echo "${DIMENSION}:" && r.info -r ${DIMENSION}` ;done</p>
-<pre><code>h: min=0 max=359.434
+<pre><code>for DIMENSION in h s l; do echo `echo "${DIMENSION}:" && r.info -r ${DIMENSION}` ;done
+
+h: min=0 max=359.434
 s: min=0 max=1
 l: min=0.08431373 max=1</code></pre>
-<p>Note, the <em>bits</em> option is set to 8 by default. Since the input images, in this examele, are 8-bit, there is no need to modify it.</p>
+<p>Note, the <em>bits</em> option is set to 8 by default. Since the input images, in this example, are 8-bit, there is no need to modify it.</p>
 <p>Converting back to the original RGB color space using <a href="i.hsl.rgb" class="uri">i.hsl.rgb</a>:</p>
-<p><code>i.hsl.rgb hue=h saturation=s lightness=l r=red g=green bl=blue</code></p>
+<pre><code>i.hsl.rgb hue=h saturation=s lightness=l r=red g=green bl=blue</code></pre>
 <p>Confirming that the range of the values of the output images red, green and blue, is identical to the range of the input Landsat 7 bands:</p>
-<p><code>for IMAGE in red green blue ;do echo \</code>echo -e "${IMAGE}: " && r.info -r $IMAGE` ;done`</p>
-<pre><code>red: min=0 max=255
+<pre><code>for IMAGE in red green blue ;do echo `echo -e "${IMAGE}: " && r.info -r $IMAGE` ;done
+
+red: min=0 max=255
 green: min=28 max=255
 blue: min=42 max=255</code></pre>
-<h2 id="bit-1">16-bit</h2>
+<h2 id="bit-1">11-bit</h2>
+<p>For 11-bit sensors, like QuickBird2 [0], set <code>bits=11</code>. For example:</p>
+<pre><code>i.rgb.his r=Red g=Green bl=Blue h=h s=s l=l bit_depth=11 --o</code></pre>
+<h2 id="bit-2">16-bit</h2>
+<p>The Landsat 8 instruments OLI and TIRS are capable of 12-bit. Products are, however, delivered as 16-bit images (scaled to 55,000 grey levels). [0]</p>
+<p>Therefore, <em>bitness</em> needs to be set to 16, like:</p>
+<pre><code>i.rgb.his red=B4.hpf green=B3.hpf blue=B2.hpf h=h s=s l=l bit=16</code></pre>
+<h2 id="arbitrary-lower-bit-depths">Arbitrary lower bit depths</h2>
+<p>The module allows for data of less than 8-bit. For example, data from the DMSP Operational Linescan System (OLS) nighttime lights time series, which feature 6-bit sensors [2].</p>
+<p>For example:</p>
+<pre><code>i.rgb.his r=F152007 g=F152005 bl=F152004 h=h s=s l=l bits=6</code></pre>
+<h1 id="references">References</h1>
+<p>[0]</p>
+<p>[1] http://landsat.usgs.gov/landsat8.php</p>
+<p>[2] http://ngdc.noaa.gov/eog/sensors/ols.html</p>
 <h2 id="see-also">SEE ALSO</h2>
 <p><em><a href="i.hsl.rgb.html">i.hsl.rgb</a>, <a href="i.rgb.his.html">i.rgb.his</a>, <a href="i.his.rgb.html">i.his.rgb</a>, <a href="r.colors.html">r.colors</a></em></p>
 <h2 id="author">AUTHOR</h2>
 <p>Nikos Alexandris</p>
-<p><em>Last changed: $Date: 2016-01-28 12:21:34 +0100 (Thu, 28 Jan 2016) $</em></p>

Modified: sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.md
===================================================================
--- sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.md	2016-09-10 20:08:21 UTC (rev 69431)
+++ sandbox/alexandris/i.rgb.hsl/i.rgb.hsl.md	2016-09-10 22:01:09 UTC (rev 69432)
@@ -15,53 +15,91 @@
 
 ## 8-bit
 
-The digital numbers for the 8-bit Landsat 7 bands red, green and blue, range between 0 and 255:
+The digital numbers of the 8-bit Landsat 7 bands red, green and blue, range between 0 and 255:
 
-`for BAND in 10 20 30 ;do echo `echo -e "Band ${BAND}: " && r.info -r lsat7_2002_$BAND` ;done`
+```
+for BAND in 10 20 30 ;do echo `echo -e "Band ${BAND}: " && r.info -r lsat7_2002_$BAND` ;done
 
-```
 Band 10: min=42 max=255
 Band 20: min=28 max=255
 Band 30: min=1 max=255
 ```
 
-Coverting these to hue, saturation and lightness:
+Coverting these bands to hue, saturation and lightness:
 
-`i.rgb.hsl r=lsat7_2002_30 g=lsat7_2002_20 bl=lsat7_2002_10 hue=h lightness=l saturation=s`
+```
+i.rgb.hsl r=lsat7_2002_30 g=lsat7_2002_20 bl=lsat7_2002_10 hue=h lightness=l saturation=s
+```
 
-
 The output images range within:
 
-`for DIMENSION in h s l; do echo `echo "${DIMENSION}:" && r.info -r ${DIMENSION}` ;done
+```
+for DIMENSION in h s l; do echo `echo "${DIMENSION}:" && r.info -r ${DIMENSION}` ;done
 
-```
 h: min=0 max=359.434
 s: min=0 max=1
 l: min=0.08431373 max=1
 ```
 
 Note, the <em>bits</em> option is set to 8 by default. Since the input images,
-in this examele, are 8-bit, there is no need to modify it.
+in this example, are 8-bit, there is no need to modify it.
 
 Converting back to the original RGB color space using [i.hsl.rgb](i.hsl.rgb):
 
-`i.hsl.rgb hue=h saturation=s lightness=l r=red g=green bl=blue`
+```
+i.hsl.rgb hue=h saturation=s lightness=l r=red g=green bl=blue
+```
 
 Confirming that the range of the values of the output images red, green and
 blue, is identical to the range of the input Landsat 7 bands:
 
-`for IMAGE in red green blue ;do echo \`echo -e "${IMAGE}: " && r.info -r $IMAGE\` ;done`
+```
+for IMAGE in red green blue ;do echo `echo -e "${IMAGE}: " && r.info -r $IMAGE` ;done
 
-```
 red: min=0 max=255
 green: min=28 max=255
 blue: min=42 max=255
 ```
 
+## 11-bit
 
+For 11-bit sensors, like QuickBird2 [0], set `bits=11`. For example:
+
+```
+i.rgb.his r=Red g=Green bl=Blue h=h s=s l=l bit_depth=11 --o
+```
+
+
 ## 16-bit
 
+The Landsat 8 instruments OLI and TIRS are capable of 12-bit. Products are,
+however, delivered as 16-bit images (scaled to 55,000 grey levels). [0]
 
+Therefore, *bitness* needs to be set to 16, like:
+
+```
+i.rgb.his red=B4.hpf green=B3.hpf blue=B2.hpf h=h s=s l=l bit=16
+```
+
+## Arbitrary lower bit depths
+
+The module allows for data of less than 8-bit. For example, data from the DMSP Operational
+Linescan System (OLS) nighttime lights time series, which feature 6-bit sensors [2].
+
+For example:
+
+```
+i.rgb.his r=F152007 g=F152005 bl=F152004 h=h s=s l=l bits=6
+```
+
+# References
+
+[0]
+
+[1] http://landsat.usgs.gov/landsat8.php
+
+[2] http://ngdc.noaa.gov/eog/sensors/ols.html
+
 SEE ALSO
 --------
 
@@ -73,5 +111,3 @@
 ------
 
 Nikos Alexandris
-
-*Last changed: \$Date: 2016-01-28 12:21:34 +0100 (Thu, 28 Jan 2016) \$*



More information about the grass-commit mailing list