Ask Your Question

Revision history [back]

opencv_traincascade.exe = Assertion Failed (s >= 0) Help?

Hello,

I'm trying to train my first classifier and running into a bit of an issue that I cannot get past.

As a test I've cropped three images. These images are of myself just standing against the wall.

I've created a bg.txt file of negative images which were downloaded from the internet.

My info file contains one entry (only training on one image just to get a successful train first):

pos2Mark.jpg 1 0 0 284 640

First I run opencv_createsamples.exe to create my .vec file.

Second I run the following command:

opencv_trainingcascade.exe -data output -vec bodies.vec -bg bg.txt -numPos 3 -numNeg 3019 -numStages 1 -w 20 -h 20 -featureType HAAR

When doing so I receive the following error:

C:\BBi\HAAR_Training>opencv_traincascade.exe -data output -vec bodies.vec -bg bg .txt -numPos 1 -numNeg 3019 -numStages 1 -w 20 -h -20 -featureType HAAR OpenCV Error: Assertion failed (s >= 0) in unknown function, file ........\oc v\opencv\modules\core\src\matrix.cpp, line 117

I'm really at a loss at this point. Can anyone give me some helpful tips based on the information I've provided?

I'll be happy to give more information if you just ask. Thank you very much