简体   繁体   English

如何将包含文本文件的文件夹转换为xml文件进行haar培训

[英]How to convert folder contains text files into xml file for haar training

I'm using opencv_haartrainaing to train my cascade classifier, and i've a folder containing sub-folders with text files instead of the .xml file as shown here.... 我正在使用opencv_haartrainaing来训练级联分类器,并且我有一个文件夹,其中包含带有文本文件的子文件夹,而不是如此处所示的.xml文件。

在此处输入图片说明

How can i get the final .xml file?. 我如何获得最终的.xml文件?

I found it : in the command prompt cmd use the following line 我发现了它:在命令提示符cmd使用以下行

convert_cascade --size="20x20" haarcascade haarcascade.xml

where 哪里

convert_cascade --size="<sample_width>x<sampe_height>" <haartraining_ouput_dir><ouput_file>

convert_cascade is a ".c" file in ..\\opencv\\samples\\c directory, i compiled it in new project to get 'convert_cascade.exe . convert_cascade is a ".c" file in .. \\ opencv \\ samples \\ c directory, i compiled it in new project to get 'convert_cascade.exe convert_cascade is a ".c" file in directory, i compiled it in new project to get 'convert_cascade.exe

Reference: Tutorial: OpenCV haartraining 参考: 教程:OpenCV训练

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM