Queries with opencv background substraction BackgroundSubtractorMOG2

asked 2018-07-06 16:57:11 -0500

Kafan gravatar image

I am using opencv BackgroundSubtractorMOG2 for background image substraction, for one of my project and I have few doubts as below. Please try to answer them. Thanks in advance.

I want the background model to update slowly i.e. something should not become part of the background model too soon (should take around 500 images) to be considered as part of background. I believe history =500, should take care of that. But then there is a learning rate in the apply which takes value between 0 and 1.

a) How does learning rate impact the updating of background model and what is the relation between history and leaning rate, when both apparently impact background model updation in quite similar way?

b) Does increasing history and learning rate parameter to higher increase memory footprint required for the model? As probably it keeps more past data.

c) I want the model to be more sensitive while extracting foreground model. Currently now, sometime even foreground gets detected as background, when the pixel are similar for foreground and background. Currently varThreshold = 16. Should I decrease this or increase this, to make it more sensitive even to slight difference in pixel values, when a image is being compared tp background model for foreground extraction.

edit retag flag offensive close merge delete

Comments

bump!!!!!!

Kafan gravatar imageKafan ( 2018-07-09 07:48:26 -0500 )edit