LEEFILT Function
Standard Library function that performs image smoothing by applying the Lee Filter algorithm.
Usage
result = LEEFILT(image[, n, sigma])
Input Parameters
image—A 1D, 2D, or 3D array containing a signal; signal-interleaved signals; an image; image-interleaved images; or a volume.
n—(optional) The value of 2n + 1 is used for the side of the filter box. The side of the filter box must be smaller than the smallest dimension of image. (Default: 5)
sigma—(optional) The estimate of the standard deviation. The value must be a positive. (Default: 5)
 
note
If sigma is negative, you will be prompted for a value to be typed in, the value will be displayed, and the filtered image will be displayed with the TVSCL command. This cycle will continue until a zero value of sigma is entered.
Returned Value
result—A two-dimensional array containing the smoothed image.
Keywords
Edge—A scalar string indicating how edge effects are handled. (Default: 'copy') Valid strings are:
*'zero'—Sets the border of the output image to zero.
*'copy'—Copies the border of the input image to the output image. (Default)
Intleave—A scalar string indicating the type of interleaving of 2D input signals containing signal-interleaved signals; and 3D input arrays containing image-interleaved images, or a volume. Valid strings and the corresponding interleaving methods are:
*'signal'—The 2D input image array arrangement is (xp) for p  signal-interleaved signals of length x.
*'image'—The 3D image array arrangement is (x, y, p) for p  image-interleaved images of x-by-y.
*'volume'—The input image array is treated as a single entity.
Discussion
LEEFILT performs image smoothing by applying the Lee Filter algorithm. This algorithm assumes that the sample mean and variance of a value is equal to the local mean and variance of all values within a fixed range surrounding it. LEEFILT smooths additive signal noise by generating statistics in a local neighborhood and comparing them to the expected values.
Since LEEFILT is not computationally expensive, it can be used for near real-time image processing. It can be used on signals as well as images.
For details on the Lee Filter, see the article by Jong-Sen Lee, “Digital Image Enhancement and Noise Filtering by Use of Local Statistics,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume PAMI-2, Number 2, pages 165-168, March 1980.
See Also