Calculates edges for a given kernel size. return list of geotiffs containing thelocal statistics for each channel

Calculates edges for a given kernel size. return list of geotiffs containing thelocal statistics for each channel

otbtex_edge(
  input = NULL,
  out = "edge",
  ram = "8192",
  filter = "gradient",
  touzi_xradius = 1,
  touzi_yradius = 1,
  channel = NULL,
  retRaster = FALSE,
  outDir = NULL,
  verbose = FALSE,
  otbLinks = NULL,
  gdalLinks = NULL
)

otbtex_edge(
  input = NULL,
  out = "edge",
  ram = "8192",
  filter = "gradient",
  touzi_xradius = 1,
  touzi_yradius = 1,
  channel = NULL,
  retRaster = FALSE,
  outDir = NULL,
  verbose = FALSE,
  otbLinks = NULL,
  gdalLinks = NULL
)

Arguments

input

of GeoTiff containing 1 ore more gray value band(s)

out

the output mono band image containing the edge features

ram

reserved memory in MB

filter

the choice of edge detection method (gradient/sobel/touzi)

touzi_xradius

x radius of the Touzi processing neighborhood (if filter==touzi) (default value is 1 pixel)

touzi_yradius

y radius of the Touzi processing neighborhood (if filter==touzi) (default value is 1 pixel)

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

otbLinks

list of OTB tools cli pathes

gdalLinks

list of GDAL cli pathes

Value

raster* object

raster* object

Note

the otb is used for filtering. please provide a GeoTiff file

the otb is used for filtering. please provide a GeoTiff file

Author

Chris Reudenbach

Examples

if (FALSE) {
# required packages
# 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 = "EdgeExtraction",gili=otbLinks)
listviewer::jsonedit(cmd$help)

# calculate Sobel edge detection
  r<-otbtex_edge(input=fn,
                 filter="sobel",
                 retRaster = TRUE,
                 otbLinks = otbLinks)

# visualize all layers
  raster::plot(r[[1]])
}
}
if (FALSE) {
# required packages
# 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 = "EdgeExtraction",gili=otbLinks)
listviewer::jsonedit(cmd$help)

# calculate Sobel edge detection
  r<-otbtex_edge(input=fn,
                 filter="sobel",
                 retRaster = TRUE,
                 otbLinks = otbLinks)

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