Ask Your Question
0

Opencv and traincascade.exe

asked 2014-06-14 08:46:00 -0500

vbopencv gravatar image

Looking for a simple/small example of creating the cascade.xml using the opencv_traincascade.exe and a corresponding vc++ example that will test the results.

I would need the positive, negative, and a few test images and create_sample and open_traincasde command to generate the cascade.

I tried may example from online but can't seem to get it all working together

I currently use the below I found on the web: c:\opencv2.2\bin\opencv_createsamples -data C:\working_haar_car\CarDataExt -info cars_info.txt -num 550 -vec cars.vec -w 48 -h 24

c:\opencv2.2\bin\opencv_traincascade.exe -data C:\working_haar_car\CarDataExt -vec cars.vec -bg bg.txt -numPos 500 -numNeg 500 -numStages 2 -w 48 -h 24 -featureType LBP

it generate the cascade.xml

but when I use the sample program:

C:\OpenCV2.2\samples\c\facedetect.exe --cascade=cascade.xml test_non1.jpg

the images show but the detection is all over the place.

edit retag flag offensive close merge delete

Comments

Can you upload the results and specify the parameters you chose?

GilLevi gravatar imageGilLevi ( 2014-06-14 13:44:21 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-15 00:52:33 -0500

Hi there,

The detection is all over the place because of bad training. Increase the quality of your training by looking into this : Click here

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-06-14 08:46:00 -0500

Seen: 483 times

Last updated: Jun 15 '14