opencv_traincascade unhandeled exception

asked 2015-10-20 07:19:11 -0600

kelpie gravatar image

I am training a cascade classifier using opencv. I have 5 positive and 5 negative samples (this is for test on one image, if it will work i will use 500 good and 500 bag images). Their dimensions are 20 * 20 pixels.

The code that I used to make the samples was:

D:\learn\opencv_createsamples.exe -info D:\learn\Good.dat -vec D:\learn\samples.vec -w 20 -h 20

this is the traning code:

D:\learn\opencv_traincascade.exe -data D:\learn\haarcascade -vec D:\learn\samples.vec -bg D:\learn\Bad.dat -numStages 16 -minhitrate 0.8 -maxFalseAlarmRate 0.2 -numPos 5 -numNeg 5 -w 20 -h 20 -mode ALL -precalcValBufSize 512 -precalcIdxBufSize 512

Then this application crashes and i see message with error on stage 1: image description

Which of the arguments are wrong?

edit retag flag offensive close merge delete

Comments

I don't know if it is the problem but there is a typo error with -minhitrate 0.8. You can see it as the program took the default value for -minHitRate.

Eduardo gravatar imageEduardo ( 2015-10-20 08:22:34 -0600 )edit
1

Wait a minute, are you using EgmuCV? Then probably a bug with the wrapper, but in any case you should ask in the proper forum (maybe http://www.emgu.com/forum/viewforum.p...). In this forum we don't give support to OpenCV wrappers (see FAQ)

LorenaGdL gravatar imageLorenaGdL ( 2015-10-20 09:13:56 -0600 )edit

Also 5 positive and 5 negative samples for testing purposes --> won't work ... you will run into problems created by that small amount... use the search button on this forum on traincascade parameters and tons of topics will pop up that discuss a good use of parameters.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-21 09:29:36 -0600 )edit