path = system.file("tmp_images", "1.png", package = "OpenImageR")
image = readImage(path)
res_dilate = dilationErosion(image, Filter = c(3,3), method = 'dilation')
res_erode = dilationErosion(image, Filter = c(5,5), method = 'erosion')
Run the code above in your browser using DataLab