Mixture of Gaussians (MOG) is a computer vision technique used for modeling the background pixels of an image like mixture of Gaussians of different weight that represent the pixel intensity.
Questions tagged [mog]
25 questions
19
votes
4 answers
OpenCV: how to use createBackgroundSubtractorMOG
I was trying to go through this tutorial på OpenCV.org:
http://docs.opencv.org/trunk/doc/tutorials/video/background_subtraction/background_subtraction.html#background-subtraction
The MOG pointer is initialized as
Ptr pMOG;…

Rickz0r
- 193
- 1
- 1
- 5
13
votes
4 answers
How to use cv::BackgroundSubtractorMOG in OpenCV?
I'm using OpenCV2.2 to implement moving objects detection with the method of Background Subtraction. And I use the Gaussian Mixture Model(GMM) method to model the background reference image.
I directly get the foreground pixels(or foreground mask)…

visualassit
- 133
- 1
- 1
- 5
9
votes
3 answers
Mask for BackgroundSubtractorMOG2
How can I tell BackgroundSubtractorMOG2 which pixels to update to the background model and which pixels shouldn't.
I am facing problem when there's an object entered the scene and stopped for a few ten seconds, the object will be absorbed into the…

Yaobin Then
- 2,662
- 1
- 34
- 54
5
votes
3 answers
Get background model from BackgroundSubtractorMOG2 in python
I need to get the background model of a Mixture of Gaussian with opencv. I know that there is a method called getBackgroundImage in C++ I searched if it is possible to get it in python interface but I haven't get good result. I Tried opencv…

EmanuelOverflow
- 246
- 4
- 12
3
votes
1 answer
Any tutorial/ good documentation on how to use the Mixture of Gaussians opencv implementation?
I have found OpenCV code that uses CvGaussBGStatModelParams structure, cvCreateGaussianBGModel, and other related functions. However, I haven't been able to find any explanations for how they work and how they are to be used and what they mean.
Any…

Wall-EEEEE
- 33
- 1
- 4
2
votes
1 answer
OpenCV foreground detection with adaptive background, static objects too
I have a background image of a plain surface.
My goals is to track objects that are positioned/moved over the surface.
I'm using MOG2 to find foreground objects with a learning rate of 0, so the background is not updated (otherwise a static object…

blow
- 12,811
- 24
- 75
- 112
2
votes
0 answers
MOG background subtraction: history parameter not working
I'm trying to use MOG background subtraction but the "history" function doesn't seem to work.
OpenCV 2.4.13
Python (2.7.6)
Observation: The program appears to use the very first frame it captures for all future background subtractions.
Expectation:…

chip
- 21
- 4
2
votes
2 answers
Opencv MOG and GMG subtractor not working
i have been going through opencv mog and gmg background subtraction,
i have installed opencv 3.3.0 from
https://github.com/Itseez/opencv_contrib
and also opencv from the same version,
but still i couldn't find MOG not working, where as mog 2 is…

Arvind
- 23
- 4
2
votes
1 answer
How to use BackgroundSubtractorMOG2 for images
I am pretty new to OpenCV and I am stuck at the moment. I am dealing with images, not a video. Since I will have same background in my project, I thought it would be easier to work, if I could remove my background. But first, I have to ask one…

massakrienen
- 266
- 2
- 3
- 14
1
vote
1 answer
opencv BackgroundSubtractorMOG in openframeworks
does anybody knows how to implement nowadays an opencv background subtractor like MOG or MOG2?
I tried to use ofxCvMOG2 library (https://github.com/naus3a/ofxCvMOG2) but when I run the example the error "cannot create an instance of an abstract…

rojele
- 80
- 7
1
vote
2 answers
How to disable shadow detection in MoG2
I am using C++ and Opencv 2.3.1 for background subtraction. I have tried many times to change the parameters of Mog2 in order to disable shadow detection feature also i have tried what other people suggest on the internet. however, the shadow…

Zakarya
- 492
- 1
- 6
- 14
1
vote
0 answers
How to get foreground mask given background image
Say I have a background image bg and the current frame I, how can I get the foreground mask fgmask?
Note: using the stander way fgmask = abs(bg-I) > th not giving an accurate result, lot of noise found.
I'm aware of MOG2 function in opencv but the…

Ehab AlBadawy
- 3,065
- 4
- 19
- 31
1
vote
0 answers
Background Subtraction: Creating an ensemble structure of mixture of gaussians
I want to improve the background subtraction in a video by modifying the standard MOG algorithm and creating an ensemble structure of Gaussians modeled on various features of a frame like normalized chromaticity values, spatial gradient and texture.…

aditya94
- 11
- 1
1
vote
1 answer
Mixture of Gaussians - C
Does anybody know of a good implementation of the Mixture of Gaussians (must be for C), which is able to work with OpenCV?
I know there's an undocumented implementation already included in OpenCV for C++, however this must be in C. I don't fancy…

NOP
- 864
- 1
- 12
- 26
0
votes
0 answers
Getting background after removing foreground in OpenCV background subtraction
I am using background subtraction, in particular MOG2 for video bgs with OpenCV.
I am currently getting the original frame and the foreground mask in two seperate opencv windows. I want to get a display of the background with the foreground removed.…

devman3211
- 63
- 1
- 11