【问题标题】:Detecting Circles within an image检测图像中的圆圈
【发布时间】:2015-12-09 22:56:15
【问题描述】:

我目前正在使用 EmguCV 对靶场目标的图像进行形状检测:

但无论我在代码中的设置如何(如下):

double cannyThreshold = 180; double circleAccumulatorThreshold = 170; CircleF[] circles = CvInvoke.HoughCircles(uimage, HoughType.Gradient, 2.0, 1.0, cannyThreshold, circleAccumulatorThreshold, 5);

我似乎只能找到三个圆圈,其中一个是错误的。

我是不是搞错了?我正在使用Rev3.0 EmguCV 中包含的默认形状检测示例。

【问题讨论】:

  • 霍夫圆找不到同心圆。
  • 那么什么会找到同心圆
  • 你可以看看this 了解一下...

标签: c# opencv emgucv


【解决方案1】:
  1. 先找边(例如参见 Sobel 算子或 Canny)
  2. 找到轮廓,然后轮廓将代表圆
  3. 按区域过滤轮廓
  4. 对每个轮廓使用 minEnclosureCircle 以获得中心和 半径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-09
    • 1970-01-01
    • 2023-01-01
    • 2011-12-04
    • 2017-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多