如何创建自定义哈尔分类器? [英] How do I create a custom haar classifier?

查看:103
本文介绍了如何创建自定义哈尔分类器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力创建自定义的haar分类器.我在网上找到了一些教程,但是没有指定他们正在使用哪个版本的opencv.我需要的是一个非常简洁明了的步骤示例,以及一个简单的图像数据集.我还需要了解opencv版本和OS平台,以便使其运行.我在Windows和Linux上都尝试过opencv版本的矩阵,并且在发生内存错误后遇到了内存错误.在扩展它以适合我的问题之前,我想先从一组已知的好的数据和简单的命令开始.

I am struggling to create a custom haar classifier. I have found a couple tutorials on the web, but they do not specify which version of opencv they are using. What I need is a very concise and simplified example of the steps that are required, along with a simple dataset of images. I also need to know the opencv version and the OS platform so I can get it running. I have tried a matrix of opencv versions on both windows and linux and I have run into memory error after memory error. I would like to start with a known good set of data and simple commands before expanding it to fit my problem.

感谢您的帮助, 克里斯

Thanks for your help, Chris

推荐答案

OpenCV提供了两个实用程序命令createsamples.exehaartraining.exe,它们可以生成Haar分类器使用的xml文件.也就是说,使用从haartraining.exe输出的xml文件,您可以直接将人脸检测示例与xml文件一起使用以检测任何自定义对象.

OpenCV provides two utility commands createsamples.exe and haartraining.exe, which can generate xml files used by Haar Classifiers. That is, with the xml file outputted from haartraining.exe, you can directly use the face detection sample with your xml file to detect any customized objects.

关于使用命令的详细过程,您可以参考《 i5学习OpenCV》一书中的第513-516页,或

About the detailed procedures to use the commands, you may consult Page 513-516 in the book "Learning OpenCV", or this tutorial.

关于分类器如何工作的内部机制,您可以查阅论文",已被引用5500多次.

About the internal mechanism of how the classifier works, you may consult the paper "Rapid Object Detection using a Boosted Cascade of Simple Features", which has been cited 5500+ times.

这篇关于如何创建自定义哈尔分类器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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