cimg.limit.openmp()
#These two versions are equivalent
imfill(10,10) %>% crop.borders(nx=1,ny=1)
imfill(10,10) %>% crop.borders(nPix=1)
#Filter, keep valid part
correlate(boats,imfill(3,3)) %>% crop.borders(nPix=2)
Run the code above in your browser using DataLab