Share

Open Computer Vision Library

Tracker: Bugs

5 cvbgfg_gaussmix.cpp: problem in background update - ID: 2367343
Last Update: Comment added ( kecsup )

Symptom:
When updating the background model (icvUpdateGaussianBGModel()), in partial
window condition, when one pixel has a value of 0, that pixel becomes 0 in
the background model and so remains forever. For the tests I used 1-channel
frames.

Cause:
The icvMatchTest() function matches the zero pixel to the first
uninitialized gaussian component whose mean value is 0 (mean is initially
set to 0 by the cvCreateGaussianBGModel() function). Afterwards
icvUpdatePartialWindow() sets to 1 the match_sum of that gaussian component
and the variance to 0 (icvUpdateFullWindow() does not so), and then
icvGetSortKey() calculates the sort key to inf (division by zero), making
that gaussian component dominant forever.

Proposed solution:
To prevent such a division by zero, the gaussian components that have never
been matched don't have to be matched in icvMatchTest(). Just put the
following test around the contents of the for-cycle inside icvMatchTest():

if( g_point->g_values[k].match_sum > 0 ) {
...
}


Adolfo Mussi ( mussiado ) - 2008-11-30 22:40

5

Closed

Fixed

kecsap

libraries(cv/cvaux/highgui)

algorithm

Public


Comments ( 2 )




Date: 2009-01-01 20:08
Sender: kecsup

Thank you very much for your bug report and patch. I have committed to svn.


Date: 2008-12-05 02:27
Sender: nobody

Xv0ofc <a href="http://pddnpijrirtl.com/">pddnpijrirtl</a>,
[url=http://mehuykdizeju.com/]mehuykdizeju[/url],
[link=http://ktjjvgilddbm.com/]ktjjvgilddbm[/link],
http://pwyfuetszobg.com/


Log in to comment.

Attached File ( 1 )

Filename Description Download
cvbgfg_gaussmix.cpp.patch Proposed patch to cvbgfg_gaussmix.cpp version 1.1pre1 Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-01-01 20:08 kecsup
resolution_id None 2009-01-01 20:08 kecsup
close_date - 2009-01-01 20:08 kecsup
assigned_to nobody 2009-01-01 20:07 kecsup
File Added 303538: cvbgfg_gaussmix.cpp.patch 2008-11-30 22:40 mussiado