在opencv中的imregionalmax matlab函数的等效项 [英] imregionalmax matlab function's equivalent in opencv

查看:423
本文介绍了在opencv中的imregionalmax matlab函数的等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个连接的组件的图像(圆圈填充).如果我想对它们进行分段,我可以使用分水岭算法.我更喜欢为分水岭编写自己的函数,而不是在OPENCV中使用内置函数.使用opencv查找对象的regionalmax?

I have an image of connected components(circles filled).If i want to segment them i can use watershed algorithm.I prefer writing my own function for watershed instead of using the inbuilt function in OPENCV.I have successfu How do i find the regionalmax of objects using opencv?

推荐答案

前段时间我遇到了同样的问题,解决方案是在OpenCV/Cpp中重新实现imregionalmax算法.并没有那么复杂,因为您可以在Matlab发行版中找到该函数的C ++源代码. (在工具箱中的某个位置).您要做的就是仔细阅读并理解其中描述的算法.然后重写它或删除特定于Matlab的检查,您将拥有它.

I had the same problem some time ago, and the solution was to reimplement the imregionalmax algorithm in OpenCV/Cpp. It is not that complicated, because you can find the C++ source code of the function in the Matlab distribution. (somewhere in toolbox). All you have to do is to read carefully and understand the algorithm described there. Then rewrite it or remove the matlab-specific checks and you'll have it.

这篇关于在opencv中的imregionalmax matlab函数的等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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