Ask Your Question

Revision history [back]

This looks as if you don't load the classifier successfully from the file. Could you read it via CascadeClassifier::load(filename) and check that it returns true?

This looks as if you don't load the classifier successfully from the file. Could you read it via CascadeClassifier::load(filename) and check that it returns true?

This is the code for the classifier: https://github.com/Itseez/opencv/blob/master/modules/objdetect/src/cascadedetect.cpp

The bool CascadeClassifier::empty() is in line 1553 and your ::load is just below.

This looks as if you don't load the classifier successfully from the file. Could you read it via CascadeClassifier::load(filename) and check that it returns true?

This is the code for the classifier: https://github.com/Itseez/opencv/blob/master/modules/objdetect/src/cascadedetect.cpp

The bool CascadeClassifier::empty() is in line 1553 and your ::load is just below.