View source: R/SOptim_SegmentationFunctions.R
segmentation_Terralib_Baatz | R Documentation |
A function providing CLI access to TerraLib 5 Baatz-Shcape segmentation and optimize its parameters using genetic algorithms.
segmentation_Terralib_Baatz(
x,
inputRstPath,
outputSegmRst = NULL,
CompactnessWeight = NULL,
SpectralWeight = NULL,
Threshold = NULL,
MinSize = NULL,
verbose = TRUE,
TerraLib.path = NULL
)
x |
A vector with size four defining the segmentation parameters that will be optimized using genetic algorithms from GA package:
If you are using this function outside an optimization context it is better to directly define the
segmentation parameters in |
inputRstPath |
Path to the input raster file (typically a multi-layered raster dataset with segmentation features in each band). |
outputSegmRst |
A path to the output segmented image (default: |
CompactnessWeight |
Compactness weight (double) |
SpectralWeight |
Spectral / color weight (double) |
Threshold |
Threshold parameter (double) |
MinSize |
Minimum size of the segments (integer) |
verbose |
Print output messages? (default: TRUE) |
TerraLib.path |
Path to the TerraLib binaries (locating |
By default all bands have the same weight (bw), i.e., bw = 1 / number of bands. Also, by default,
the executable file for running this segmentation algorithm (named terralib_cli_baatz
) should
be accessible by the PATH env variable.
A list object containing output file paths resulting from the segmentation run. These files will be cleaned after each GA iteration.
Windows binaries for CLI access to TerraLib v5.1.1 Baatz-Schape segmenter are available at:
https://bitbucket.org/joao_goncalves/terralib5_cli_segmentation_mod/downloads
(unfortunetaley not yet tested in Linux environment...). Source could be used to build TerraLib for this
effect, check source location /examples/segmentationBaatz
and TerraLib instructions
(link).
The executable file for running this segmentation algorithm is named: terralib_cli_baatz
Baatz, M.; Schape, A. Multiresolution segmentation: an optimization approach for high quality multi-scale image segmentation. In: XII Angewandte Geographische Informationsverarbeitung, Wichmann Verlag, Heidelberg, 2000.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.