algorithm - 最快的边缘检测方法是什么?

标签 algorithm performance graphics image-processing edge-detection

我正在考虑针对工业问题实现基于图像处理的解决方案。

图像由一个红色矩形组成。在里面我会看到一个圆矩阵。要求是在以下约束下计算圆圈数。 (实际应用:统计一个瓶壳里有多少瓶,有漏瓶吗???)

  1. The time taken for the operation should be very low.
  2. I need to detect the red rectangle as well. My objective is to count the items in package and there are no mechanism (sensors) to trigger the camera. So camera will need to capture the photos continuously but the program should have a way to discard the unnecessary images.
  3. Processing should be realtime.
  4. There may be a "noise" in image capturing. You may see ovals instead of circles.

我的问题如下,

  1. What is the best edge detection algorithm that matches with the given scenario?
  2. Are there any other mechanisms that I can use other than the edge detection?
  3. Is there a big impact between the language I use and the performance of the system?

最佳答案

啊哈 - 你现在告诉我们瓶子在固定位置!

这是一个非常简单的问题。

您所要做的就是查看 12 个点中的每一个点,看看那里是否有黑色区域。没有什么比这更容易了。

您根本不需要进行任何边缘或形状检测。

就这么简单。

然后您指出盒子可能会旋转,物体可能会摇晃。盒子可能会旋转一点(甚至很多,每次 0 到 360)很容易处理。瓶子在“槽”中(即使摇晃)这一事实极大地改变了问题的性质。你的主要问题(这很容易)是等待每个新的红色方 block ( crate )在相机下方居中。我刚刚意识到您在原始问题的句子中字面意思是“矩阵”。与发现一堆无序的圆圈相比,这完全改变了一切。确定 blob 是否在 12 个点之一“打开”,与“识别图像中的圆圈”是一个截然不同的问题。或许您可以张贴一张图片来结束这个问题。


我相信下面的 Kenny 最终确定了最佳解决方案:blob 分析。


“数一数一个瓶壳里有多少个瓶子”……

单独的瓶子是否位于“插槽”中?即,有 4x3 = 12 个孔,每个瓶子一个。

换句话说,您“只需”确定 12 个孔中的每个孔中是否有瓶子。

对吗?

如果是这样,您的问题比“随处可见”的一堆瓶子的更一般问题要容易得多。

很简单,我们从哪里看到瓶子?顶部,侧面,底部,还是?我们总是看到顶部/底部,还是它们是混合的(即,从上到下打包)。这些问题产生了巨大的差异。

关于algorithm - 最快的边缘检测方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3863185/

相关文章:

algorithm - 通常对连通性使用什么定义

java - 永不更改表的最佳 Spring/Hibernate 配置

json - Postgres json 索引对查询速度没有影响

c++ - Qt 中屏幕绘制和键盘按键事件的精确延迟

python - 二叉树获取每个级别的所有节点

algorithm - 多项式的根 mod a prime

python - 索引大小为 k 的子集

mysql - 如何优化 2500 万行的批量 sql 更新

javascript - 使用 Node.JS 进行实时图形处理

graphics - 响度的配色方案?