Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Automatically tone balances an image. |
last modified: December 15, 2018
USAGE: autotone [-b] [-g] [-w] [-G] [-n] [-s] [-p] [-R resize] [-P percent]
-b .................... disable auto brightness/contrast PURPOSE: To automatically tone balance an image. DESCRIPTION: AUTOTONE attempts to automatically tone balance and image. This includes auto brightness/contrast adjustment, auto gray balance, auto white balance, auto gamma correction, auto noise removal and auto sharpening. ARGUMENTS: -b ... disable auto brightness/contrast -g ... disable auto gray balance -w ... disable auto white balance -G ... disable auto gamma correction -n ... disable auto noise removal -s ... disable auto sharpening -p ... enable progress monitoring -R resize ... RESIZE is the limit on the output image size. Values are integer>0. This will only resize if the larger dimension of the image exceeds this value. The default is no limit (i.e. no resize). -P percent ... PERCENT is the percent threshold for detecting gray/white in the image for auto gray and auto white balance. Values are 0<floats<100. The default=1. -M midrange ... MIDRANGE value for auto gamma correction. Values are 0<floats<1. The default=0.425. -N noise ... NOISE removal factor. Values are integers>0. The default is automatically computed. The nominal range is about 1 to 4 depending upon image size. Larger values are used for larger images. -S sharp ... SHARP is the sharpening amount. Values are floats>=0. The default is automatically computed. The nominal range is about 1 to 4. Larger values are used for larger images. -WN whitenorm ... WHITENORM is the white balance r,g,b ratio normalization method. The choices are: none (n), ave (a), max (m). The default=none -GN graynorm ... GRAYNORM is the gray balance r,g,b ratio normalization method. The choices are: none (n), ave (a), max (m). The default=none NOTE: The white balance and gray balance techniques now have optional r,g,b ratio normalizations that help prevent brightness increases and over-saturation at white from these parts of the script. Furthermore, to avoid possible excess color shifts as well as mitigate over-saturation of white, one may reduce the percent argument to about 0.1. All of the above as well as the midrange argument are subject to personal tastes and tuning. The defaults have been left in the old mode for backward compatibility. I thank Dr. Guenter Grau for the suggestion to normalize the r,g,b ratios in the white balance and gray balance parts of the code. My current recommendation is to use whitenorm=ave, graynorm=ave and percent=0.1. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
|
Arguments: (defaults) |
Original Image |
||
|
||
Arguments: (defaults) |
Arguments: -G |
Arguments: -M 0.5 |
What the script does is as follows:
|