R/rs_textures.R
, R/funs_otb_textures.R
otbtex_gray.Rd
Calculates Gray scale morphological operations for a given kernel size. return list of geotiffs containing thelocal statistics for each channel
Calculates Gray scale morphological operations for a given kernel size. return list of geotiffs containing thelocal statistics for each channel
otbtex_gray(
input = NULL,
out = "morpho",
ram = "8192",
filter = "dilate",
structype = "ball",
xradius = 5,
yradius = 5,
channel = NULL,
retRaster = FALSE,
outDir = NULL,
verbose = FALSE,
otbLinks = NULL,
gdalLinks = NULL
)
otbtex_gray(
input = NULL,
out = "morpho",
ram = "8192",
filter = "dilate",
structype = "ball",
xradius = 5,
yradius = 5,
channel = NULL,
retRaster = FALSE,
outDir = NULL,
verbose = FALSE,
otbLinks = NULL,
gdalLinks = NULL
)
of GeoTiff containing 1 ore more gray value bands
the output mono band image containing the edge features
reserved memory in MB
the choice of the morphological operation (dilate/erode/opening/closing) (default value is dilate)
the choice of the structuring element type (ball/cross)
x the ball structuring element X Radius (only if structype==ball)
y the ball structuring element Y Radius (only if structype==ball)
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 filtering. please provide a GeoTiff file
the otb is used for filtering. 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 = "GrayScaleMorphologicalOperation",gili=otbLinks)
listviewer::jsonedit(cmd$help)
r<-otbtex_gray(input="pacman.tif",retRaster = TRUE,otbLinks=otbLinks)
##- visualize all layers
raster::plot(r[[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 = "GrayScaleMorphologicalOperation",gili=otbLinks)
listviewer::jsonedit(cmd$help)
r<-otbtex_gray(input="pacman.tif",retRaster = TRUE,otbLinks=otbLinks)
##- visualize all layers
raster::plot(r[[1]])
}
}