inpaint | R Documentation |
Fill in NA values (inpainting) using a Gaussian filter, i.e. replace missing pixel values with a weighted average of the neighbours.
inpaint(im, sigma)
im |
input image |
sigma |
std. deviation of the Gaussian (size of neighbourhood) |
an image with missing values filled-in.
Simon Barthelme
im <- boats
im[sample(nPix(im),1e4)] <- NA
inpaint(im,1) %>% imlist(im,.) %>%
setNames(c("before","after")) %>% plot(layout="row")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.