From d5e64f4eb2bf2ad40d55a8a7e658acd138c2a140 Mon Sep 17 00:00:00 2001 From: Camille Barneaud Date: Sat, 19 Aug 2017 15:03:16 +0200 Subject: [PATCH] Avoid HOGDescriptor with sigma = 0 Solve #9307. --- modules/objdetect/src/hog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/objdetect/src/hog.cpp b/modules/objdetect/src/hog.cpp index ed78e3bf52..bf3316fb97 100644 --- a/modules/objdetect/src/hog.cpp +++ b/modules/objdetect/src/hog.cpp @@ -100,7 +100,7 @@ size_t HOGDescriptor::getDescriptorSize() const double HOGDescriptor::getWinSigma() const { - return winSigma >= 0 ? winSigma : (blockSize.width + blockSize.height)/8.; + return winSigma > 0 ? winSigma : (blockSize.width + blockSize.height)/8.; } bool HOGDescriptor::checkDetectorSize() const