The Median filter algorithm replaces a target pixel's value with the median value of the neighboring pixels. The designation of neighbor is determined by the size and shape of the kernel. A kernel is much like a mask; the pixels in the masked area are part of the neighborhood. The kernel's size and shape determines the number of pixel values used to calculate the median. You can adjust this algorithm's parameters to change the kernel's size and shape, apply selective filtering, and repetitively apply the selected filtering for any portion of the image you select.
The median filter algorithm is most useful for removing shot noise, which is noise that appears as random spots in an image. Shot noise can be caused by dust or a bad detector in image acquisition or by errors in data transfer (Lyon, Russ). Note that because there is no inverse function for the median filter algorithm, the original image cannot be reconstructed. This algorithm is also called a rank-type filter, because the list of values must be sorted before a useful value can be found.
You can apply this algorithm to color and gray-scale 2D, 2.5D, and 3D images. However, you cannot apply this algorithm to complex images.
The following special notes apply:
To run this algorithm, complete the following steps:
Number of iterations
|
Indicates the number of times to filter the image with a median filter of the selected deviation, kernel size, and kernel shape.
|
|
Maximum standard deviation
|
The maximum allowable magnitude of the pixel value as a function of the standard deviation. The system replaces any pixel whose value is outside this function of the standard deviation from the mean of the neighborhood (as selected by the kernel-size and shape) by the median of the neighborhood. A value of 0.0 is equivalent to replacing every pixel with the median of its neighborhood. A value of 1.0 limits the filtering of the image. The system processes only target pixels whose values are greater than 1.0 standard deviation from its neighbors.
| |
Kernel size
|
A k' x 'k region selects a neighborhood that extends in all directions by ('k'-1)/2, placing the target pixel in the center of the kernel.
| |
Kernel shape
|
Selects which pixels in the kernel size box are included as a part of the median's neighborhood.
| |
Kernel size adaptively changes
|
This checkbox indicates whether median filter should be run via adaptive filtering. Adaptive filtering has 3 main purposes: 1. To remove salt-and-pepper (impulse) noise; 2. To prove smoothing of other noise that may not be impulsive; 3. And to reduce distortion, such as excessive thinning or thickening of object borders.
| |
Maximum Kernel Size
|
This is the maximum kernel size that the window size can get increased to under the algorithm.
| |
Red channel
|
Filters the red channel (for use with RGB images).
| |
Green channel
|
Filters the green channel (for use with RGB images).
| |
Blue channel
|
Filters the blue change (for use with RGB images).
| |
New image
|
Indicates where the results of the algorithm appear. If you select this option, the results appear in a new image window.
| |
Replace image
|
Indicates where the results of the algorithm appear. If you select this option, the results replace the current active image.
| |
Whole image
|
Applies the algorithm to the whole image.
| |
VOI region(s)
|
Applies the algorithm to the volumes (regions) delineated by the VOIs.
| |
Apply slice kernel
|
Filters each slice of the image independently of other slices, finding neighboring pixels from the slice.
| |
Apply volume kernel
|
Gathers pixel values from the slice as well as from neighboring slices.
| |
OK
|
Applies the Median algorithm according to the specifications in this dialog box.
| |
Cancel
|
Disregards any changes that you made in this dialog box and closes the dialog box.
| |
Help
|
Displays online help for this dialog box.
|