matlab里open命令,matlab函数bwareaopen的详解

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 = imclearborder(IM,conn)

作用:抑制和图像边界相连的亮对象。若IM是二值图,imclearborder将删除和图像边界相连的对象。默认情况conn=8。

注:For grayscale images, imclearborder tends to reduce the overall intensity level in addition to suppressing border structures.

算法:

(1)Mask image is the input image.

(2)Marker image is zero everywhere except along the border, where it equals the mask image.

4、matlab函数bwboundaries──获取对象轮廓

格式:B = bwboundaries(BW,conn)(基本格式)

作用:获取二值图中对象的轮廓,和OpenCV中cvFindContours函数功能类似。B是一个P×1的cell数组,P为对象个数,每个cell 是Q×2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值