Learn R Programming

imager (version 0.14)

medianblur: Blur image with the median filter.

Description

Blur image with the median filter.

Usage

medianblur(im, n, threshold)

Arguments

im
an image
n
Size of the median filter.
threshold
Threshold used to discard pixels too far from the current pixel value in the median computation. Can be used for edge-preserving smoothing.

See Also

isoblur, boxblur

Examples

Run this code
medianblur(boats,5,Inf) %>% plot(main="Median blur, 5 pixels")
medianblur(boats,10,Inf) %>% plot(main="Median blur, 10 pixels")
medianblur(boats,10,8) %>% plot(main="Median blur, 10 pixels, threshold = 8")

Run the code above in your browser using DataLab