|[mmdflow] [Up] [mmdholecenter]||Demonstrations|
The input image is a binary image of a gear. The opening top-hat is used to detect the gear teeth. Finally, the teeth detected are labeled.
The binary image of a gear is read.
a = mmreadgray('gear.tif');
The teeth detected are labeled. The maximum pixel value in the labeled image gives the number of connected objects (n. of teeth).
d = mmlabel(c);
nteeth = 24
|[mmdflow] [Up] [mmdholecenter]|
|Copyright (c) 1998-2008 by SDC Information Systems|