# NOT RUN {
require(uavRst)
require(link2GI)
# check if OTB is installed correctly
giLinks<-list()
giLinks$otb <- link2GI::linkOTB()
if (giLinks$otb$exist) {
setwd(tempdir())
data("pacman")
raster::writeRaster(pacman,"pacman.tif",overwrite=TRUE)
# calculate statistics
result<- otb_stat(input="pacman.tif",
radius=5,
retRaster = TRUE,
channel = 1,
giLinks = giLinks)
#plot the results :
raster::plot(result[[1]])
}
# }
Run the code above in your browser using DataLab