fixing SVM negative value rounding
authorStevenPuttemans <steven.puttemans@kuleuven.be>
Wed, 29 Oct 2014 12:50:20 +0000 (13:50 +0100)
committerDikay900 <dark900@xyz.de>
Tue, 26 May 2015 15:26:30 +0000 (17:26 +0200)
Conflicts:
modules/objdetect/src/hog.cpp

fix android build

modules/objdetect/src/hog.cpp

index 4697a01..c257c80 100644 (file)
@@ -46,6 +46,7 @@
 
 #include <cstdio>
 #include <iterator>
+#include <limits>
 
 /****************************************************************************************\
       The code below is implementation of HOG (Histogram-of-Oriented Gradients)
@@ -3533,7 +3534,7 @@ void HOGDescriptor::groupRectangles(std::vector<cv::Rect>& rectList, std::vector
 
     std::vector<cv::Rect_<double> > rrects(nclasses);
     std::vector<int> numInClass(nclasses, 0);
-    std::vector<double> foundWeights(nclasses, DBL_MIN);
+    std::vector<double> foundWeights(nclasses, -std::numeric_limits<double>::max());
     int i, j, nlabels = (int)labels.size();
 
     for( i = 0; i < nlabels; i++ )