简体   繁体   中英

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....

在此处输入图片说明

How can i get the final .xml file?.

I found it : in the command prompt cmd use the following line

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 .

Reference: Tutorial: OpenCV haartraining

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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