From 13540bf7f4d91dacf12d32d6c0864ea180593468 Mon Sep 17 00:00:00 2001 From: Matthias Grundmann Date: Fri, 24 Mar 2017 13:26:32 -0700 Subject: [PATCH] Update bgfg_gaussmix2.cpp Addressed comments. --- modules/video/src/bgfg_gaussmix2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/video/src/bgfg_gaussmix2.cpp b/modules/video/src/bgfg_gaussmix2.cpp index ad81c55eae..977a2581f3 100644 --- a/modules/video/src/bgfg_gaussmix2.cpp +++ b/modules/video/src/bgfg_gaussmix2.cpp @@ -696,7 +696,7 @@ public: // Renormalize weights. In the special case that the pixel does // not agree with any modes, set weights to zero (a new mode will be added below). float invWeight = 0.f; - if (fabs(totalWeight) > DBL_EPSILON) { + if (std::abs(totalWeight) > FLT_EPSILON) { invWeight = 1.f/totalWeight; } @@ -906,7 +906,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage_intern(OutputArray backgro break; } float invWeight = 0.f; - if (fabs(totalWeight) > DBL_EPSILON) { + if (std::abs(totalWeight) > FLT_EPSILON) { invWeight = 1.f/totalWeight; }