认真研读一下MATLAB的help文档吧,解释最权威:

BWFILL Fill background regions in binary image.

BWFILL is a grandfathered function that has been replaced by

IMFILL.

BW2 = BWFILL(BW1,C,R,N) performs a flood-fill operation on

the input binary image BW1, starting from the pixel (R,C). If

R and C are equal-length vectors, the fill is performed in

parallel from the starting locations (R(k),C(k)). N can have

a value of either 4 or 8 (the default), where 4 specifies

4-connected foreground and 8 specifies 8-connected

foreground. The foreground of BW1 comprises the "on" pixels

(i.e., having value of 1).

BW2 = BWFILL(BW1,N) displays the image BW1 on the screen and

lets you select the starting points using the mouse. If you

omit BW1, BWFILL operates on the image in the current

axes. Use normal button clicks to add points. Press

or to remove the previously selected

point. A shift-click, right-click, or double-click selects

a final point and then starts the fill; pressing

finishes the selection without adding a point.

[BW2,IDX] = BWFILL(...) returns the linear indices of all

pixels filled by BWFILL.

BW2 = BWFILL(X,Y,BW1,Xi,Yi,N) uses the vectors X and Y to

establish a nondefault spatial coordinate system for BW1. Xi

and Yi are scalars or equal-length vectors that specify

locations in this coordinate system.

[X,Y,BW2,IDX,Xi,Yi] = BWFILL(...) returns the XData and YData

in X and Y; the output image in BW2; linear indices of all

filled pixels in IDX; and the fill starting points in Xi and

Yi.

BW2 = BWFILL(BW1,'holes',N) fills the holes in the binary

image BW1. BWFILL automatically determines which pixels are

in object holes, and then changes the value of those pixels

from 0 to 1. N defaults to 8 if you omit the argument.

[BW2,IDX] = BWFILL(BW1,'holes',N) returns the linear indices

of all pixels filled in by BWFILL.

If BWFILL is used with no output arguments, the resulting

image is displayed in a new figure.

Remarks

-------

BWFILL differs from many other binary image operations in

that it operates on background pixels, rather than foreground

pixels. If the foreground is 8-connected, the background is

4-connected, and vice versa. Note, however, that you specify

the connectedness of the foreground when you call BWFILL.

Class Support

-------------

The input image BW1 must be a numeric or logical matrix. The output

image BW2 is logical.

See also bwselect, imfill, roifill.

matlab中bwfill,到底怎么实现,bwfill和imfill相关推荐

  1. matlab+awgn和wgn,噪聲強度(噪聲功率) 噪聲方差到底有什么關系? matlab中的awgn函數...

    以matlab中awgn函數為例說明: 在matlab中無論是wgn還是awgn函數,實質都是由randn函數產生的噪聲.即:wgn函數中調用了randn函數,而awgn函數中調用了wgn函數. 根據 ...

  2. matlab中cell元胞到底怎么理解

    cell元胞如何理解 cell元胞是matlab中一种数值类型,本质与double.char类型相同.但不同的地方在于cell是包含数值的数值集. 假设A为cell类型变量 每个元胞单元A{i,j}中 ...

  3. MATLAB中的常用函数小结

    1. MATLAB中的常用函数小结 文章目录 1. MATLAB中的常用函数小结 1. MATLAB图像处理工具箱 1.1 图像显示 1.2 图像文件输入/输出 1.3. 图像像素值及其统计 1.4 ...

  4. 如何matlab导入邻接矩阵,“excel如何做矩阵“matlab中读取excle中的邻接矩阵

    怎么在excel中使用矩阵函数 在excel中使用矩阵: 1.矩阵乘法运算择G3:H4,公式:=MMULT(A3:B4,D3:E4) 按Ctrl Shift Enter键,即输组公式. 2.阵的逆矩阵 ...

  5. Matlab中计算程序运行时间的三种方法

    经常我们需要计算我们程序到底运行多长时间,这样可以比较程序的执行效率.当然这个对于只有几秒钟的小程序没有什么意义,但是对于大程序就有很重要的意义了. 下面我们就说说MATLAB中计算程序运行时间的三种 ...

  6. MATLAB中plot函数的linespec参数

    这篇文章的目的,就是记录一下plot函数的linespec参数的每个线型和点型选项到底指的是什么.因为MATLAB帮助中只有文本解释,在这里把每个选项都画出来,更为直观一些. 在MATLAB中画图时, ...

  7. matlab for循环太慢,Matlab中每个for循环迭代的速度降低

    我在Matlab中编写了一个while循环,应该使用Matlab中的tic toc延迟在指定的时间间隔内将数组中的每个值从Matlab发送到arduino,然后读取值并将它们存储在变量中并对其进行图形 ...

  8. matlab中 mcc、mbuild和mex命令详解

    先简单的说说mcc.mbuild和mex到底怎么回事: mcc将M文件转换成C/C++文件和相应的MEX包裹文件(需要Matlab编辑器),但在特定条件下可以自动调用mbuild或者mex mex将C ...

  9. MATLAB中FIR滤波器的时延溢出问题详解:线性相位对信号造成的时延溢出及其消除方法,以及fir1等函数的使用

    1.问题由来: 前段时间在对用MATLAB处理试验数据时,需要对多路信号进行滤波后做同步,在这个过程中使用MATLAB中自带的 fir1 函数以及Filter Designer工具箱(FDATool) ...

  10. Matlab中滤波器的设计(FDAT)

    在matlab中有一个滤波器设计和分析工具FDAT,可以通过此工具来对滤波器进行设计. matlab中一些简单的命令:round(x)把x舍入到最近的整数(四舍五入) abs(x)计算x的绝对值 sq ...

最新文章

  1. 一站式智能芯片定制技术
  2. webpack项目上传云服务器,webpack项目上传云服务器
  3. 文巾解题 leetcode993. 二叉树的堂兄弟节点
  4. leetcode day5 -- Reorder List Linked List Cycle II
  5. 判断windows进程是否存在
  6. servlet的执行过程
  7. iOS UI 18 数据库
  8. centos下配置java环境变量
  9. linux进程控制-exit()
  10. php lwm2m,LwM2M和CoAP及它们之间的关系
  11. c语言链表二路归并排序,链表的二路归并排序 Sort List
  12. 微软日语输入法安装及简单教程(深度技术 ghost xp)
  13. 2021-09-27 人民邮电出版社网址下获取新书推荐的所有图书名称
  14. 计算机内存不足16g内存,高手亲自教你win10 16g内存显示内存不足的修复要领
  15. HTML5 2D平台游戏开发#8指令技
  16. 1415-2个人读后感作业
  17. 访问知乎出现【出了一点问题,我们正在解决,去往首页】解决方案
  18. 主从概念以及主从的相关知识
  19. EOS Dapps已成黑客攻击事件
  20. Corona室内渲染作品赏析《绿色味道》

热门文章

  1. [内核编程] 内核环境及其特殊性,驱动编程基础篇
  2. C++中default标识的构造函数的说明
  3. Android开发之ApiCloud模块开发步骤
  4. Android开发之ListView子布局item高度的问题
  5. ViewController的生命周期分析和使用
  6. 深入一致性哈希(Consistent Hashing)算法原理
  7. 20165306 第八周学习任务
  8. 视频控件VideoCapX的使用指南和常见问题合集
  9. android项目闪屏页细节
  10. 条码软件调用ERP系统