使用 openCV 检测特定颜色(或灰度)的圆

发布于 2024-09-08 17:13:15 字数 152 浏览 2 评论 0原文

有没有办法使用 openCV 检测具有特定灰度级的圆?我想检测一个与其他圆圈不同的圆圈。

目前,我正在使用 cvHoughCircles 来检测我的圆圈。我知道该方法返回一个 cvSeq 数组,其中包含每个圆(点和半径)的信息,但它不提供任何颜色信息。

谢谢

Is there a way to detect a circle with a specific grey level using openCV? I want to detect a circle that marks out from the others.

Currently, I'm using cvHoughCircles to detect my circles. I know the method returns an array of cvSeq containing the info on each circle (point and radius), but it does not provide any color information.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赴月观长安 2024-09-15 17:13:15

您应该首先隔离您想要的颜色,然后对该图像进行霍夫圆。

假设您想从一堆绿色、红色和蓝色圆圈中找到绿色圆圈。这个例子很简单,只要进入绿色通道就可以了。您只会在阈值图像中看到绿色圆圈。对其进行索贝尔/精明操作并执行霍夫圆。

You should first isolate the colour you want, and then do a houghcircles on that image.

Say you want to find green circles from a bunch of green, red and blue circles. Its simple in this case, just threshold the green channel. You'll get only the green circle in the thresholded image. Do a sobel/canny on it and execute houghcircles.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文