
Last chance! 50% off unlimited learning
Sale ends in
medianBlur
smoothes an image using a median filter, i.e.
the value of each pixel is replaced by the median value of all the pixels in
its neighborhood.
medianBlur(image, k_size = 5, in_place = FALSE)
An Image
object.
The half-size in pixels of the kernel (default: 5).
A logical indicating whether the change should be applied to the image itself (TRUE, faster but destructive) or to a copy of it (FALSE, the default, slower but non destructive).
An Image
object if in_place=FALSE
. Otherwise, it
returns nothing and modifies image
in place.
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_blur <- medianBlur(balloon, 11)
plot(balloon_blur)
# }
Run the code above in your browser using DataLab