I have not yet found reading method for xml file created by opencv_traincascade LBP.

asked 2015-06-04 19:29:29 -0600

I am making cascade program to detect vehicle using opencv_traincascade attached in OpenCV2.0. I am suffering from xml file handling.

[Developing Environment] OpenCV2.0 Visual C++ 2008 Windows 7

Face detection program with OpenCV -------------------------(1)

http://www.aianet.ne.jp/~asada/prog_d...

I am trying to detect vehicle using static object detection program (1) and the following (2)-(4) xml file.

xml file created by opencv_haartraining --------------------(2)

xml file created by opencv_traincascade HARR ---------------(3)

xml file created by opencv_traincascade LBP ----------------(4)

I examined xml file by text editor and found that (2)-(4) format were different.

When I checked vehicle detection program (1) using (2)-(4) xml file,

Vehicle detection program run correctly with xml file (2) created by opencv_haartraining. Vehicle detection program did not run correctly with xml file (3) created by opencv_traincascade HARR. Vehicle detection program did not run correctly with xml file (4) created by opencv_traincascade LBP.

an error message for (3),(4) appeared as follows.

Non handling Exception by 0x75dc4503 was occurred. Microsoft C++ Exception : cv::Exception

If -baseFormatSave was added to (3) excecution option, new format xml file would be converted to old format xml file (compatible with (2)). But it took me 6 hours to compensate operation. I had to add stage No, tree No, and root node.

I have been searching solution method for about one month by Internet. But I have not yet found reading method for xml file (4) created by opencv_traincascade LBP.

I need help.

edit retag flag offensive close merge delete

Comments

1

the code in your link is unfortunately horribly outdated, you must not use it. also, opencv2.0 is like 6 years old, please update to a more recent version.

the old CvHaarClassifierCascade (c-api) thing cannot read files created by opencv_traincascade, only files created from the deprecated opencv_haartraining tool.

http://docs.opencv.org/ref/master/d2/...

berak gravatar imageberak ( 2015-06-05 01:04:48 -0600 )edit

Also, in the last months we fixed several bugs in the existing traincascade interface, so please make sure you use at least the latest 2.4 branch from github!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-06-05 03:41:14 -0600 )edit