图像处理的对象及其空洞的处理

  [B,L,N,A] = bwboundaries(varargin)

B = BWBOUNDARIES(BW) traces the exterior boundary of objects, as well as boundaries of holes inside these objects!!


B: is a P-by-1 cell array, where P is the number of objects  and holes. Each cell contains a Q-by-2 matrix, where Q is the number of boundary pixels for the corresponding region. Each row of these Q-by-2  matrices contains the row and column coordinates of a boundary pixel. The coordinates are ordered in a clockwise direction.

像素联通方式:默认是8联通的

系数默认也是:'holes‘    可以设置 'noholes'  选项;

L: the label matrix, ——labeled the Objects and holes。k-th region includes all elements in L that have value k. The number of objects and holes represented by L is equal to max(L(:))


N: the number of objects, 在 B 中的 P 个对象和洞, 对 大于 N 的 为洞

A: represents the parent-child-hole dependencies

    m <= P

enclosing_boundary  = find(A(m,:));    % B{m}被包围的区间;

enclosed_boundaries = find(A(:,m));  %被 B{m} 包围的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值