[opencv] 05/71: Fixed BackgroundSubstractorMOG2 in opencv_video.
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Mon Oct 17 20:16:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.1
in repository opencv.
commit 78de75397e512a3fb4b9aad677ebc4c1472fa9cc
Author: Gilles Rochefort <gilles at placemeter.com>
Date: Sun May 29 17:25:02 2016 +0200
Fixed BackgroundSubstractorMOG2 in opencv_video.
The number of gaussians involved in a mixture is supposed
to be dynamically adjusted. After being increased, the number
of gaussians can't be reduced anymore.
It seems to be a regression as the legacy code
located in modules/legacy/src/bgfg_gaussmix.cpp allows to reduce
such number of gaussians.
---
modules/video/src/bgfg_gaussmix2.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/video/src/bgfg_gaussmix2.cpp b/modules/video/src/bgfg_gaussmix2.cpp
index 9700dfe..d5eff82 100644
--- a/modules/video/src/bgfg_gaussmix2.cpp
+++ b/modules/video/src/bgfg_gaussmix2.cpp
@@ -309,7 +309,7 @@ struct MOG2Invoker : ParallelLoopBody
//internal:
bool fitsPDF = false;//if it remains zero a new GMM mode will be added
- int nmodes = modesUsed[x], nNewModes = nmodes;//current number of modes in GMM
+ int nmodes = modesUsed[x];//current number of modes in GMM
float totalWeight = 0.f;
float* mean_m = mean;
@@ -415,8 +415,6 @@ struct MOG2Invoker : ParallelLoopBody
gmm[mode].weight *= totalWeight;
}
- nmodes = nNewModes;
-
//make new mode if needed and exit
if( !fitsPDF )
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list