Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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 :)