diff --git a/modules/objdetect/src/hog.cpp b/modules/objdetect/src/hog.cpp index 4697a0105..c257c80e2 100644 --- a/modules/objdetect/src/hog.cpp +++ b/modules/objdetect/src/hog.cpp @@ -46,6 +46,7 @@ #include #include +#include /****************************************************************************************\ The code below is implementation of HOG (Histogram-of-Oriented Gradients) @@ -3533,7 +3534,7 @@ void HOGDescriptor::groupRectangles(std::vector& rectList, std::vector std::vector > rrects(nclasses); std::vector numInClass(nclasses, 0); - std::vector foundWeights(nclasses, DBL_MIN); + std::vector foundWeights(nclasses, -std::numeric_limits::max()); int i, j, nlabels = (int)labels.size(); for( i = 0; i < nlabels; i++ )