Fred's ImageMagick Scripts
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 in the script or not, is restricted to the above licensing arrangements. It is also subject to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php |
|
Performs convolution on an image in the frequency domain. |
last modified: October 25, 2012
|
USAGE: fftconvol infile filtfile outfile No options are required. PURPOSE: To perform convolution on an image in the frequency domain. DESCRIPTION: FFTCONVOL performs convolution on an image in the frequency domain using a filter image. Two inputs are required. The image and a grayscale spatial domain convolution filter. Both the image and the grayscale spatial domain filter are transformed to the frequency domain using +fft. Then the Fourier transform of the filter is multiplied with the fft of the image and the product is then returned to the spatial domain using +ift. Any alpha channel on the filter will be removed automatically before processing. If the image has an alpha channel it will not be processed, but simply copied from the input to the output. ARGUMENTS: None The filter image must be appropriately centered and padded with black to the same size as the input image. REQUIREMENTS: IM version 6.5.4-7 or higher, but compiled with HDRI enabled in any quantum level of Q8, Q16 or Q32. Also requires the FFTW delegate library. See Fourier Transform with ImageMagick, for more details. 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. |
|
Gaussian Blurring |
||
|
Input |
Filter |
Arguments: |
|
|
|
|
Horizontal Motion Blur |
||
|
Input |
Filter |
Arguments: |
|
|
|
|
Lens Defocus |
||
|
Input |
Filter |
Arguments: |
|
|
|
|
What the script does is as follows:
This is equivalent to the following IM commands.
|