Ask Your Question

Revision history [back]

opencv_traincascade unhandeled exception

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?