imfill
来源:互联网 发布:软件测试数据库面试题 编辑:程序博客网 时间:2024/06/06 18:45
Fill image regions and holes.
imfill(edgeMapTemp,'holes');
BW2 = imfill(BW1,LOCATIONS) performs a flood-fill operation on
background pixels of the input binary image BW1, starting from the
points specified in LOCATIONS.
BW2 = imfill(BW1,'holes') fills holes in the input image. A hole is
a set of background pixels that cannot be reached by filling in the
background from the edge of the image.
I2 = imfill(I1) fills holes in an intensity image, I1. In this
case a hole is an area of dark pixels surrounded by lighter pixels.
需求:如上图所示,想将其中的闭合区域物体部分整体标记出来,去除掉里面的细小区域,用此函数即可达到此目的
以下是结果:
注意到其中的小区域已经消失,而靠近边缘处的区域也没有填充,因此此算法是flood fill算法,从边缘处开始寻找,如果有多余两处的非边缘闭合区域,则都被填充,如下图所示,将图1中最上面的非闭合区域进行闭合(只是加了一条线),再进行同样的操作后,会出现如下结果:
因此,在进行此操作时,一定要注意其中的闭合区域是否属于自己可控范围之内。
0 0
- imfill
- 学习:imfill
- imfill简介
- matlab:imfill学习
- matlab imfill函数
- MATLAB中imfill()函数解释
- imfill matlab fillimage regions and holes
- java图像处理--形态学填充处理imfill
- 使用opencv实现matlab中的imfill填充孔洞功能
- opencv 实现孔洞填充的两个解决方案 MATLAB--imfill功能(收集)
- saliency 文献综述
- Tutorial on Visual Saliency Modeling
- 7 Reasons Why You Will Never Do Anything Amazing With Your Life
- Using gcc within Windows
- error C2143: syntax error : missing \';\' before \'type\'
- imfill
- Superpixel整理
- Matlab左除(\\)和右除(/)
- 坚持
- 应该怎样入门
- On Being a Successful Graduate Student
- How to Succeed in Graduate School: A Guide for Students and Advisors-1
- How to Succeed in Graduate School: A Guide for Students and Advisors-2
- 10 Tips to Let Go of the Past & Embrace the Future