Name

DilateImage — applies a morphological dilation filter to an image

Calling Sequence

ResultImage = DilateImage(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 dilation filter to an image. This filter expands light objects and shrinks or removes dark objects the structuring element does not fit in.

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 = DilateImage(Image, StructureElement)

See also

ErodeImage, CloseImage, OpenImage, TopHat, BottomHat, CreateStructureElement, MorphologicalFilter