contrastFilterSegmentation: Contrast-Filter-Segmentation

Description Usage Arguments Value Note

View source: R/contrastFilterSegmentation.R

Description

This function performs a contrast filter segmentation on an input RasterLayer. In the firest stept the raster is converted to a gray-scale matrix, followed by filter functions of the EBImage package. Then, the filtering is applied as mask on the segmentation-input. Afterwards, a segmentation is performed using GRASS GIS region growing. Finally, the segments are transformed to SpatialPolygonsDataFrame and returned as function output. In the future this funcion will be included in the segmentation-function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
contrastFilterSegmentation(input.filter,
  input.segmentation = input.filter, offset = 0.06,
  makeBrush.size = 25, makeBrush.shape = "disc", NA.val.in = 0,
  clump.thresh = NULL, clump.directions = 4,
  env.rsaga = RSAGA::rsaga.env(), CFR.buf = 1,
  output.path = tempdir(), writeCFRaster = FALSE,
  writeRaster.NAflag = -99999, freeMemory = TRUE,
  show.output.on.console = FALSE, quiet = TRUE, morph.Closing = TRUE,
  closing.size = 3, closing.shape = "box",
  Grass.Segmentation.Threshold = 0.24, Grass.Segmentation.Minsize = 1,
  Grass.Segmentation.Memory = 1024,
  Segments.Poly = file.path(tempdir(), "outSegPoly.shp"),
  Segments.Grid = file.path(tempdir(), "outSegGrid.sgrd"),
  defaultGrass = c("C:/OSGeo4W64", "grass-7.2.2", "OSGeo4W64"),
  load.output = FALSE, fill.holes = FALSE, ...)

Arguments

input.filter

RasterLayer on which the filtering is applied

input.segmentation

RasterLayer for segmentation. Default: input.filter

offset

Offset of values in filter matrix. Default: 0.06

makeBrush.size

matrix size for smoothing input.filter. Default: 25

makeBrush.shape

form of smoothin matrix. Default: "disc"

NA.val.in

replace value for no data (NA) in input.filter. Default: 0

clump.thresh

area thresholds for removing clumbs - measured in cell sizes. Default: NULL

clump.directions

directions for "clump-searching". Default: 8

env.rsaga

environment of SAGA GIS. Default: RSAGA::rsaga.env()

CFR.buf

buffer applied on contrast-filter-results, measured in cell-sizes. Default: "1"

output.path

path for output files. Default: tempdir()

writeCFRaster

write contrast-filter results. Default: FALSE

writeRaster.NAflag

NoData values for NA values in raster. Default: -99999

freeMemory

free memory after contrast filtering. Default: TRUE

show.output.on.console

show output of tools on console. Default: FALSE

quiet

do not show comments and process time in console. Default: TRUE

Grass.Segmentation.Threshold

threshold used of merging segments. Default: 0.24

Grass.Segmentation.Minsize

minsize of a segment. Default: 0

Grass.Segmentation.Memory

memory used in computation. Default: 1024

Segments.Poly

output location for segmented objects (shapefile). Default: paste0(tempdir(), "/", "outSegPoly.shp")

Segments.Grid

output location for segmented grid. Default: paste0(tempdir(), "/", "outSegGrid.sgrd")

defaultGrass

GRASS GIS environmet for temporal setup, see package link2GI. Default: c("C:/OSGeo4W64", "grass-7.2.2", "OSGeo4W64")

fill.holes

polygon segmentation output contains holes. Default: FALSE

Fast.Representativeness.LevelOfGeneralisation

level of generalisation for computing seed points. Default: "2.0"

Value

SpatialPolygonsDataFrame containing the segments/objects

Note


ggRaver/Lslide documentation built on Aug. 29, 2019, 1:53 a.m.