View source: R/SOptim_SegmentationFunctions.R
segmentation_RSGISLib_Shep | R Documentation |
A function providing CLI access to RSGISLib Shepherd segmentation and optimize its parameters using genetic algorithms.
segmentation_RSGISLib_Shep(
x,
inputRstPath,
outputSegmRst = NULL,
NumClust = NULL,
MinSize = NULL,
SpectralThresh = NULL,
pythonPath = NULL,
verbose = TRUE
)
x |
A vector of size three 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 |
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: |
NumClust |
Number of clusters for running the k-means algorithm (integer) |
MinSize |
Minimum segment size (in pixels; integer) |
SpectralThresh |
Spectral threshold used to merge objects (float) |
pythonPath |
Path to the Python interpreter (by default uses the one in the PATH env var). In windows it should be used for defining the path to the conda distribution of RSGISLib. |
verbose |
Print output messages (default: TRUE). |
By default the k-means algorithm running inside the segmenter will use "INITCLUSTER_DIAGONAL_FULL_ATTACH"
for the initialization stage, 250 iterations and 0.0025 for the degree of change stopping condition.
A list object containing output file paths resulting from the segmentation run. These files will be cleaned after each GA iteration.
Unfortunetelly these functionalities where not yet tested in Linux or Mac environments.
Clewley, D., Bunting, P., Shepherd, J., Gillingham, S., Flood, N., Dymond, J., Lucas, R., Armston, J., Moghaddam, M., 2014. A Python-Based Open Source System for Geographic Object-Based Image Analysis (GEOBIA) Utilizing Raster Attribute Tables. Remote Sensing 6, 6111.
Also check out the RSGISLib manual pages at: http://www.rsgislib.org/rsgislib_segmentation.html.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.