1 | initial version |
BackGroundSubractor is usually used for video because it learns gradually through time what belongs to background and what doesn't. If you have few background images with different illumination than image with people in foreground, there will all belong to foreground when BackGroundSubractorMOG is run. You should have in mind that GMM Background Subractor is not illumination invariant. You could ran some background images just before new people show up, so you want have false alarms. Also keep in mind that BackGroundSubractorMOG needs some time to adopt background, you can manage it with learning ratio (Alpha):
static const int defaultHistory2 = 500;
Larger defaultHistory2 -> slower it updates to background. But i advise you to use set of images with difference not larger than few seconds, couse you will have a lot of noise in your foreground mask.
2 | No.2 Revision |
BackGroundSubractor is usually used for video because it learns gradually through time what belongs to background and what doesn't. If you have few background images with different illumination than image with people in foreground, there they will all belong to foreground when BackGroundSubractorMOG is run. You should have in mind that GMM Background Subractor is not illumination invariant.
You could ran some background images just before new people show up, so you want have false alarms. Also keep in mind that BackGroundSubractorMOG needs some time to adopt background, you can manage it with learning ratio (Alpha):
static const int defaultHistory2 = 500;
Larger defaultHistory2 -> slower it updates to background. But i advise you to use set of images with difference not larger than few seconds, couse you will have a lot of noise in your foreground mask.
3 | No.3 Revision |
BackGroundSubractor is usually used for video because it learns gradually through time what belongs to background and what doesn't. If you have few background images with different illumination than image with people in foreground, on which you want to detect people, they will all belong to foreground when BackGroundSubractorMOG is run. You should have in mind that GMM Background Subractor is not illumination invariant.
You could ran some background images just before new people show up, so you want have false alarms. Also keep in mind that BackGroundSubractorMOG needs some time to adopt background, you can manage it with learning ratio (Alpha):
static const int defaultHistory2 = 500;
Larger defaultHistory2 -> slower it updates to background. But i advise you to use set of images with difference not larger than few seconds, couse you will have a lot of noise in your foreground mask.
4 | No.4 Revision |
BackGroundSubractor is usually used for video because it learns gradually through time what belongs to background and what doesn't. If you have few background images with different illumination than image on which you want to detect people, they will all belong to foreground when BackGroundSubractorMOG is run. You should have in mind that GMM Background Subractor is not illumination invariant. You could ran some background images just before new people show up, so you want have false alarms. Also keep in mind that BackGroundSubractorMOG needs some time to adopt background, you can manage it with learning ratio (Alpha):
static const int defaultHistory2 = 500;
Larger defaultHistory2 -> slower it updates to background. But i advise you to use set of images with difference not larger than few seconds, couse you will have a lot of noise in your foreground mask.
To sum it up: