# GrayScaleMorphologicalOperation

## Brief Description

Performs morphological operations on a grayscale input image

## Tags

MorphologicalOperations,Feature Extraction

## Long Description

This application performs grayscale 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"
[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

- [group] -erode

- [group] -opening

- [group] -closing

## Limitations

None

## Authors

OTB-Team

## See Also

itkGrayscaleDilateImageFilter, itkGrayscaleErodeImageFilter, itkGrayscaleMorphologicalOpeningImageFilter and itkGrayscaleMorphologicalClosingImageFilter classes

## Example of use

- in: qb_RoadExtract.tif

- out: opened.tif

- channel: 1

- structype.ball.xradius: 5

- structype.ball.yradius: 5

- filter: erode