The Laplacian is the sum of second derivatives, approximated here using finite differences.
imlap(im)
im
an image
imlap(boats) %>% plot