LEEFILT

The LEEFILT function performs the Lee filter algorithm on an image array using a box of size 2N+1. This function can also be used on vectors. The Lee technique smooths additive image noise by generating statistics in a local neighborhood and comparing them to the expected values.

This routine is written in the IDL language. It is based upon the algorithm published by Lee (Optical Engineering 25(5), 636-646, May 1986). Its source code can be found in the file leefilt.pro in the lib subdirectory of the IDL distribution.

Syntax

Result = LEEFILT( A [, N [, Sig]] [, /DOUBLE] [, /EXACT] )

Return Value

This function returns an array with the same dimensions as A. If any of the inputs are double-precision or if the DOUBLE keyword is set, the result is double-precision, otherwise the result is single-precision.

Arguments

A

The input image array or one-dimensional vector.

N

The size of the filter box is 2N+1. The default value is 5.

Sig

Estimate of the standard deviation. The default is 5. If Sig is negative, IDL interactively prompts for a value of sigma, and displays the resulting image using TVSCL (for arrays) or PLOT (for vectors). To end this cycle, enter a value of 0 (zero) for sigma.

Keywords

DOUBLE

Set this keyword to force the computations to be done in double-precision arithmetic.

EXACT

Set this keyword to apply a more accurate (but slower) implementation of the Lee filter.

Version History

Original

Introduced

See Also

DIGITAL_FILTER, MEDIAN, SMOOTH, VOIGT