gpt4 book ai didi

c++ - OpenCV 分水岭 : 4 point connectivity

转载 作者:行者123 更新时间:2023-11-27 23:11:15 29 4
gpt4 key购买 nike

我正在为 OpenCV 中的分水岭编写代码。

但我希望分水岭边界是 4 点连接而不是 8 点连接。

目前是这个界面:

void watershed(InputArray image, InputOutputArray markers)

有人对此有任何解决方案吗?

还有,有什么简单的方法可以在 opencv 中执行形态学分水岭以自动过分割,当前的方法需要用户输入?

最佳答案

OpenCV 帮助watershed没有明确解释函数中使用的连接。它只是指 MEYER, Fernand 的论文。彩色图像分割。在:Image Processing and its Applications, 1992., International Conference on。 IET,1992 年。 303-306。

也许你必须实现自己的分水岭算法,从 OpenCV 中可用的算法开始(OpenCV 2.4 实现是 here ),或者创建一个新算法;例如,下面的论文描述了一种正确突出连接性的算法:

VINCENT, Luc; SOILLE, Pierre. Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE transactions on pattern analysis and machine intelligence, 1991, 13.6: 583-598.

关于c++ - OpenCV 分水岭 : 4 point connectivity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20219670/

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