Commit 7295dd7d authored by Matthias Grundmann's avatar Matthias Grundmann Committed by GitHub

Update bgfg_gaussmix2.cpp

1e-12 -> DBL_EPSILON
parent 0a1767a6
...@@ -696,7 +696,7 @@ public: ...@@ -696,7 +696,7 @@ public:
// Renormalize weights. In the special case that the pixel does // 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). // not agree with any modes, set weights to zero (a new mode will be added below).
float invWeight = 0.f; float invWeight = 0.f;
if (fabs(totalWeight) > 1e-12f) { if (fabs(totalWeight) > DBL_EPSILON) {
invWeight = 1.f/totalWeight; invWeight = 1.f/totalWeight;
} }
...@@ -906,7 +906,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage_intern(OutputArray backgro ...@@ -906,7 +906,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage_intern(OutputArray backgro
break; break;
} }
float invWeight = 0.f; float invWeight = 0.f;
if (fabs(totalWeight) > 1e-12f) { if (fabs(totalWeight) > DBL_EPSILON) {
invWeight = 1.f/totalWeight; invWeight = 1.f/totalWeight;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment