Skip to content

Commit 13540bf

Browse files
authored
Update bgfg_gaussmix2.cpp
Addressed comments.
1 parent 7295dd7 commit 13540bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/video/src/bgfg_gaussmix2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ class MOG2Invoker : public ParallelLoopBody
696696
// Renormalize weights. In the special case that the pixel does
697697
// not agree with any modes, set weights to zero (a new mode will be added below).
698698
float invWeight = 0.f;
699-
if (fabs(totalWeight) > DBL_EPSILON) {
699+
if (std::abs(totalWeight) > FLT_EPSILON) {
700700
invWeight = 1.f/totalWeight;
701701
}
702702

@@ -906,7 +906,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage_intern(OutputArray backgro
906906
break;
907907
}
908908
float invWeight = 0.f;
909-
if (fabs(totalWeight) > DBL_EPSILON) {
909+
if (std::abs(totalWeight) > FLT_EPSILON) {
910910
invWeight = 1.f/totalWeight;
911911
}
912912

0 commit comments

Comments
 (0)