matlab
函数
_
连通区域
1
、
matlab
函数
bwareaopen
──删除小面积对象
格式:
BW2 = bwareaopen(BW,P
,conn)
作用:删除二值图像
BW
中面积小于
P
的对象,默认情况下使用
8
邻域。
算法:
(1)Determine the connected components.
L = bwlabeln(BW, conn);
(2)Compute the area of each component.
S = regionprops(L, 'Area');
(3)Remove small objects.
bw2 = ismember(L, find([S.Area] >= P));
2
、
matlab
函数
bwarea
──计算对象面积
格式:
total = bwarea(BW)
作用:估计二值图像中对象的面积。
注:该面积和二值图像中对象的像素数目不一定相等。
3
、
matlab
函数
imclearborder
──边界对象抑制
格式:
IM2 = imclearbo