# NOT RUN {
##- required packages
require(uavRst)
require(link2GI)
setwd(tempdir())
## check if OTB exists
giLinks <- list()
giLinks$otb <- link2GI::linkOTB()
if (giLinks$otb$exist) {
data("pacman")
pacman<-raster::disaggregate(pacman,10)
raster::writeRaster(pacman,"pacman.tif",overwrite=TRUE)
##- calculate Sobel edge detection
r<-otbtex_gray(input="pacman.tif",
filter = "erode",
structype = "ball",
structype.ball.xradius = 3,
structype.ball.yradius = 3 ,
retRaster = TRUE)
##- visualize all layers
raster::plot(r[[1]])
}
# }
Run the code above in your browser using DataLab