检测已知对象(通过模板)
I need help with Object detection.
I habe to detect position of a Fork and a Knife on a Plate. The Plate is on a Tray.
The Objects are always the same but the Positions can vary.
I'm wokring with c# and AForge + EmguCV
Can someone help me with this?
Here is a sample pic:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
亮度和颜色或刀/叉像素主要由反射决定,所以我认为经典的模板匹配不适用于这张图片。
这把刀几乎没有角,所以我不确定像 SIFT 这样基于兴趣点的算法是否适用于此。
我认为最好的方法可能是使用边缘检测器(Laplace、Sobel、Canny),跟踪线条并执行几何模板匹配,就像他们在 1980 年代所做的那样。
以下是此方法的一个很好的参考:计算机对象识别
The brightness and color or the knife/fork-pixels are mostly determined by reflection, so I don't think classic template matching would work with this picture.
The knife has almost no corners, so I'm not sure if an interest point-based algorithm like SIFT would work here.
I think the best approach here could be to use an edge detector (Laplace, Sobel, Canny), trace the lines and perform geometric template-matching the way they did it back in the 1980's.
Here's a very good reference for this approach: Object Recognition by Computer
我会选择寻找图像梯度的模板匹配方法。这些方法对于不断变化的照明条件具有鲁棒性。
您可以看一下实现的快速模板匹配算法:
https://github.com/dajuric/accord-net-extensions
包含示例。
所实现的模板匹配算法基于梯度方向,对于不断变化的光照条件非常有弹性。为了检测您的对象,必须创建一个模板(例如在 Paint 中),然后重新缩放。
I would go for template matching methods which are looking image gradients. Those approaches are robust to changing lighting conditions.
You can take a look at the fast template matching algorithm implemented in:
https://github.com/dajuric/accord-net-extensions
Samples included.
The implemented template matching algorithm is based on orientation of gradients, which are very resilient to changing lighting condition. In order to detect your object, a template must be made (e.g. in Paint) and then rescaled.