diff --git a/modules/objdetect/src/cascadedetect.cpp b/modules/objdetect/src/cascadedetect.cpp index c4fedd46db..46a1d60f2d 100644 --- a/modules/objdetect/src/cascadedetect.cpp +++ b/modules/objdetect/src/cascadedetect.cpp @@ -677,6 +677,10 @@ void HaarEvaluator::computeOptFeatures() copyVectorToUMat(*optfeatures_lbuf, ufbuf); } +bool HaarEvaluator::setImage(InputArray _image, const std::vector& _scales){ + tofs = 0; + return FeatureEvaluator::setImage(_image, _scales); +} bool HaarEvaluator::setWindow( Point pt, int scaleIdx ) { diff --git a/modules/objdetect/src/cascadedetect.hpp b/modules/objdetect/src/cascadedetect.hpp index 4cbf3e9bf0..156f0468db 100644 --- a/modules/objdetect/src/cascadedetect.hpp +++ b/modules/objdetect/src/cascadedetect.hpp @@ -347,6 +347,7 @@ public: virtual Ptr clone() const; virtual int getFeatureType() const { return FeatureEvaluator::HAAR; } + virtual bool setImage(InputArray _image, const std::vector& _scales); virtual bool setWindow(Point p, int scaleIdx); Rect getNormRect() const; int getSquaresOffset() const;