M-File Help: morphdemo View code for morphdemo

morphdemo

Demonstrate morphology using animation

morphdemo(im, se, options) displays an animation to show the principles of the mathematical morphology operations dilation or erosion. Two windows are displayed side by side, input binary image on the left and output image on the right. The structuring element moves over the input image and is colored red if the result is zero, else blue. Pixels in the output image are initially all grey but change to black or white as the structuring element moves.

out = morphdemo(im, se, options) as above but returns the output image.

Options

'dilate' Perform morphological dilation
'erode' Perform morphological erosion
'delay' Time between animation frames (default 0.5s)
'scale', S Scale factor for output image (default 64)
'movie', M Write image frames to the folder M

Notes

See also

imorph, idilate, ierode


 

© 1990-2012 Peter Corke.