gpt4 book ai didi

matlab - 为什么用零结构元素腐 eclipse /膨胀图像会导致 (-)Inf 值?

转载 作者:太空宇宙 更新时间:2023-11-03 19:37:03 25 4
gpt4 key购买 nike

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

0 0 0 
0 1 0
0 0 0

和结构元素f

0

使用imerode的结果是

inf inf inf
inf inf inf
inf inf inf

imdilate 是

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

有人能给我解释一下吗?
非常感谢。

最佳答案

当将结构元素应用于不存在的值时会发生此伪像(例如,它可能出现在边界处,或者在您的情况下使用不包括中心的 1x1 结构元素)。
在这种情况下,MATLAB 的imerodeimdilate 分别产生-InfInf

您可以阅读更多here澄清这一现象。

关于matlab - 为什么用零结构元素腐 eclipse /膨胀图像会导致 (-)Inf 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14110820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com