3.5.4 Morphological features extraction

Morphological features can be highlighted by using image filters based on mathematical morphology either on binary or gray scale images.

Binary morphological operations

This application performs binary morphological operations (dilation, erosion, opening and closing) on a mono band image with a specific structuring element (a ball or a cross) having one radius along X and another one along Y. NB: the cross shaped structuring element has a fixed radius equal to 1 pixel in both X and Y directions.

The BinaryMorphologicalOperation application has the following input parameters:

The application can be used like this:

otbcli_BinaryMorphologicalOperation  -in                     InputImage  
                                     -channel                1  
                                     -structype              ball  
                                     -structype.ball.xradius 10  
                                     -structype.ball.yradius 5  
                                     -filter                 opening  
                                     -filter.opening.foreval 1.0  
                                     -filter.opening.backval 0.0  
                                     -out                    OutputImage

Gray scale morphological operations

This application performs morphological operations (dilation, erosion, opening and closing) on a gray scale mono band image with a specific structuring element (a ball or a cross) having one radius along X and another one along Y. NB: the cross shaped structuring element has a fixed radius equal to 1 pixel in both X and Y directions.

The GrayScaleMorphologicalOperation application has the following input parameters:

The application can be used like this:

otbcli_GrayScaleMorphologicalOperation  -in                     InputImage  
                                        -channel                1  
                                        -structype              ball  
                                        -structype.ball.xradius 10  
                                        -structype.ball.yradius 5  
                                        -filter                 opening  
                                        -out                    OutputImage