<< MedianFilter IPD - Image Processing Design OpenImage >>

IPD - Image Processing Design >> IPD - Image Processing Design > MorphologicalFilter

MorphologicalFilter

applies a morphological filter to an image

Calling Sequence

FilteredImage = MorphologicalFilter(Image, FilterType, LogicalMatrix);

Parameters

Image

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

FilterType

one of the constants FILTER_DILATE, FILTER_ERODE, FILTER_CLOSE, FILTER_OPEN, FILTER_TOP_HAT or FILTER_BOTTOM_HAT defined in loader.sce of IPD toolbox

LogicalMatrix

2D matrix of type boolean

FilteredImage

matrix of the same type and size as Image

Description

This function applies a morphological filter to an image. DilateImage, ErodeImage, CloseImage, OpenImage, TopHat and BottomHat call this function so you do not need to call it yourself.

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

global FILTER_DILATE;

ResultImage = MorphologicalFilter(Image, FILTER_DILATE, StructureElement.Data)

See also

<< MedianFilter IPD - Image Processing Design OpenImage >>