CascadeClassifier crashing on detectMultiScale

asked 2015-01-12 07:40:18 -0500

codingTornado gravatar image

Hello, I'm trying to find faces in a video using the CascadeClassifier. Since I migrated from 2.4 to 3.0 I've been having an issue with detectMultiScale when I hand it a RoI bounded Mat.
I use the following line to search for the faces

classifier_->detectMultiScale(region, found, 1.35, 5, 0, Size(25, 25));

Where region is a Mat bounded by a Rect I defined to reduce the search area based on a background subtractor and found is a new vector.

When run I get the following:

Debug Assertion Failed!
Program: C:\Windows\system32\MSVCP110D.dll
File: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector
Line: 1124

Expression: vector subscript out of range

When debugging the application I find that this error comes when executing line 1265 on cascadedetect.cpp

if( !featureEvaluator->setImage(gray, scales) )

because scales, a vector initialized on line 1249, reaches setImage with size 0 no matter what I do.
What should I do about it? Should I add to that line another condition stating that scales must be greater than 0? Is this a bug that should be reported or am I doing something wrong?

edit retag flag offensive close merge delete



you probably should make an official issue here .

berak gravatar imageberak ( 2015-01-12 07:58:52 -0500 )edit

After a thorough search in the issue tracker I found a bug report on this very same issue, thanks @berak

codingTornado gravatar imagecodingTornado ( 2015-01-12 09:27:25 -0500 )edit

Is this issues fixed. Which branch contains this fix?

Tariq gravatar imageTariq ( 2015-06-28 09:32:42 -0500 )edit