Fred's ImageMagick Scripts
|
Enhances the shadows and/or highlight regions in an image. |
last modified: November 27, 2011
|
USAGE: dualtonemap [-c] [-g gamma] [-m mode] [-b bias] [-t thresh] [-s svals] [-h hvals] [-r ramp] infile outfile
-c .............. set colorspace of input image to sRGB before processing PURPOSE: Enhances the shadows and/or highlight regions in an image. DESCRIPTION: DUALTONEMAP enhances the shadows and/or highlight regions in an image. This is done by adjusting the -level blackpoint,whitepoint% in the shadows and/or highlight regions. This is similar to Photoshop's Shadows/Highlights function. ARGUMENTS: -c ... Set colorspace of input image to sRGB before processing. This provides an initial non-linear processing. Options are: yes or no. The default=no. -g gamma ... GAMMA applies a non-linear gamma processing to input image before processing. Alternate to -c option. Do not use both. Values are floats>0. Nominal value is gamma=2. The default=1 (no non-linear gamma processing). -m mode ... MODE of operation that specifies to adjust shadows or highlights or both. Choices are shadows (or s), highlights (or h) or both (or b). The default=both -b bias ... BIAS is the percent shift of the mean value of the input that is is used as the nominal threshold value between shadows and highlights. Values are positive or negative floats. The default=0 indicates no change from the global mean value of all channels of the input image. -t thresh ... THRESH is the user specified threshold value. When used, it overrides the automatic value from the (mean + bias) value. Values are floats between 0 and 100. The default is to use automatic value from the (mean + bias). -s svals ... SVALS=blackpoint,whitepoint,gamma used by -level in the shadows region. Values of each blackpoint and whitepoint are float percents in the range of 0 to 100 and gamma is a float>0. A value of svals=0,100,1 produces no change. The default=0,50,1. -h hvals ... HVALS=blackpoint,whitepoint,gamma used by -level in the highlights region. Values of each blackpoint and whitepoint are float percents in the range of 0 to 100 and gamma is a float>0. A value of hvals=0,100,1 produces no change. The default=50,100,1. -r ramp ... RAMP is the transition distance in pixels between the shadows and highlights. Values are integers>=0. The default=50. 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 |
-m shadows -s 0,30 |
-m shadows -s 0,100 -c |
|
|
|
|
Example 2 |
|
|
Original | |
|
|
|
Arguments: |
Arguments: |
|
|
|
Example 3 |
|
|
Original | |
|
|
|
Arguments: |
Arguments: |
|
|
|
Example 4 |
|
|
Original | |
|
|
|
Arguments: |
Arguments: |
|
|
|
Example 5 |
|
|
Original |
|
|
Arguments: |
|
|
Arguments: |
|
|
Arguments: |
|
|
Example 6 |
|
|
Original | |
|
|
|
Arguments: |
Arguments: |
|
|
|
Example 7 |
|||
|
Original |
|
||
|
Arguments: |
|
||
|
Example 8 |
|||
|
Original |
|
||
|
Arguments: |
|
||
|
Arguments: |
|
||
|
What the script does is as follows:
This is equivalent to the following IM commands
|