# BinaryMorphologicalOperation

## Brief Description

Performs morphological operations on an input image channel

## Tags

MorphologicalOperations,Feature Extraction

## Long Description

This application performs binary morphological operations on a mono band image

## Parameters

- [param] -in <string> The input image to be filtered.. Mandatory: True. Default Value: ""
- [param] -out <string> Output image containing the filtered output image.. Mandatory: True. Default Value: ""
- [param] -channel <int32> The selected channel index. Mandatory: True. Default Value: "1"
- [param] -ram <int32> Available memory for processing (in MB). Mandatory: False. Default Value: "128"
- [param] -inxml <string> Load otb application from xml file. Mandatory: False. Default Value: ""
- [param] -outxml <string> Save otb application to xml file. Mandatory: False. Default Value: ""
[choice] -structype Choice of the structuring element type ball,cross. Mandatory: True. Default Value: "ball"

- [group] -ball

- [param] -structype.ball.xradius <int32> The Structuring Element X Radius. Mandatory: True. Default Value: "5"
- [param] -structype.ball.yradius <int32> The Structuring Element Y Radius. Mandatory: True. Default Value: "5"

- [group] -cross

[choice] -filter Choice of the morphological operation dilate,erode,opening,closing. Mandatory: True. Default Value: "dilate"

- [group] -dilate

- [param] -filter.dilate.foreval <float> The Foreground Value. Mandatory: True. Default Value: "1"
- [param] -filter.dilate.backval <float> The Background Value. Mandatory: True. Default Value: "0"

- [group] -erode

- [param] -filter.erode.foreval <float> The Foreground Value. Mandatory: True. Default Value: "1"
- [param] -filter.erode.backval <float> The Background Value. Mandatory: True. Default Value: "0"

- [group] -opening

- [param] -filter.opening.foreval <float> The Foreground Value. Mandatory: True. Default Value: "1"
- [param] -filter.opening.backval <float> The Background Value. Mandatory: True. Default Value: "0"

- [group] -closing

- [param] -filter.closing.foreval <float> The Foreground Value. Mandatory: True. Default Value: "1"

## Limitations

None

## Authors

OTB-Team

## See Also

itkBinaryDilateImageFilter, itkBinaryErodeImageFilter, itkBinaryMorphologicalOpeningImageFilter and itkBinaryMorphologicalClosingImageFilter classes

## Example of use

- in: qb_RoadExtract.tif

- out: opened.tif

- channel: 1

- structype.ball.xradius: 5

- structype.ball.yradius: 5

- filter: erode