i.colors.enhance(1grass)
π i.colors.enhance β the GRASS User's Manual glow-up π
okay bestie, pull up a chair π«Ά this is i.colors.enhance, straight out of the GRASS User's Manual, and it's literally here to do auto-balancing of colors for RGB images. no cap.
β¨ NAME β¨
i.colors.enhance β performs auto-balancing of colors for RGB images. it's giving makeup artist for your satellite data π
π·οΈ KEYWORDS π·οΈ
imagery, RGB, satellite, colors π
π SYNOPSIS π
i.colors.enhance
i.colors.enhance --help
i.colors.enhance [-fprs] red=name green=name blue=name [strength=float]
[--help] [--verbose] [--quiet] [--ui]
π© Flags π©
-fβ extend colors to full range of data on each channel. go big or go home β¨-pβ preserve relative colors, adjust brightness only. keep the vibe, just fix the lighting π-rβ reset to standard color range. factory reset era π-sβ process bands serially (default: run in parallel). one at a time, queen, no multitasking π--helpβ print usage summary π--verboseβ verbose module output π£οΈ--quietβ quiet module output π€«--uiβ force launching GUI dialog π₯οΈ
ποΈ Parameters ποΈ
red=name[required] β name of red channel β€οΈgreen=name[required] β name of green channel πblue=name[required] β name of blue channel πstrength=floatβ cropping intensity (upper brightness level)- Options:
0-100 - Default:
98
- Options:
πΈ DESCRIPTION πΈ
so what does i.colors.enhance actually do? bestie, it auto-balances and enhances the color channels of a RGB image (think e.g. from Landsat) so you get a way more natural color mixture. the way that it only touches the color table of each image band and leaves the base data completely untouched? obsessed. π«Ά your actual data is safe, periodt.
here's the secret sauce: the module calculates a histogram for each color channel, then removes an adjustable amount of outliers from either end, and then recalibrates the color scale with r.colors. iconic behavior.
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. flexible queen π
π NOTES π
ngl, depending on the image, it may or may not be advantageous to use the -p flag to preserve the relative color scaling. you will have to experiment with the different options to find a setting that works best for your particular imagery. it's giving trial and error, and that's okay π
the strength option should generally be set in the 90-99 range. the lower the number, the more saturated the image becomes. it represents the percentage cut-off for the top end of the color histogram curve. the lower end is fixed at 2% of the area under the curve. so like, strength = top-end drama, 2% = bottom-end fixed, iykyk π
want faster execution on large images? bestie, for quicker execution of this module on large images you can achieve largely similar results by switching to a coarser resolution before running the module (using g.region) and then switching back to the original resolution afterwards. lowkey genius β‘
π§ͺ EXAMPLE π§ͺ
North Carolina sample dataset example with Landsat data, let's goooo π°οΈ
g.region raster=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.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
- Uncorrected RGB composite of Landsat ETM channels B/G/R π (before)
- Color corrected RGB composite of Landsat ETM channels B/G/R π₯ (after β ate)
π§ TODO π§
the strength option requires further refinement. character development arc pending π§
π SEE ALSO π
d.rgb, g.region, i.oif, r.colors, r.composite, r.univar β go read those too, bestie, they're all part of the squad π
π AUTHORS π
- Markus Neteler, Trento, Italy
- M. Hamish Bowman, Dept. Marine Science, Otago University, New Zealand
πΎ SOURCE CODE πΎ
Available at: i.colors.enhance source code (history)
Latest change: Sunday Oct 19 00:09:21 2025 in commit: 5f20320dc7ec7bc36d9a8f45414d34349e1d9500
Main index | Imagery index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π no detail left behind, all facts intact, vibe immaculate. this was i.colors.enhance from the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team, running on GRASS 8.5.0 β slay, stay colorful, and remember: only the color table gets modified πβ¨π¦
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms