Fred's ImageMagick Scripts
|
Transform an image's overall color balance according to a desired change in a specified white point color. |
last modified: May 30, 2008
|
USAGE: whitebalance [x,y] [-c color] [-r refcolor] infile outfile
x,y .................. x,y coordinate in the image to get color to PURPOSE: To transform an image's overall color balance according to a desired change in a specified white point color. DESCRIPTION: WHITEBALANCE transforms an image's overall color balance according to a desired change in a specified white point color. The white point color may be specified by selecting a pixel coordinate (position) to extract the color or by specifying the color that should be transformed to pure white. One or the other must be specified, but not both. The white point color values (actually any color value as an r,g,b triple in the range of 0 to 255) may be specified. ARGUMENTS: x,y ... x,y are the coordinates in the image where the color is to be extracted and transformed to pure white. -c color ... COLOR is the color to be used to transform to pure white. Any IM color specification is valid. Be sure to enclose it in double quotes. One or the other of the above must be provided, but not both. -r refcolor ... REFCOLOR is the reference color to which to match. Any IM color specification is valid. Be sure to enclose it in double quotes. The default="white". 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. |
|
White Balance Transformation Of An Image |
|||
|
Original Image |
Arguments: |
Arguments: |
Arguments: |
|
|
|
|
|
What the script does is as follows:
This is equivalent to the following IM commands:
|