Fred's ImageMagick Scripts
My scripts are available free of charge for non-commercial use. If you redistribute or incorporate any of these scripts into other free applications, you may use my scripts by simply referencing my name and this web page: Fred Weinhaus and http://www.fmwconcepts.com/imagemagick/index.html For use of my scripts in commercial use or non-free applications, please contact me for
licensing arrangements. Usage, whether stated in script or not, is also subject to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php |
|
Corrects the color balance for red light attenuation in pictures taken underwater. |
last modified: November 28, 2011
|
USAGE: uwcorrect [-m method] [-b bright] [-c contrast] [-s sat] [-h hue] [-S sharp] infile outfile
-m .... method ......... method of red substitution; method=1 or 2; PURPOSE: To correct the color balance for red light attenuation in pictures taken underwater. DESCRIPTION: UWCORRECT corrects the color balance for red light attenuation in pictures taken underwater. It uses a red colorized grayscale version of the image to compensate for the nearly dark red channel. ARGUMENTS: -m method ... METHOD is the technique for red substitution. Choices are method=1 or 2. Method 1 uses -tint. Method 2 uses -level-colors. The default=1 -b bright ... BRIGHT is the percent change in brightness. Values are integers between -100 and 100. Positive values increase brightnesss and negative values decrease brightness. The default is zero or no change. -c contrast ... Contrast is the percent change in contrast. Values are integers between -100 and 100. Positive values increase contrast and negative values decrease contrast. The default is zero or no change. -s sat ... Sat is the percent change in saturation. Values are integers between -100 and 100. Positive values increase contrast and negative values decrease contrast. The default is zero or no change. -h hue ... HUE is the percent change in hue. Values are integers between -100 and 100 (corresponding to -180 deg and +180 deg shifts). Positive values shift red towards yellow and green and negative values shift red toward magenta and blue. Similarly for other colors. The default is zero or no change. -S sharp ... SHARP is the change in sharpness expressed in pixels. Values are integers greater than or equal to 0. The default=0 or no sharpening. NOTE: This script requires IM 6.5.9-0 or higher due if using -brightness-contrast; otherwise IM 6.5.5-1 due to the use of -auto-level.
Technique References: 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. |
|
Example 1 |
|
|
Original |
Arguments: |
|
|
|
Example 2 |
|
|
Original |
Arguments: |
|
|
|
Example 3 |
|
|
Original |
Arguments: |
|
|
|
What the script does is as follows:
This is equivalent to the following IM commands for tint case.
|