使用OpenCV的模式识别 [英] Pattern Recognition using OpenCV

查看:190
本文介绍了使用OpenCV的模式识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试检测绿色场地上的物体上的图案,由三种颜色(两侧的粉红色标记和中间的蓝色标记)排列成交通灯。

I am trying to detect a pattern on an object on a green field, made up of three colors (two pink markers to the sides and a blue one in the middle) arranged like a traffic light.

一开始我试图将图像从网络摄像头转换为hsv颜色空间,并使用cvInRangeS隔离颜色,但成为问题,因为光在房间里的一天变化,我得到假阳性或失去

At first I tried converting the images from the webcam to hsv color space and isolate the color using cvInRangeS but that became problematic as the light changes in the room during the day I either get false positives or lose track of objects.

然后我尝试通过修改find​​_obj.cpp的SURF,这是opencv的问题只能检测到我的标记上的2个冲浪点,这不足以找到

Then I tried SURF by modifying find_obj.cpp, the problem with that was opencv can only detect 2 surf points on my marker which is not enough to locate it from the code it seems I need at least 4, I tried playing with surf params but that did not change anything.

同样在google上,我遇到了这个问题,

Also while googling I came across this,

http://wiki.elphel.com /index.php?title=OpenCV_Tennis_balls_recognizing_tutorial&redirect=no

这说明我也可以使用机器学习来挑选我感兴趣的颜色范围,但我找不到任何有关如何操作的信息。

which says I can also use machine learning to pick the color range I am interested in but I could not find any info on how to do that.

我的问题是,OpenCV中有什么可以让我检测标记吗?

My question is, is there anything in OpenCV that would allow me to detect the marker?

编辑:关于尝试哈尔训练的另一个问题,我的背景将总是相同的颜色相同的表面使用相同的标记为对象,我可以训练一个分类器与20正20负图像或我

Another question about trying haar training, my background will always be same color same surface using the same marker for the object, can I train a classifier with say 20 positive 20 negative images or do I still need thousands of images to get it to recognize?

推荐答案

我建议您查看Shervin的关于blob检测的教程,颜色

http://www.shervinemami.info/blobs.html

I'd suggest you check out Shervin's tutorial on blob detection, using colors
http://www.shervinemami.info/blobs.html

编辑

您晚上尝试retinex帮助改善效果

You night try retinex to help improve results

http://www.ipol.im/pub/algo/lmps_retinex_poisson_equation/

这篇关于使用OpenCV的模式识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆