traincascade Assertion failed

asked 2014-05-04 16:07:22 -0600

Doeke Wartena gravatar image

===== TRAINING 0-stage ===== I get the following error when trying the traincascade:

<BEGIN
OpenCV Error: Assertion failed (_img.rows * _img.cols == vecSize) in get, file /tmp/opencv-vEgc/opencv-2.4.8.2/apps/traincascade/imagestorage.cpp, line 157
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv-vEgc/opencv-2.4.8.2/apps/traincascade/imagestorage.cpp:157: error: (-215) _img.rows * _img.cols == vecSize in function get

Abort trap: 6

Does anyone knows what i could try to fix it?

In case it matters, in my negatives are colored and grayscale images in different sizes. My positive images are all standing images and the aspect ratio is almost equal for everyone. Also i really lack of positive images but i just wanted to see if i could get the whole thing together before i create tons of positive images.

best Doeke

edit retag flag offensive close merge delete

Comments

Did you use opencv_createsamples to save positive images in .vec file? Also, -w(width) and -h(height) parameters of opencv_traincascade should be the same size as they were in opencv_createsamples. (negative windows should have the same size as positives in .vec file)

mada gravatar imagemada ( 2014-05-05 07:03:43 -0600 )edit