MorphologicalProfilesAnalysis - Morphological Profiles Analysis¶
Performs morphological profiles analysis on an input image channel.
Detailed description¶
This algorithm is derived from the following publication:
Martino Pesaresi and Jon Alti Benediktsson, Member, IEEE: A new approach for the morphological segmentation of high resolution satellite imagery. IEEE Transactions on geoscience and remote sensing, vol. 39, NO. 2, February 2001, p. 309-320.
Depending of the profile selection, the application provides:
- The multi scale geodesic morphological opening or closing profile of the input image.
- The multi scale derivative of the opening or closing profile.
- The parameter (called characteristic) of the maximum derivative value of the multi scale closing or opening profile for which this maxima occurs.
- The labeled classification of the input image.
The behavior of the classification is :
Given and two membership values, two labels associated, and a tolerance value, the following decision rule is applied:
The output image can be :- A multi band image for the opening/closing normal or derivative profiles. - A mono band image for the opening/closing characteristics. - A labeled image for the classification.
Parameters¶
This section describes in details the parameters available for this application. Table [1] presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is MorphologicalProfilesAnalysis .
[1] | Table: Parameters table for Morphological Profiles Analysis. |
Parameter Key | Parameter Name | Parameter Type |
---|---|---|
in | Input Image | Input image |
out | Output Image | Output image |
channel | Selected Channel | Int |
ram | Available RAM (Mb) | Int |
structype | Structuring Element Type | Choices |
structype ball | Ball | Choice |
structype cross | Cross | Choice |
size | Profile Size | Int |
radius | Initial radius | Int |
step | Radius step. | Int |
profile | Profile | Choices |
profile opening | opening | Choice |
profile closing | closing | Choice |
profile derivativeopening | derivativeopening | Choice |
profile derivativeclosing | derivativeclosing | Choice |
profile openingcharacteristics | openingcharacteristics | Choice |
profile closingcharacteristics | closingcharacteristics | Choice |
profile classification | classification | Choice |
profile.classification.sigma | Sigma value for leveling tolerance | Float |
inxml | Load otb application from xml file | XML input parameters file |
outxml | Save otb application to xml file | XML output parameters file |
Input Image: The input image.
Output Image: The output image.
Selected Channel: The selected channel index for input image.
Available RAM (Mb): Available memory for processing (in MB).
Structuring Element Type: Choice of the structuring element type. Available choices are:
- Ball
- Cross
Profile Size: Size of the profiles.
Initial radius: Initial radius of the structuring element (in pixels).
Radius step.: Radius step along the profile (in pixels).
Profile Available choices are:
- opening
- closing
- derivativeopening
- derivativeclosing
- openingcharacteristics
- closingcharacteristics
- classification
- Sigma value for leveling tolerance: Sigma value for leveling tolerance.
Load otb application from xml file: Load otb application from xml file.
Save otb application to xml file: Save otb application to xml file.
Example¶
To run this example in command-line, use the following:
otbcli_MorphologicalProfilesAnalysis -in ROI_IKO_PAN_LesHalles.tif -channel 1 -structype ball -profile classification -size 5 -radius 1 -step 1 -profile.classification.sigma 1 -out output.tif
To run this example from Python, use the following code snippet:
#!/usr/bin/python
# Import the otb applications package
import otbApplication
# The following line creates an instance of the MorphologicalProfilesAnalysis application
MorphologicalProfilesAnalysis = otbApplication.Registry.CreateApplication("MorphologicalProfilesAnalysis")
# The following lines set all the application parameters:
MorphologicalProfilesAnalysis.SetParameterString("in", "ROI_IKO_PAN_LesHalles.tif")
MorphologicalProfilesAnalysis.SetParameterInt("channel", 1)
MorphologicalProfilesAnalysis.SetParameterString("structype","ball")
MorphologicalProfilesAnalysis.SetParameterString("profile","classification")
MorphologicalProfilesAnalysis.SetParameterInt("size", 5)
MorphologicalProfilesAnalysis.SetParameterInt("radius", 1)
MorphologicalProfilesAnalysis.SetParameterInt("step", 1)
MorphologicalProfilesAnalysis.SetParameterFloat("profile.classification.sigma", 1)
MorphologicalProfilesAnalysis.SetParameterString("out", "output.tif")
# The following line execute the application
MorphologicalProfilesAnalysis.ExecuteAndWriteOutput()
Limitations¶
Generation of the morphological profile is not streamable, pay attention to this fact when setting the radius initial size and step of the structuring element.
Authors¶
This application has been written by OTB-Team.
See Also¶
- These additional resources can be useful for further information:
- otbMorphologicalOpeningProfileFilter, otbMorphologicalClosingProfileFilter, otbProfileToProfileDerivativeFilter, otbProfileDerivativeToMultiScaleCharacteristicsFilter, otbMultiScaleConvexOrConcaveClassificationFilter, classes