View source: R/SOptim_SegmentationFunctions.R
segmentation_OTB_LSMS2 | R Documentation |
A function providing CLI access to OTB's LSMS segmentation and optimize its parameters
using genetic algorithms. This function differs from segmentation_OTB_LSMS
by
implementing two sets of parameters for the spectral and spatial range, the first for
running mean-shift smoothing (MS_ prefix) and, the second, for the large-scale
segmentation step (LSS_ prefix).
segmentation_OTB_LSMS2(
x,
inputRstPath,
outputSegmRst = NULL,
MS_SpectralRange = NULL,
MS_SpatialRange = NULL,
LSS_SpectralRange = NULL,
LSS_SpatialRange = NULL,
MinSize = NULL,
lsms_maxiter = 10,
tilesizex = 2500,
tilesizey = 2500,
otbBinPath = NULL,
RAM = 3072,
verbose = TRUE
)
x |
A vector of size five containing the parameters that will be optimized by the genetic algorithms from package GA:
If you are using this function outside an optimization context it is better to directly
define the segmentation parameters in |
inputRstPath |
The input raster dataset used to perform the image segmentation using OTB LSMS algorithm (typically a multi-layer raster dataset with segmentation features in each band). |
outputSegmRst |
A path to the output segmented image (default: |
MS_SpectralRange |
Threshold on spectral signature euclidean distance (expressed in radiometry unit) to consider neighborhood pixel for averaging. Higher values will be less edge-preserving (more similar to simple average in neighborhood), whereas lower values will result in less noise smoothing. Note that this parameter has no effect on processing time (float). |
MS_SpatialRange |
Radius of the spatial neighborhood for averaging. Higher values will result in more smoothing and higher processing time (float). |
LSS_SpectralRange |
Threshold on spectral signature euclidean distance (expressed in radiometry unit) to consider pixels in the same segment. A good value is half the range radius used in the MeanShiftSmoothing application (ranger parameter; float). |
LSS_SpatialRange |
Threshold on Spatial distance to consider pixels in the same segment. A good value is half the spatial radius used in the MeanShiftSmoothing application (spatialr parameter; float). |
MinSize |
Minimum segment/region size. |
lsms_maxiter |
Algorithm iterative scheme will stop if convergence hasn't been reached after the maximum number of iterations (integer). |
tilesizex |
Size of tiles along the X-axis (integer). |
tilesizey |
Size of tiles along the Y-axis (integer). |
otbBinPath |
The system path to OTB binaries (e.g., where otbcli_MeanShiftSmoothing
is located). By default this is equal to |
RAM |
Available memory for processing the image data (in MB). |
verbose |
Print output messages (default: TRUE). |
A list object containing output file paths resulting from the segmentation run. These files will be cleaned after each GA iteration or if an error occurs. Also, notice that some auxiliary files will be created: otb_filt_range_, otb_filt_spatial_, otb_segm_init_.
Check [OTB documentation](https://www.orfeo-toolbox.org/CookBook/Applications/app_LargeScaleMeanShift.html) for more info.
J. Michel, D. Youssefi and M. Grizonnet, 2015. Stable Mean-Shift Algorithm and Its Application to the Segmentation of Arbitrarily Large Remote Sensing Images. IEEE Transactions on Geoscience and Remote Sensing, 53: 2, 952-964.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.