0

When using the MOG2 bacground subtractor in OpenCV I am getting results that display parts of the background in foreground segmented regions of the output. I am processing a live camera feed.

I am initialising with default paramaters and then changing the number of Gaussians to 5. For the first 100 frames when it is assumed that the scene is static, the GMM is updated with a learning rate of -1.0. After 100 frames, when movement is expected, a learning rate of 0.0 is used.

An example of the mask given with no movement is as follows:- enter image description here It can be seen that the mask is rather noisy, though that may be down to luminescence changes in the scene.

When placing my arm in front of the camera, it can be seen that the outline of my downstairs bannister is marked as background in the region that should be solidly my arm, as follows:- enter image description here

Is this the expected behaviour for the MOG2 background subtractor? Is the update and then use for prediction model that I have employed sufficient to segment moving components in a static scene? Would one expect remnants of the occluded scene to appear in the segmentation mask?

Jack H
  • 2,440
  • 4
  • 40
  • 63
  • I have used the same function but never faced this problem. I used to track moving cars. It worked fine. Are you moving your arm too fast? – Jeru Luke Jan 16 '17 at 06:55
  • No, even when moving my arm slowly there is the same effect. – Jack H Jan 16 '17 at 12:14
  • I don't know how I can help. Try the same approach over this following [video link](https://www.youtube.com/watch?v=PNCJQkvALVc) and for [this also](https://www.youtube.com/watch?v=PJ5xXXcfuTc) – Jeru Luke Jan 16 '17 at 12:39
  • I was able to obtain rectangular contours around vehicles that were moving using MOG2 background subtractor – Jeru Luke Jan 16 '17 at 12:40

0 Answers0