diff --git a/modules/softcascade/src/soft_cascade_octave.cpp b/modules/softcascade/src/soft_cascade_octave.cpp index 7322901dac..b2733e78b1 100644 --- a/modules/softcascade/src/soft_cascade_octave.cpp +++ b/modules/softcascade/src/soft_cascade_octave.cpp @@ -137,7 +137,7 @@ BoostedSoftCascadeOctave::BoostedSoftCascadeOctave(cv::Rect bb, int np, int nn, int w = boundingBox.width; int h = boundingBox.height; - integrals.create(poolSize, (w / shrinkage + 1) * (h / shrinkage * builder->totalChannels() + 1), CV_32SC1); + integrals.create(npositives + nnegatives, (w / shrinkage + 1) * (h / shrinkage * builder->totalChannels() + 1), CV_32SC1); } BoostedSoftCascadeOctave::~BoostedSoftCascadeOctave(){}