FFTFilter

Syntax

Document.FFTFilter ( Type, Cutoff, Weight[, MinPixel, MaxPixel, ShrinkPixels, FadePixels ] )

Parameters

FFTFilterType Type - type of filter applied to the intermediate spatial frequency information

mxHighPassFF (0) : High pass filter, sharpening image

mxLowPassFF (1) : Low pass filter, smoothing image

Float Cutoff - radius of filter cutoff as percentage of image size

Float Weight - weight (0 to 100%) applied to filter output when mixing with original input data to produce the final result

VARIANT MinPixel - [optional] Minimum value of pixels to be filtered

VARIANT MaxPixel - [optional]  Maximum value of pixels to be filtered

VARIANT ShrinkPixels - [optional] Additional distance criterion for pixels to be filtered: a pixel within this distance of a pixel less than MinPixel or greater than MaxPixel is not affected by the filter

VARIANT FadePixels - [optional] Distance at the boundary between protected and filtered pixels over which the effect of the filter is blended

Returns

Nothing

Remarks

Transforms image to spatial frequency domain using a Fast Fourier Transform algorithm, applies a high- or low-pass filter with a specified roll-off point, and transforms the result back using an inverse FFT and mixes it with the original. The Cutoff parameter determines the radius within which (for high pass) or outside which (for low pass) spatial frequencies are suppressed. For a high pass filter, 50% corresponds to a mild filter, 25% to medium, and 10% to hard. For a low pass filter, 5% corresponds to a mild filter, 2.5% to medium, and 1.5% to hard. (These values are for illustration: any desired values can be used.) The Weight parameter is used in the final mixing staging to moderate the amount of filtering; typical values range from 30% for restrained filtering to 80% for strong effects.

The MinPixel, MaxPixel, ShrinkPixels and FadePixels are all optional, but either all or none must be specified. They correspond to the control parameters of the Pixel Range Restriction subdialog of the FFT Filter dialog. MinPixel and MaxPixel should be VARIANTs of subtype Single (or convertible to Single); ShrinkPixels and FadePixels should be VARIANTs of subtype Long (or convertible to Long). If the restrictions are set so stringently that no pixels qualify for filtering, FFTFilter throws an exception.

This method is equivalent to the FFT Filters command.