Fill my holes_imfilter函数matlab

Fill my holes_imfilter函数matlabSyntaxBW2=imfill(BW)[BW2,locations]=imfill(BW)BW2=imfill(BW,locations)BW2=imfill(BW,’holes’)I2=imfill(I)BW2=imfill(BW,locations,conn)DescriptionBW2=imfill(BW)displaysthebinaryimageB…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

Syntax

BW2 = imfill(BW)

[BW2,locations] = imfill(BW)

BW2 = imfill(BW,locations)

BW2 = imfill(BW,’holes’)

I2 = imfill(I)

BW2 = imfill(BW,locations,conn)

Description

BW2 = imfill(BW) displays the binary image BW onthe screen and lets you define the region to fill by selecting pointsinteractively by using the mouse. To use this interactive syntax, BW mustbe a 2-D image. Press Backspace or Delete toremove the previously selected point. A shift-click, right-click,or double-click selects a final point and starts the fill operation.Pressing Return finishes the selection withoutadding a point.

[BW2,locations] = imfill(BW) returns thelocations of points selected interactively in locations. locations isa vector of linear indices into the input image. To use this interactivesyntax, BW must be a 2-D image.

BW2 = imfill(BW,locations) performs a flood-filloperation on background pixels of the binary image BW,starting from the points specified in locations.If locations is a P-by-1 vector, it contains thelinear indices of the starting locations. If locations isa P-by-ndims(BW) matrix, eachrow contains the array indices of one of the starting locations.

BW2 = imfill(BW,’holes’) fills holes inthe binary image BW. A hole is a set of backgroundpixels that cannot be reached by filling in the background from theedge of the image.

I2 = imfill(I) fills holes in the grayscaleimage I. In this syntax, a hole is defined as anarea of dark pixels surrounded by lighter pixels.

BW2 = imfill(BW,locations,conn) fills thearea defined by locations, where conn specifiesthe connectivity. conn can have any of the followingscalar values.

Value

Meaning

Two-dimensionalconnectivities

4

4-connected neighborhood

8

8-connected neighborhood

Three-dimensionalconnectivities

6

6-connected neighborhood

18

18-connected neighborhood

26

26-connected neighborhood

Connectivity can be defined in a more general way for any dimensionby using for conn a 3-by-3-by- … -by-3 matrixof 0’s and 1’s. The 1-valuedelements define neighborhood locations relative to the center elementof conn. Note that conn mustbe symmetric about its center element.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/194266.html原文链接:https://javaforall.net

(0)
上一篇 2025年11月9日 上午10:43
下一篇 2025年11月9日 上午11:15


相关推荐

  • 不管怎么选择,都会有遗憾「建议收藏」

    到底什么样的选择才是最好的,每一种选择都会有遗憾!最近有点想家,虽然在这个城市安了新家。那个小的城市–延安,和这个大的城市—长沙,两种感觉,不同的生活体验。现在都十一月了,要是在延安,那么现在已经是深秋,开始变得萧条,不想夏天那么生机盎然,而现在这个城市秋天和夏天在外观上看不出什么变化,只是现在的温度比夏天舒服了很多,不冷 不热。城市的车水马龙,霓虹灯,夜晚还是有很多的喧嚣,也看不到漫天的繁星。

    2022年2月26日
    46
  • 先验概率和后验概率的定义是什么_先验和后验什么意思

    先验概率和后验概率的定义是什么_先验和后验什么意思话不多说,我因为在学习朴素贝叶斯的时候有点分不清楚先验概率、后验概率,所以就网上找了一些资料,大家各有各的理解,但感觉还是不太能从定义上区分,所以就有了下面这张图:图里面说的还是比较清晰的,大家有不理解的地方可以沟通交流嘛。…

    2022年10月18日
    7
  • epoll原理详解及epoll反应堆模型

    epoll原理详解及epoll反应堆模型设想一个场景 有 100 万用户同时与一个进程保持着 TCP 连接 而每一时刻只有几十个或几百个 TCP 连接是活跃的 接收 TCP 包 也就是说在每一时刻进程只需要处理这 100 万连接中的一小部分连接 那么 如何才能高效的处理这种场景呢 进程是否在每次询问操作系统收集有事件发生的 TCP 连接时 把这 100 万个连接告诉操作系统 然后由操作系统找出其中有事件发生的几百个连接呢 实际上 在 Linux2 4 版本以前

    2026年3月19日
    2
  • 零配置Claude Code,GLM性能拉满,编程效率起飞!

    零配置Claude Code,GLM性能拉满,编程效率起飞!

    2026年3月12日
    2
  • HTTP请求中的form data和request payload的区别

    HTTP请求中的form data和request payload的区别

    2021年9月10日
    58
  • 【JavaEE进阶系列 | 从小白到工程师】Calendar类的常用方法使用与创建对象

    【JavaEE进阶系列 | 从小白到工程师】Calendar类的常用方法使用与创建对象java util Calendar 是日历类 Date 类中很多方法都过时了 而 Calendar 类的功能比 Date 强大很多 所以 Java 官方推荐使用 Calendar 来替换 Date 的使用 java util Calendar 是日历类 Date 类中很多方法都过时了 而 Calendar 类的功能比 Date 强大很多 所以 Java 官方推荐使用 Calendar 来替换 Date 的使用 java util Calendar 是日历类

    2026年3月16日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号