# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
rnd <- image(array(sample(0:30, nrow(balloon) * ncol(balloon), replace = TRUE),
dim = c(nrow(balloon), ncol(balloon), 3)))
changeBitDepth(rnd, "8U", target = "self")
balloon_noisy <- balloon + rnd
balloon_bilateral <- bilateralFilter(balloon_noisy, 25)
# }
Run the code above in your browser using DataLab