<< EdgeFilter Image Processing Design FilterBySize >>

Image Processing Design >> Image Processing Design > ErodeImage

ErodeImage

applies a morphological erosion filter to an image

Calling Sequence

ResultImage = ErodeImage(Image, StructureElement);

Parameters

Image

2D matrix of type uint8, uint16, uint32, double or boolean

StructureElement

struct with the components Width, Height and Data, should be generated using CreateStructureElement

ResultImage

matrix of the same size and type as Image

Description

This function applies a morphological erosion filter to an image. This filter expands dark objects and shrinks light objects. Light objects the structuring element does not fit in are removed.

Examples

Image = 0.5 * ones(9, 9) // generate gray image

Image(:, 3) = 0 // draw dark line

Image(:, 7) = 1 // draw light line

StructureElement = CreateStructureElement('square', 3) // generate structuring element

ResultImage = ErodeImage(Image, StructureElement)

See also


Report an issue
<< EdgeFilter Image Processing Design FilterBySize >>