Learn R Programming

uavRst (version 0.5-2)

otbtex_gray: Calculates Gray scale morphological operations for a given kernel size.

Description

Calculates Gray scale morphological operations for a given kernel size. return list of geotiffs containing thelocal statistics for each channel

Usage

otbtex_gray(input = NULL, out = "morpho", ram = "8192",
  filter = "dilate", structype = "ball", structype.ball.xradius = 5,
  structype.ball.yradius = 5, channel = NULL, retRaster = FALSE,
  outDir = NULL, verbose = FALSE, giLinks = NULL)

Arguments

input

of GeoTiff containing 1 ore more gray value bands

out

the output mono band image containing the edge features

ram

reserved memory in MB

filter

the choice of the morphological operation (dilate/erode/opening/closing) (default value is dilate)

structype

the choice of the structuring element type (ball/cross)

structype.ball.xradius

x the ball structuring element X Radius (only if structype==ball)

structype.ball.yradius

y the ball structuring element Y Radius (only if structype==ball)

channel

sequence of bands to be processed

retRaster

boolean if TRUE a raster stack is returned

outDir

output Directory

verbose

switch for system messages default is FALSE

giLinks

list. of GI tools cli pathes

Examples

Run this code
# NOT RUN {
require(uavRst)
require(link2GI)
setwd(tempdir())
## check if OTB exists
giLinks<-list()
giLinks$otb <- link2GI::linkOTB()

if (giLinks$otb$exist) {
data("pacman")
raster::writeRaster(pacman,"pacman.tif",overwrite=TRUE)
r<-otbtex_gray(input="pacman.tif",retRaster = TRUE)

##- visualize all layers
raster::plot(r[[1]])
}
# }

Run the code above in your browser using DataLab