图像的数学形态学处理/100 其他复合操作

<<Navigation: 执行失败 ['AllContext' object has no attribute 'values'] (see also the log)>>

其他复合操作

在matlab中,使用bwmorph可以实现多种形态学运算

../table93.png

用法:

g = bwmorph(f, operation, n);

其中,operation是一个指定操作的字符串,n指定操作的重复次数,缺省是1。

例子:

g1 = bwmorph(f, 'thin', 1);
g2 = bwmorph(f, 'thin', 2);
ginf = bwmorph(f, 'thin', Inf);

../figure915.png

骨骼化(也称为提取骨架):

fs = bwmorph(f, 'skel', Inf);

../figure916.png

骨骼化的结果中会有一些毛刺,我们可以对起进行修剪,使用endpoints函数实现:

fs = fs&~endpoints(fs)

<<Navigation: 执行失败 ['AllContext' object has no attribute 'values'] (see also the log)>>

图像的数学形态学处理/100 其他复合操作 (2008-05-22 18:21:16由chenzhongke编辑)