applies a morphological dilation filter to an image
ResultImage = DilateImage(Image, StructureElement);
2D matrix of type uint8, uint16, uint32, double or boolean
struct with the components Width, Height and Data, should be generated using CreateStructureElement
matrix of the same size and type as Image
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.
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) | ![]() | ![]() |