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. |
Manually color balances an image in midtones, highlights, shadows or overall. |
last modified: December 15, 2018
USAGE: colorbalance [-c color] [-a amount] [-r region] [-m mid] [-f factor] [-l low] [-h high] [-t taper] infile outfile
-c .... color ..... color to modify: red (r), yellow (y), green (g), PURPOSE: To manually color balance an image in midtones, highlights, shadows or overall. DESCRIPTION: COLORBALANCE manually color balances an image according to a user selected color, region and amount. The regions are midtones, shadows, highlights or all (i.e. the whole image). The regions thresholds default to mean +/- factor*standard-deviation of the appropriate channel or can be set manually. The region boundaries can be tapered so that they change gradually. ARGUMENTS: -c color ... COLOR to modify. The choices are: red (r), yellow (y), green (g), cyan (c), blue (b) or magenta (m). The default=red -a amount ... AMOUNT of color change. Values are in the range 0<=float<=100. The default=10. -r region ... REGION of image to change. The choices are: midtones (m), shadows (s), highlights (h) or all (a) for the whole image. The default=all. -m mid ... MID is the threshold value that determines the center of the midtone range. Values are in the range 0<=float<=100. The default is the appropriate channel mean. -l low ... LOW is the threshold value that determines the low end of the midtones and the high end of the shadows. Values are in the range 0<=float<=100. The default is the appropriate channel mean - factor*standard-deviation -h high ... HIGH is the threshold value that determines the high end of the midtones and the low end of the highlights. Values are in the range 0<=float<=100. The default is the appropriate channel mean + factor*standard-deviation -f factor ... FACTOR is the multiplication factor for the standard deviation used for the low and high threshold values. Values are floats>0. The default=0.5. -t taper ... TAPER is the taper for range the thresholds in pixels. Values are integers>=0. The default=10 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. |
Variation In Color Over Whole Image |
|||||
Original Image |
|||||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Variation In Range For Color Red |
|||
Original Image |
|||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for the case of midtones:
|