浏览代码

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 10 年之前
父节点
当前提交
af06c6e580

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

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

+ 1 - 1
scripts/Makefile

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

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

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

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

@@ -1,13 +1,14 @@
 <h2>DESCRIPTION</h2>
 <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>
 <p>
 The module works by calculating a histogram for each color channel and 
 The module works by calculating a histogram for each color channel and 
 removing an adjustable amount of outliers from either end before recalibrating
 removing an adjustable amount of outliers from either end before recalibrating
 the color scale with <em>r.colors</em>.
 the color scale with <em>r.colors</em>.
 <p>
 <p>
+<!-- limitation still true ? -->
 It will work with any 8-bit RGB imagery set and the script is easily modified
 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.
 to work with other datasets of greater band-depth.
 
 
@@ -30,23 +31,23 @@ afterwards.
 
 
 <h2>EXAMPLE</h2>
 <h2>EXAMPLE</h2>
 
 
-North Carolina sample dataset example:
+North Carolina sample dataset example with Landsat data:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
 g.region rast=lsat7_2002_10 -p
 g.region rast=lsat7_2002_10 -p
 d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30
 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
 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.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
 d.barscale at=55.3125,93.125 bcolor=white text_pos=over
 </pre></div>
 </pre></div>
 
 
 <center>
 <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
 Uncorrected RGB composite of Landsat ETM channels B/G/R
 <p>
 <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
 Color corrected RGB composite of Landsat ETM channels B/G/R
 </center>
 </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
 #		Hamish Bowman, scripting enhancements
 #               Converted to Python by Glynn Clements
 #               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)
 #               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
 #		This program is free software under the GNU General Public
 #		License (>=v2). Read the file COPYING that comes with GRASS
 #		License (>=v2). Read the file COPYING that comes with GRASS
@@ -21,22 +21,23 @@
 #############################################################################
 #############################################################################
 
 
 #%module
 #%module
-#% description: Performs auto-balancing of colors for LANDSAT images.
+#% description: Performs auto-balancing of colors for RGB images.
 #% keywords: imagery
 #% keywords: imagery
-#% keywords: landsat
+#% keywords: RGB
+#% keywords: satellite
 #% keywords: colors
 #% keywords: colors
 #%end
 #%end
 #%option G_OPT_R_INPUT
 #%option G_OPT_R_INPUT
 #% key: red
 #% key: red
-#% description: Name of LANDSAT red channel
+#% description: Name of red channel
 #%end
 #%end
 #%option G_OPT_R_INPUT
 #%option G_OPT_R_INPUT
 #% key: green
 #% key: green
-#% description: Name of LANDSAT green channel
+#% description: Name of green channel
 #%end
 #%end
 #%option G_OPT_R_INPUT
 #%option G_OPT_R_INPUT
 #% key: blue
 #% key: blue
-#% description: Name of LANDSAT blue channel
+#% description: Name of blue channel
 #%end
 #%end
 #%option
 #%option
 #% key: strength
 #% 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.
 but does use an optimized r.mapcalc expression to reduce disk I/O.
 <br><br>
 <br><br>
 The three pan-sharpened output channels may be combined with <em>d.rgb</em> or 
 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, 
 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.  
 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
 g.gui.mapswipe
 
 
 # optionally color balancing:
 # 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>
 </pre></div>
 
 
 <h2>SEE ALSO</h2>
 <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(_("d.rgb r=%s_red g=%s_green b=%s_blue" % (out, out, out)))
     grass.message('\n ')
     grass.message('\n ')
     grass.message(_("If desired, combine channels into a single RGB map with 'r.composite'."))
     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:
     # write cmd history:
     for ch in ['red', 'green', 'blue']:
     for ch in ['red', 'green', 'blue']: