Fred's ImageMagick Scripts



    Licensing:

    Copyright © Fred Weinhaus

    My scripts are available free of charge for non-commercial 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

DAVEHILLEFFECT


Applies a DaveHill-like effect to an image.

Download Script

last modified: September 26, 2017



USAGE: davehilleffect [-b brightness] [-c contrast] [-g gain ] infile outfile
USAGE: davehilleffect [-h or -help]

-b ... brightness ... brightness factor; float>=0; default=1 no change
-c ... contrast ..... contrast; float; nominally -10 to 10; default=0
-g ... gain ......... effect gain; 0<=integer<=100; default=40

PURPOSE: To apply a DaveHill-like effect to an image.

DESCRIPTION: DAVEHILLEFFECT applies a DaveHill-like effect to an image.

ARGUMENTS:

-b brightness ... BRIGHTNESS is a brightness factor. Values are floats>=0. The default=1 or no change. Increase brightness is larger than 1. Decrease brightness is less than 1.

-c contrast ... CONTRAST is a sigmoidal contrast. Values are floats nominally in the range of -10 to 10. Positive values increase contrast and negative values decrease contrast. The default=0 (no change).

-g gain ... GAIN is the effect gain. Values are integers between 0 and 100. The default=40

REFERENCES:
http://www.diyphotography.net/creating-that-dave-hill-look
http://logosdesign.blogspot.com/2008/07/dave-hill-effect-photography-tutorial.html

REQUIREMENTS: IM 6.6.1.9 due to the use of -morphology DoG

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.


EXAMPLES


Example 1

Original
(source image)

Arguments:
-b 1 -c 0 g 0

Arguments:
-b 1 -c 0 g 40
(default)

Arguments:
-b 1 -c 0 -g 70

Arguments:
-b 1 -c -5 -g 40



Example 2

Original
(source image)

Arguments:
-b 1 -c 0 -g 40
(default)

Arguments:
-b 1 -c 0 -g 20

Arguments:
-b 1 -c -5 -g 20



What the script does is as follows:

  • Read image, enhance brightness and sigmoidal-contrast
  • Clone and apply high pass filter using DoG
  • Do vividlight composite between the two images
  • Clone result and apply high pass filter
  • Set up gray image of appropriate value to use as mask
  • Use hardlight composite of the last three images

This is equivalent to the following IM commands

  • grayval="gray$gain"
  • convert $tmpA1 -evaluate multiply $brightness +sigmoidal-contrast $contrast,50% \
    \( -clone 0 -bias 50% -define convolve:scale=1 -morphology Convolve DoG:0,0,4 \) \
    -compose vividlight -composite \
    \( -clone 0 -bias 50% -define convolve:scale=1 -morphology Convolve DoG:0,0,6.9 \) \
    \( -clone 0 -fill $grayval -colorize 100 \) \
    -compose colorize -composite $outfile