mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-06 00:05:02 -05:00
9 lines
10 KiB
HTML
9 lines
10 KiB
HTML
<html><head>
|
|
<style type="text/css">
|
|
dl { border: 3px double #ccc; padding: 0.5em; } dt { float: left; clear: left; text-align: left; font-weight: bold; color: green; } dt:after { content: ":"; } dd { margin: 0 0 0 220px; padding: 0 0 0.5em 0; }
|
|
</style>
|
|
</head><body><h1>Segmentation</h1><h2>Brief Description</h2>Performs segmentation of an image, and output either a raster or a vector file. In vector mode, large input datasets are supported.<h2>Tags</h2>Segmentation<h2>Long Description</h2>This application allows to perform various segmentation algorithms on a multispectral image.Available segmentation algorithms are two different versions of Mean-Shift segmentation algorithm (one being multi-threaded), simple pixel based connected components according to a user-defined criterion, and watershed from the gradient of the intensity (norm of spectral bands vector). The application has two different modes that affects the nature of its output.
|
|
|
|
In raster mode, the output of the application is a classical image of unique labels identifying the segmented regions. The labeled output can be passed to the ColorMapping application to render regions with contrasted colours. Please note that this mode loads the whole input image into memory, and as such can not handle large images.
|
|
|
|
To segment large data, one can use the vector mode. In this case, the output of the application is a vector file or database. The input image is split into tiles (whose size can be set using the tilesize parameter), and each tile is loaded, segmented with the chosen algorithm, vectorized, and written into the output file or database. This piece-wise behavior ensure that memory will never get overloaded, and that images of any size can be processed. There are few more options in the vector mode. The simplify option allows to simplify the geometry (i.e. remove nodes in polygons) according to a user-defined tolerance. The stitch option allows to application to try to stitch together polygons corresponding to segmented region that may have been split by the tiling scheme. <h2>Parameters</h2><ul><li><b>[param] -in</b> <string> The input image to segment. Mandatory: True. Default Value: ""</li><b>[choice] -filter</b> Choice of segmentation algorithm (mean-shift by default) meanshift,edison,cc,watershed,mprofiles. Mandatory: True. Default Value: "meanshift"<ul><li><b>[group] -meanshift</b></li><ul><li><b>[param] -filter.meanshift.spatialr</b> <int32> Spatial radius of the neighborhood.. Mandatory: True. Default Value: "5"</li><li><b>[param] -filter.meanshift.ranger</b> <float> Range radius defining the radius (expressed in radiometry unit) in the multispectral space.. Mandatory: True. Default Value: "15"</li><li><b>[param] -filter.meanshift.thres</b> <float> Algorithm iterative scheme will stop if mean-shift vector is below this threshold or if iteration number reached maximum number of iterations.. Mandatory: True. Default Value: "0.1"</li><li><b>[param] -filter.meanshift.maxiter</b> <int32> Algorithm iterative scheme will stop if convergence hasn't been reached after the maximum number of iterations.. Mandatory: True. Default Value: "100"</li><li><b>[param] -filter.meanshift.minsize</b> <int32> Minimum size of a region (in pixel unit) in segmentation. Smaller clusters will be merged to the neighboring cluster with the closest radiometry. If set to 0 no pruning is done.. Mandatory: True. Default Value: "100"</li></ul><li><b>[group] -edison</b></li><ul><li><b>[param] -filter.edison.spatialr</b> <int32> Spatial radius defining neighborhood.. Mandatory: True. Default Value: "5"</li><li><b>[param] -filter.edison.ranger</b> <float> Range radius defining the radius (expressed in radiometry unit) in the multi-spectral space.. Mandatory: True. Default Value: "15"</li><li><b>[param] -filter.edison.minsize</b> <int32> Minimum size of a region in segmentation. Smaller clusters will be merged to the neighboring cluster with the closest radiometry.. Mandatory: True. Default Value: "100"</li><li><b>[param] -filter.edison.scale</b> <float> Scaling of the image before processing. This is useful for images with narrow decimal ranges (like [0,1] for instance). . Mandatory: True. Default Value: "1"</li></ul><li><b>[group] -cc</b></li><ul><li><b>[param] -filter.cc.expr</b> <string> User defined connection condition, written as a mathematical expression. Available variables are p(i)b(i), intensity_p(i) and distance (example of expression : distance < 10 ). Mandatory: True. Default Value: ""</li></ul><li><b>[group] -watershed</b></li><ul><li><b>[param] -filter.watershed.threshold</b> <float> Depth threshold Units in percentage of the maximum depth in the image.. Mandatory: True. Default Value: "0.01"</li><li><b>[param] -filter.watershed.level</b> <float> flood level for generating the merge tree from the initial segmentation (between 0 and 1). Mandatory: True. Default Value: "0.1"</li></ul><li><b>[group] -mprofiles</b></li><ul><li><b>[param] -filter.mprofiles.size</b> <int32> Size of the profiles. Mandatory: True. Default Value: "5"</li><li><b>[param] -filter.mprofiles.start</b> <int32> Initial radius of the structuring element (in pixels). Mandatory: True. Default Value: "1"</li><li><b>[param] -filter.mprofiles.step</b> <int32> Radius step along the profile (in pixels). Mandatory: True. Default Value: "1"</li><li><b>[param] -filter.mprofiles.sigma</b> <float> Profiles values under the threshold will be ignored.. Mandatory: True. Default Value: "1"</li></ul></ul><b>[choice] -mode</b> Choice of processing mode, either raster or large-scale. vector,raster. Mandatory: True. Default Value: "vector"<ul><li><b>[group] -vector</b></li><ul><li><b>[param] -mode.vector.out</b> <string> The output vector file or database (name can be anything understood by OGR). Mandatory: True. Default Value: ""</li><li><b>[param] -mode.vector.outmode</b> <string> This allows to set the writing behaviour for the output vector file. Please note that the actual behaviour depends on the file format.. Mandatory: True. Default Value: "ulco"</li><li><b>[param] -mode.vector.inmask</b> <string> Only pixels whose mask value is strictly positive will be segmented.. Mandatory: False. Default Value: ""</li><li><b>[param] -mode.vector.neighbor</b> <boolean> Activate 8-Neighborhood connectivity (default is 4).. Mandatory: False. Default Value: "True"</li><li><b>[param] -mode.vector.stitch</b> <boolean> Scan polygons on each side of tiles and stitch polygons which connect by more than one pixel.. Mandatory: False. Default Value: "True"</li><li><b>[param] -mode.vector.minsize</b> <int32> Objects whose size is below the minimum object size (area in pixels) will be ignored during vectorization.. Mandatory: False. Default Value: "1"</li><li><b>[param] -mode.vector.simplify</b> <float> Simplify polygons according to a given tolerance (in pixel). This option allows to reduce the size of the output file or database.. Mandatory: False. Default Value: "0.1"</li><li><b>[param] -mode.vector.layername</b> <string> Name of the layer in the vector file or database (default is Layer).. Mandatory: True. Default Value: "layer"</li><li><b>[param] -mode.vector.fieldname</b> <string> Name of the field holding the geometry index in the output vector file or database.. Mandatory: True. Default Value: "DN"</li><li><b>[param] -mode.vector.tilesize</b> <int32> User defined tiles size for tile-based segmentation. Optimal tile size is selected according to available RAM if null.. Mandatory: True. Default Value: "1024"</li><li><b>[param] -mode.vector.startlabel</b> <int32> Starting value of the geometry index field. Mandatory: True. Default Value: "1"</li><li><b>[param] -mode.vector.ogroptions</b> <string> A list of layer creation options in the form KEY=VALUE that will be passed directly to OGR without any validity checking. Options may depend on the file format, and can be found in OGR documentation.. Mandatory: False. Default Value: ""</li></ul><li><b>[group] -raster</b></li><ul><li><b>[param] -mode.raster.out</b> <string> The output labeled image.. Mandatory: True. Default Value: ""</li></ul></ul></ul><h2>Limitations</h2>In raster mode, the application can not handle large input images. Stitching step of vector mode might become slow with very large input images. MeanShift filter results depends on threads number.<h2>Authors</h2>OTB-Team<h2>See Also</h2>MeanShiftSegmentation<h2>Example of use</h2><ul><li>Example of use with vector mode and watershed segmentation<ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">in: QB_Toulouse_Ortho_PAN.tif</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mode: vector</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mode.vector.out: SegmentationVector.sqlite</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">filter: watershed</p></li></ul></li><li>Example of use with raster mode and mean-shift segmentation<ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">in: QB_Toulouse_Ortho_PAN.tif</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mode: raster</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mode.raster.out: SegmentationRaster.tif uint16</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">filter: meanshift</p></li></ul></li></ul></body></html> |