Ask Your Question

Revision history [back]

Actually there is an abstract class MaskGenerator inside CascadeClassifier, which had implemented the classification with mask. It is necessary to realize the virtual function generateMask() in your derived class. Also note that masked CascadeClassifier is only working with new format cascade classifiers. OpenCV source code opencv/modules/objdetect/src/cascadedetect.cpp could help in detail.