Ask Your Question

Revision history [back]

I've also had this error a couple of times. I suspect it arises when the classifier is recreated at every iteration. Try placing CascadeClassifier faceDetector = new CascadeClassifier(CLASSIFIER_FACE); outside the for-loop and see if this solves the issue.

Let me know if it helped!