使用 OpenCV 进行徽标检测 [英] Logo detection using OpenCV
问题描述
我正在尝试在我正在开发的移动应用中实现一个复活节彩蛋.当在相机视图中检测到徽标时,将触发这些复活节彩蛋.我要检测的徽标是这个:.
I'm attempting to implement an easter egg in a mobile app I'm working on. These easter egg will be triggered when a logo is detected in the camera view. The logo I'm trying to detect is this one: .
我不太确定解决此问题的最佳方法是什么,因为我对计算机视觉还很陌生.我目前正在使用 Canny 算法查找水平边缘.然后我使用概率霍夫变换找到线段.其输出如下(蓝线表示概率霍夫变换检测到的线段):
I'm not quite sure what the best way to approach this is as I'm pretty new to computer vision. I'm currently finding horizontal edges using the Canny algorithm. I then find line segments using the probabilistic Hough transform. The output of this looks as follows (blue lines represent the line segments detected by the probabilistic Hough transform):
下一步我要寻找一组大约 24 条线(适合几乎正方形的矩形),每条线的长度必须大致相同.我会使用这两个信号来指示徽标的潜在存在.我意识到这可能是一种非常幼稚的方法,并欢迎有关如何以更可靠的方式更好地检测此徽标的建议?
The next step I was going to take would be to look for a group of around 24 lines (fitting within a nearly square rectangle), each line would have to be approximately the same length. I'd use these two signals to indicate the potential presence of the logo. I realise that this is probably a very naive approach and would welcome suggestions as to how to better detect this logo in a more reliable manner?
谢谢
推荐答案
您可能想使用 SIFT 使用 Rob Hess 的 SIFT 库.它使用 OpenCV,而且速度也很快.我想这比您目前处理徽标检测的方式更容易:)
You may want to go with SIFT using Rob Hess' SIFT Library. It's using OpenCV and also pretty fast. I guess that easier than your current way of approaching the logo detection :)
尝试同时寻找 SURF,它声称更快&比 SIFT 更强大.这个特征检测教程会帮助你.
Try also looking for SURF, which claims to be faster & robuster than SIFT. This Feature Detection tutorial will help you.
这篇关于使用 OpenCV 进行徽标检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!