OpenCV Error: Assertion failed (s >= 0) in setSize when using opencv_traincascade

asked 2015-07-24 03:51:31 -0600

azsqe gravatar image

Hi, I am trying to train my own classifier on linux with this command :

opencv_traincascade -data training/ -vec petit_try.vec -bg neg.txt -numPos 4000 -numNeg 2000 -numStages 20 -precalcValBufSize 16384000000 -precalcIdxBufSize 16384000000 -featureType LBP -w 48 -h 35 -minHitRate 0.995 -maxFalseAlarmRate 0.5 -mode ALL

and i get this error :

OpenCV Error: Assertion failed (s >= 0) in setSize, file /home/tbesson/Downloads/opencv-3.0.0/modules/core/src/matrix.cpp, line 293 terminate called after throwing an instance of 'cv::Exception' what(): /home/tbesson/Downloads/opencv-3.0.0/modules/core/src/matrix.cpp:293: error: (-215) s >= 0 in function setSize

petit_try.vec is a vec contening 4000 positives images (created with opencv_createsamples), neg.txt is a file contening my list of negatives images

thx a lot for any help :)

edit retag flag offensive close merge delete

Comments

by the way : opencv_traincascade -data training/ -vec petit_try.vec -bg neg.txt -numPos 1000 -numNeg 600 -numStages 20 -precalcValBufSize 1024 -precalcIdxBufSize 1024 -featureType LBP -minHitRate 0.995 -maxFalseAlarmRate 0.5 -w 48 -h 35 works fine and is running right no but i fear that it will not be very efficient that's why i wanted to use a lot of images. Does anyone know why with the first set of parameters it doesn't work?

azsqe gravatar imageazsqe ( 2015-07-24 04:12:19 -0600 )edit