Parcourir la source

i.landsat.rgb renamed to i.colors.enhance (trac https://trac.osgeo.org/grass/ticket/2340) (trunk, https://trac.osgeo.org/grass/changeset/61481)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61483 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler il y a 10 ans
Parent
commit
af06c6e580

+ 1 - 1
gui/wxpython/xml/toolboxes.xml

@@ -1495,7 +1495,7 @@
   <toolbox name="ManageImageColors">
     <label>Manage image colors</label>
     <items>
-      <module-item name="i.landsat.rgb">
+      <module-item name="i.colors.enhance">
         <label>Color balance for RGB</label>
       </module-item>
       <module-item name="i.his.rgb">

+ 1 - 1
scripts/Makefile

@@ -18,9 +18,9 @@ SUBDIRS = \
 	g.extension \
 	g.extension.all \
 	g.manual \
+	i.colors.enhance \
 	i.image.mosaic \
 	i.in.spotvgt \
-	i.landsat.rgb \
 	i.oif \
 	i.pansharpen \
 	i.spectral \

+ 1 - 1
scripts/i.landsat.rgb/Makefile

@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = i.landsat.rgb
+PGM = i.colors.enhance
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
 

+ 8 - 7
scripts/i.landsat.rgb/i.landsat.rgb.html

@@ -1,13 +1,14 @@
 <h2>DESCRIPTION</h2>
 
-<em>i.landsat.rgb</em> auto-balances and enhances the color channels of a
-LANDSAT RGB image to provide a more natural color mixture. Only the color
-table of each image band is modified, the base data remains untouched.
+<em>i.colors.enhance</em> auto-balances and enhances the color channels of a
+RGB image (e.g. from Landsat) to provide a more natural color mixture. Only
+the color table of each image band is modified, the base data remains untouched.
 <p>
 The module works by calculating a histogram for each color channel and 
 removing an adjustable amount of outliers from either end before recalibrating
 the color scale with <em>r.colors</em>.
 <p>
+<!-- limitation still true ? -->
 It will work with any 8-bit RGB imagery set and the script is easily modified
 to work with other datasets of greater band-depth.
 
@@ -30,23 +31,23 @@ afterwards.
 
 <h2>EXAMPLE</h2>
 
-North Carolina sample dataset example:
+North Carolina sample dataset example with Landsat data:
 
 <div class="code"><pre>
 g.region rast=lsat7_2002_10 -p
 d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30
 d.barscale at=55.3125,93.125 bcolor=white text_pos=over
 
-i.landsat.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30 strength=95
+i.colors.enhance blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30 strength=95
 d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30
 d.barscale at=55.3125,93.125 bcolor=white text_pos=over
 </pre></div>
 
 <center>
-<img src="i_landsat_rgb_uncorrected.jpg" alt="Uncorrected RGB composite of Landsat ETM channels B/G/R"><br>
+<img src="i_col_enh_uncorr.jpg" alt="Uncorrected RGB composite of Landsat ETM channels B/G/R"><br>
 Uncorrected RGB composite of Landsat ETM channels B/G/R
 <p>
-<img src="i_landsat_rgb_corrected.jpg" alt="Color corrected RGB composite of Landsat ETM channels B/G/R"><br>
+<img src="i_col_enh_corr.jpg" alt="Color corrected RGB composite of Landsat ETM channels B/G/R"><br>
 Color corrected RGB composite of Landsat ETM channels B/G/R
 </center>
 

+ 10 - 9
scripts/i.landsat.rgb/i.landsat.rgb.py

@@ -2,16 +2,16 @@
 
 ############################################################################
 #
-# MODULE:	i.landsat.rgb
+# MODULE:	i.colors.enhance (former i.landsat.rgb)
 #
-# AUTHOR(S):	Markus Neteler. <neteler itc it>
+# AUTHOR(S):	Markus Neteler, original author
 #		Hamish Bowman, scripting enhancements
 #               Converted to Python by Glynn Clements
 #
-# PURPOSE:      create pretty LANDSAT RGBs: the trick is to remove outliers 
+# PURPOSE:      create pretty RGBs: the trick is to remove outliers 
 #               using percentiles (area under the histogram curve)
 #
-# COPYRIGHT:	(C) 2006, 2008, 2012 by the GRASS Development Team
+# COPYRIGHT:	(C) 2006, 2008, 2012-2014 by the GRASS Development Team
 #
 #		This program is free software under the GNU General Public
 #		License (>=v2). Read the file COPYING that comes with GRASS
@@ -21,22 +21,23 @@
 #############################################################################
 
 #%module
-#% description: Performs auto-balancing of colors for LANDSAT images.
+#% description: Performs auto-balancing of colors for RGB images.
 #% keywords: imagery
-#% keywords: landsat
+#% keywords: RGB
+#% keywords: satellite
 #% keywords: colors
 #%end
 #%option G_OPT_R_INPUT
 #% key: red
-#% description: Name of LANDSAT red channel
+#% description: Name of red channel
 #%end
 #%option G_OPT_R_INPUT
 #% key: green
-#% description: Name of LANDSAT green channel
+#% description: Name of green channel
 #%end
 #%option G_OPT_R_INPUT
 #% key: blue
-#% description: Name of LANDSAT blue channel
+#% description: Name of blue channel
 #%end
 #%option
 #% key: strength

scripts/i.landsat.rgb/i_landsat_rgb_corrected.jpg → scripts/i.colors.enhance/i_col_enh_corr.jpg


scripts/i.landsat.rgb/i_landsat_rgb_uncorrected.jpg → scripts/i.colors.enhance/i_col_enh_uncorr.jpg


+ 2 - 2
scripts/i.pansharpen/i.pansharpen.html

@@ -74,7 +74,7 @@ up to 3 cores simultaneously. The -s flag will disable parallel processing,
 but does use an optimized r.mapcalc expression to reduce disk I/O.
 <br><br>
 The three pan-sharpened output channels may be combined with <em>d.rgb</em> or 
-<em>r.composite</em>. Colors may be optionally optimized with <em>i.landsat.rgb</em>.
+<em>r.composite</em>. Colors may be optionally optimized with <em>i.colors.enhance</em>.
 While the resulting color image will be at the higher resolution in all cases, 
 the 3 pan sharpening algorithms differ in terms of spectral response.  
 
@@ -163,7 +163,7 @@ d.rgb r=lsat7_2002_ihs_red g=lsat7_2002_ihs_green b=lsat7_2002_ihs_blue
 g.gui.mapswipe
 
 # optionally color balancing:
-i.landsat.rgb r=lsat7_2002_ihs_red g=lsat7_2002_ihs_green b=lsat7_2002_ihs_blue
+i.colors.enhance r=lsat7_2002_ihs_red g=lsat7_2002_ihs_green b=lsat7_2002_ihs_blue
 </pre></div>
 
 <h2>SEE ALSO</h2>

+ 1 - 1
scripts/i.pansharpen/i.pansharpen.py

@@ -334,7 +334,7 @@ def main():
     grass.message(_("d.rgb r=%s_red g=%s_green b=%s_blue" % (out, out, out)))
     grass.message('\n ')
     grass.message(_("If desired, combine channels into a single RGB map with 'r.composite'."))
-    grass.message(_("Channel colors can be rebalanced using i.landsat.rgb."))
+    grass.message(_("Channel colors can be rebalanced using i.colors.enhance."))
 
     # write cmd history:
     for ch in ['red', 'green', 'blue']: