Third (optional) step of the exact Large-Scale Mean-Shift segmentation workflow.
This application performs the third step of the exact Large-Scale Mean-Shift segmentation workflow (LSMS). Given a segmentation result (label image) and the original image, it will merge regions whose size in pixels is lower than minsize parameter with the adjacent regions with the adjacent region with closest radiometry and acceptable size. Small regions will be processed by size: first all regions of area, which is equal to 1 pixel will be merged with adjacent region, then all regions of area equal to 2 pixels, until regions of area minsize. For large images one can use the nbtilesx and nbtilesy parameters for tile-wise processing, with the guarantees of identical results.
This section describes in details the parameters available for this application. Table 5.67, page 689 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is LSMSSmallRegionsMerging.
Parameter key | Parameter type |
Parameter description |
in | Input image |
Input image |
inseg | Input image |
Segmented image |
out | Output image |
Output Image |
minsize | Int |
Minimum Region Size |
tilesizex | Int |
Size of tiles in pixel (X-axis) |
tilesizey | Int |
Size of tiles in pixel (Y-axis) |
inxml | XML input parameters file |
Load otb application from xml file |
outxml | XML output parameters file |
Save otb application to xml file |
|
||
|
||
|
||
|
||
|
To run this example in command-line, use the following:
To run this example from Python, use the following code snippet:
This application is part of the Large-Scale Mean-Shift segmentation workflow (LSMS) and may not be suited for any other purpose.
This application has been written by David Youssefi.
These additional ressources can be useful for further information: