【工作环境】是Windows XP或Linux上的Visual Studio + cygwin。cygwin是必需的,因为我使用了几个UNIX命令。
【注解】在进行安装cygwin过程中,要选择安装“python、perl等”几个选项。
【代码以及脚本准备】
github克隆:https://github.com/mrnugget/opencv-haar-classifier-training
百度云网盘:
http://pan.baidu.com/s/1cAeU4I 提取码:o09g
【制作样本的工具】
制作正样本的截图工具:
http://pan.baidu.com/s/1mhGVPzE 提取码:c9le
训练方法(99%):http://www.learnopencv.com/training-better-haar-lbp-cascade-eye-detector-opencv/
Naotoshi Seo博士:http://note.sonots.com/SciSoftware/haartraining.html
==================================================================================================
制作正样本工具的使用方法:
训练步骤
【步骤1:数据收集-->准备正负样本文件和图片】
negative_images
positive_images
【步骤2:生成正负样本描述文件】
find ./negative_images -iname "*.jpg" > negatives.txt
find ./positive_images -iname "*.jpg" > positives.txt
【步骤3:创建样品】
(1)使用creationamples.pl为每个图像创建.vec文件。
该脚本是围绕opencv_cre