| 查看: 3790 | 回复: 4 | ||||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||||
[求助]
到底怎么实现,bwfill和imfill
|
||||
| 在用MATLAB图像处理中用到填充的算法,在网上搜了也没看到清楚的,真心想搞明白bwfill这个函数到底是什么原理,怎么实现的,望大家给点帮助,万分感谢! |
» 猜你喜欢
到新单位后,换了新的研究方向,没有团队,持续积累2区以上论文,能申请到面上吗
已经有13人回复
博士申请都是内定的吗?
已经有6人回复
之前让一硕士生水了7个发明专利,现在这7个获批发明专利的维护费可从哪儿支出哈?
已经有5人回复
博士读完未来一定会好吗
已经有29人回复
投稿精细化工
已经有4人回复
高职单位投计算机相关的北核或SCI四区期刊推荐,求支招!
已经有4人回复
导师想让我从独立一作变成了共一第一
已经有9人回复
读博
已经有4人回复
JMPT 期刊投稿流程
已经有4人回复
心脉受损
已经有5人回复
4楼2013-09-03 07:57:36
月只蓝
主管区长 (职业作家)
-

专家经验: +1059 - 应助: 1712 (讲师)
- 贵宾: 8.888
- 金币: 68120.7
- 散金: 1938
- 红花: 443
- 沙发: 4
- 帖子: 4373
- 在线: 3291.4小时
- 虫号: 1122189
- 注册: 2010-10-14
- 专业: 宇宙学
- 管辖: 计算模拟区
【答案】应助回帖
感谢参与,应助指数 +1
|
认真研读一下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 <BACKSPACE> or <DELETE> to remove the previously selected point. A shift-click, right-click, or double-click selects a final point and then starts the fill; pressing <RETURN> 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. |

2楼2013-09-02 13:36:52
libralibra
至尊木虫 (著名写手)
骠骑将军
- 程序强帖: 40
- 应助: 817 (博后)
- 金币: 12914.1
- 红花: 64
- 帖子: 2238
- 在线: 287.3小时
- 虫号: 696514
- 注册: 2009-02-05
- 专业: 计算机软件

3楼2013-09-02 18:31:43
5楼2013-09-03 07:58:29













回复此楼
,谢谢你。。。