FILT_SMOOTH Function (PV-WAVE Extreme Advantage)

Performs smoothing on 1D, 2D or 3D image arrays.

Usage

result = FILT_SMOOTH(image, wxdim [, wydim[, wzdim]])

Input Parameters

image—A 1D, 2D, or 3D array containing a signal; point or signal-interleaved signals; an image; image, row or pixel-interleaved images; or a volume.

wxdim—The width of the filtering window.

wydim—(optional) The height of the filtering window. (Required for images and volumes.)

wzdim—(optional) The depth of the filtering window. (Required for volumes.)

Returned Value

result—An array containing the filtered data that is of the same size and dimensions as image, unless otherwise affected using the Edge keyword.

Keywords

Edge—A scalar string indicating how edge effects are handled. (Default: 'zero') Valid strings are:

'pad'—The input image is padded before the filtering operation with the value specified using the Pad_Value keyword.

'zero'—Sets the border of the output image to zero. (Default)

'copy'—Copies the border of the input image to the output image.

'reduce'—Returns a reduced-size image that is smaller than the input image by the kernel dimensions.

Intleave—A scalar string indicating the type of interleaving of 2D input signals and 3D image arrays. Valid strings and the corresponding interleaving methods are:

'point'—The 2D input array arrangement is (px) for p  point-interleaved signals of length x.

'signal'—The 2D input image array arrangement is (xp) for p  signal-interleaved signals of length x.

'pixel'—The input array arrangement is (pxy) for p  pixel-interleaved images of x-by-y.

'row'—The 3D image array arrangement is (xpy) for p  row-interleaved images of x-by-y.

'image'—The 3D image array arrangement is (xyp) for p  image-interleaved images of x-by-y.

'volume'—The input image array is treated as a single entity.

Pad_Value—A scalar value to use to pad the image. (Default: 0)

Spot—This keyword specifies explicit positioning of the element number of the filter window “sweet spot.” The Spot keyword default depends on the setting of the Edge keyword as shown in Edge and Spot Keywords Relationships.

Zero_Negatives—If set, all negative values in the result are set to zero.

Discussion

The smoothing filter is used to clear up image blurring, perform lowpass filtering, and to remove noise. FILT_SMOOTH uses the same algorithm as the PV-WAVE  SMOOTH function, except that FILT_SMOOTH offers greater control over filter window dimensions, edge effects, and interleaving.

Example

; Read an image.
image = IMAGE_READ(!IP_Data + 'noise_test.tif')
; Look at the noisy image.
IMAGE_DISPLAY, image
; Use smoothing to remove noise.
smooth_image = FILT_SMOOTH(image('pixels'), 3,5)
; Display the smoothed image.
TVSCL, smooth_image

See Also

FILT_NONLIN

In the PV‑WAVE Reference:  MEDIAN,  SMOOTH