提交 13540bf7 编写于 作者: M Matthias Grundmann 提交者: GitHub

Update bgfg_gaussmix2.cpp

Addressed comments.
上级 7295dd7d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册