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 |
|
Transforms the graylevels in each RGB channel according to a sinusoidal wave function. |
last modified: May 06, 2012
|
USAGE: wavemap [-c cycles] [-p phase] infile outfile
-c .... cycles ..... number of cycles in sinusiodal wave transform; PURPOSE: To transform the graylevels in each RGB channel according to a sinusoidal wave function. DESCRIPTION: WAVEMAP transform the graylevels in each RGB channel according to a sinusoidal wave function. This is similar to GIMP's Alien Map. ARGUMENTS: -c cycle ... CYCLES is the number of cycles in the sinusoidal wave transform. Values are floats>=0. One or three comma delimited values may be provided, one for each of the RGB channels. If only the one value is provided, the other two will be set to the same value. The default=0.5 (which is the same as 0.5,0.5,0.5). With phase=0, this produces a nearly linear transform. -p phase ... PHASE is the phase shift in degrees from a cosine wave. Values are in the range 0<=float<=360. One or three comma delimited values may be provided, one for each of the RGB channels. If only the one value is provided, the other two will be set to the same value. The default=0 (or 0,0,0) will produce a cosine wave. See http://www.imagemagick.org/Usage/transform/#function_sinusoid. In wavemap, we will add 90 degrees to the phase value so that the sinusoid will be shifted from a sine to a cosine wave as the default. With cycles=0.5, this produces a nearly linear transform. REQUIREMENT: IM version 6.4.8-9 or higher due to the use of -function sinusoid. 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. |
|
Original Image |
|
|
|
|
Arguments: -c 0.5 -p 0 (default) |
|
|
|
|
Arguments: -c 0.5 -p 30 |
|
|
|
|
Arguments: -c 0.7,0.5,0.5 -p 0 |
|
|
|
|
Arguments: -c 0.3,0.5,0.5 -p 0 |
|
|
|
|
Arguments: -c 0.5,0,0 -p 0 |
|
|
|
|
Arguments: -c 1 -p 0 |
|
|
What the script does is as follows:
This is equivalent to the following IM commands.
|