powered by
interp(im, locations, cubic = FALSE, extrapolate = TRUE)
loc <- data.frame(x=runif(10,1,width(boats)),y=runif(10,1,height(boats))) #Ten random locations interp(boats,loc)
Run the code above in your browser using DataLab