为什么用零结构元素侵蚀/扩张图像会导致( - )Inf值? [英] Why does eroding / dilating image with zeros structuring element cause (-)Inf value?

查看:179
本文介绍了为什么用零结构元素侵蚀/扩张图像会导致( - )Inf值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在matlab中使用imerode和imdilate与图像m

I use imerode and imdilate in matlab with image m

0 0 0 
0 1 0
0 0 0 

和结构元素f

0

使用imerode的结果是

the result for using imerode is

inf inf inf
inf inf inf
inf inf inf

和imdilate是

-inf -inf -inf
-inf -inf -inf
-inf -inf -inf

有人可以向我解释一下吗?

非常感谢。

Can someone explain it to me?
Thank you very much.

推荐答案

在不存在的情况下应用结构元素时会发生此工件值(例如,它可能出现在边界处,或者在您的情况下通过使用排除中心的1x1结构元素)。

在这种情况下,MATLAB的 imerode imdilate yield -Inf Inf 分别。

This artifact happens when applying the structuring element on a non-existent value (for example, it may occur at the borders, or in your case by using a 1x1 structuring element that excludes the center).
In such cases, MATLAB's imerode and imdilate yield -Inf and Inf, respectively.

您可以阅读更多此处以澄清此现象。

You can read more here for a clarification of this phenomenon.

这篇关于为什么用零结构元素侵蚀/扩张图像会导致( - )Inf值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆