Filters the input labeled image using Majority Voting in a ball shaped neighbordhood.
This application filters the input labeled image (with a maximal class label = 65535) using Majority Voting
in a ball shaped neighbordhood. Majority Voting takes the more representative value of all the pixels
identified by the ball shaped structuring element and then sets the center pixel to this majority label
value.
-NoData is the label of the NOT classified pixels in the input image. These input pixels keep their NoData
label in the output image.
-Pixels with more than 1 majority class are marked as Undecided if the parameter ’ip.suvbool == true’, or
keep their Original labels otherwise.
This section describes in details the parameters available for this application. Table 5.55, page 630 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is ClassificationMapRegularization.
Parameter key | Parameter type |
Parameter description |
io | Group |
Input and output images |
io.in | Input image |
Input classification image |
io.out | Output image |
Output regularized image |
ip | Group |
Regularization parameters |
ip.radius | Int |
Structuring element radius (in pixels) |
ip.suvbool | Boolean |
Multiple majority: Undecided(X)/Original |
ip.nodatalabel | Int |
Label for the NoData class |
ip.undecidedlabel | Int |
Label for the Undecided class |
ram | Int |
Available RAM (Mb) |
inxml | XML input parameters file |
Load otb application from xml file |
outxml | XML output parameters file |
Save otb application to xml file |
|
||
|
||
|
||
|
||
|
Input and output images This group of parameters allows to set input and output images for classification map regularization by Majority Voting.
Regularization parameters This group allows to set parameters for classification map regularization by Majority Voting.
Available RAM (Mb) Available memory for processing (in MB)
Load otb application from xml file Load otb application from xml file
Save otb application to xml 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:
The input image must be a single band labeled image (with a maximal class label = 65535). The structuring element radius must have a minimum value equal to 1 pixel. Please note that the Undecided value must be different from existing labels in the input labeled image.
This application has been written by OTB-Team.
These additional ressources can be useful for further information: