R/rs_textures.R
, R/funs_otb_textures.R
otb_stat.Rd
Calculates local statistics for a given kernel size
Calculates local statistics for a given kernel size
otb_stat(
input = NULL,
out = "localStat",
ram = "8192",
radius = 3,
channel = NULL,
retRaster = FALSE,
outDir = NULL,
verbose = FALSE,
otbLinks = NULL,
gdalLinks = NULL
)
otb_stat(
input = NULL,
out = "localStat",
ram = "8192",
radius = 3,
channel = NULL,
retRaster = FALSE,
outDir = NULL,
verbose = FALSE,
otbLinks = NULL,
gdalLinks = NULL
)
of GeoTiff containing 1 ore more gray value bands
string pattern vor individual naming of the output file(s)
reserved memory in MB
computational window in pixel
sequence of bands to be processed
boolean if TRUE a raster stack is returned
output Directory
switch for system messages default is FALSE
list. of GI tools cli pathes
list. GDAL tools cli paths
raster* object
raster* object
the otb is used for the calculation of the statistics. Please provide a GeoTiff file
the otb is used for the calculation of the statistics. Please provide a GeoTiff file
if (FALSE) {
# load libraries
require(uavRst)
require(link2GI)
require(listviewer)
setwd(tempdir())
# check if OTB exists
otbLinks <- link2GI::linkOTB()
if (otbLinks$exist) {
data("rgb")
raster::plotRGB(rgb)
fn<-file.path(tempdir(),"rgb.tif")
raster::writeRaster(rgb,
filename=fn,
format="GTiff",
overwrite=TRUE)
# get help
cmd<-link2GI::parseOTBFunction(algo = "LocalStatisticExtraction",gili=otbLinks)
listviewer::jsonedit(cmd$help)
# calculate statistics
result<- otb_stat(input=fn,
radius=5,
retRaster = TRUE,
channel = 1,
otbLinks = otbLinks)
# plot the results :
raster::plot(result[[1]])
}
}
if (FALSE) {
# load libraries
require(link2GI)
require(listviewer)
setwd(tempdir())
# check if OTB exists
otbLinks <- link2GI::linkOTB()
if (otbLinks$exist) {
data("rgb")
raster::plotRGB(rgb)
fn<-file.path(tempdir(),"rgb.tif")
raster::writeRaster(rgb,
filename=fn,
format="GTiff",
overwrite=TRUE)
# get help
cmd<-link2GI::parseOTBFunction(algo = "LocalStatisticExtraction",gili=otbLinks)
listviewer::jsonedit(cmd$help)
# calculate statistics
result<- otb_stat(input=fn,
radius=5,
retRaster = TRUE,
channel = 1,
otbLinks = otbLinks)
# plot the results :
raster::plot(result[[1]])
}
}