| medianFilter {EBImage} | R Documentation |
Filters a 16-bit image using Perreault's modern constant time median filtering algorithm [1].
medianFilter(x, size, cacheSize=512)
x |
An |
size |
The sizelength of the square median filter in units of pixels. |
cacheSize |
The L2 cache size of the system CPU in kB. |
Median filtering is useful as a smoothing technique, e.g. in the removal of speckling noise.
If x contains multiple frames, the filter will be applied on each frame.
An Image object or an array, containing the filtered version
of x.
Joseph Barry, joseph.barry@embl.de, 2012
[1] S. Perreault and P. Hebert, "Median Filtering in Constant Time", IEEE Trans Image Process 16(9), 2389-2394, 2007
x = readImage(system.file("images", "nuclei.tif", package="EBImage"))
if (interactive()) display(x, title='Nuclei')
y = medianFilter(x, 5)
if (interactive()) display(y, title='Filtered nuclei')