Juergen E. Fischer 00633811c9 spelling fixes
2016-01-21 10:42:25 +01:00

12 lines
9.7 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 performing 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 colors. 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 simplifying the geometry (i.e. remove nodes in polygons) according to a user-defined tolerance. The stitch option allows applying 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> &lt;string&gt; The input image to segment. Mandatory: True. Default Value: &quot;&quot;</li><li><b>[param] -inxml</b> &lt;string&gt; Load otb application from xml file. Mandatory: False. Default Value: &quot;&quot;</li><li><b>[param] -outxml</b> &lt;string&gt; Save otb application to xml file. Mandatory: False. Default Value: &quot;&quot;</li><b>[choice] -filter</b> Choice of segmentation algorithm (mean-shift by default) meanshift,cc,watershed,mprofiles. Mandatory: True. Default Value: &quot;meanshift&quot;<ul><li><b>[group] -meanshift</b></li><ul><li><b>[param] -filter.meanshift.spatialr</b> &lt;int32&gt; Spatial radius of the neighborhood.. Mandatory: True. Default Value: &quot;5&quot;</li><li><b>[param] -filter.meanshift.ranger</b> &lt;float&gt; Range radius defining the radius (expressed in radiometry unit) in the multispectral space.. Mandatory: True. Default Value: &quot;15&quot;</li><li><b>[param] -filter.meanshift.thres</b> &lt;float&gt; 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: &quot;0.1&quot;</li><li><b>[param] -filter.meanshift.maxiter</b> &lt;int32&gt; Algorithm iterative scheme will stop if convergence hasn't been reached after the maximum number of iterations.. Mandatory: True. Default Value: &quot;100&quot;</li><li><b>[param] -filter.meanshift.minsize</b> &lt;int32&gt; 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: &quot;100&quot;</li></ul><li><b>[group] -cc</b></li><ul><li><b>[param] -filter.cc.expr</b> &lt;string&gt; 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: &quot;&quot;</li></ul><li><b>[group] -watershed</b></li><ul><li><b>[param] -filter.watershed.threshold</b> &lt;float&gt; Depth threshold Units in percentage of the maximum depth in the image.. Mandatory: True. Default Value: &quot;0.01&quot;</li><li><b>[param] -filter.watershed.level</b> &lt;float&gt; flood level for generating the merge tree from the initial segmentation (between 0 and 1). Mandatory: True. Default Value: &quot;0.1&quot;</li></ul><li><b>[group] -mprofiles</b></li><ul><li><b>[param] -filter.mprofiles.size</b> &lt;int32&gt; Size of the profiles. Mandatory: True. Default Value: &quot;5&quot;</li><li><b>[param] -filter.mprofiles.start</b> &lt;int32&gt; Initial radius of the structuring element (in pixels). Mandatory: True. Default Value: &quot;1&quot;</li><li><b>[param] -filter.mprofiles.step</b> &lt;int32&gt; Radius step along the profile (in pixels). Mandatory: True. Default Value: &quot;1&quot;</li><li><b>[param] -filter.mprofiles.sigma</b> &lt;float&gt; Profiles values under the threshold will be ignored.. Mandatory: True. Default Value: &quot;1&quot;</li></ul></ul><b>[choice] -mode</b> Choice of processing mode, either raster or large-scale. vector,raster. Mandatory: True. Default Value: &quot;vector&quot;<ul><li><b>[group] -vector</b></li><ul><li><b>[param] -mode.vector.out</b> &lt;string&gt; The output vector file or database (name can be anything understood by OGR). Mandatory: True. Default Value: &quot;&quot;</li><li><b>[param] -mode.vector.outmode</b> &lt;string&gt; This allows setting the writing behaviour for the output vector file. Please note that the actual behaviour depends on the file format.. Mandatory: True. Default Value: &quot;ulco&quot;</li><li><b>[param] -mode.vector.inmask</b> &lt;string&gt; Only pixels whose mask value is strictly positive will be segmented.. Mandatory: False. Default Value: &quot;&quot;</li><li><b>[param] -mode.vector.neighbor</b> &lt;boolean&gt; Activate 8-Neighborhood connectivity (default is 4).. Mandatory: False. Default Value: &quot;True&quot;</li><li><b>[param] -mode.vector.stitch</b> &lt;boolean&gt; Scan polygons on each side of tiles and stitch polygons which connect by more than one pixel.. Mandatory: False. Default Value: &quot;True&quot;</li><li><b>[param] -mode.vector.minsize</b> &lt;int32&gt; Objects whose size is below the minimum object size (area in pixels) will be ignored during vectorization.. Mandatory: False. Default Value: &quot;1&quot;</li><li><b>[param] -mode.vector.simplify</b> &lt;float&gt; Simplify polygons according to a given tolerance (in pixel). This option allows reducing the size of the output file or database.. Mandatory: False. Default Value: &quot;0.1&quot;</li><li><b>[param] -mode.vector.layername</b> &lt;string&gt; Name of the layer in the vector file or database (default is Layer).. Mandatory: True. Default Value: &quot;layer&quot;</li><li><b>[param] -mode.vector.fieldname</b> &lt;string&gt; Name of the field holding the geometry index in the output vector file or database.. Mandatory: True. Default Value: &quot;DN&quot;</li><li><b>[param] -mode.vector.tilesize</b> &lt;int32&gt; User defined tiles size for tile-based segmentation. Optimal tile size is selected according to available RAM if null.. Mandatory: True. Default Value: &quot;1024&quot;</li><li><b>[param] -mode.vector.startlabel</b> &lt;int32&gt; Starting value of the geometry index field. Mandatory: True. Default Value: &quot;1&quot;</li><li><b>[param] -mode.vector.ogroptions</b> &lt;string&gt; 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: &quot;&quot;</li></ul><li><b>[group] -raster</b></li><ul><li><b>[param] -mode.raster.out</b> &lt;string&gt; The output labeled image.. Mandatory: True. Default Value: &quot;&quot;</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 the number of threads used.
Watershed and multiscale geodesic morphology segmentation will be performed on the amplitude of the input image.<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>