title: Remove background and noise from image
body: <p>Im trying to remove the background from a video and get a binary images( or 8-bit) where value of the object that moves is 1 and static background is 0.</p>
  
  <p>something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/IqSCD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IqSCD.png" alt="enter image description here"></a></p>
  
  <p>at first I tried it with getting the difference <code>absDiff()</code> <strong>from running average</strong> <code>accumulateWeighted()</code> <strong>and the current frame</strong> but the result was not what I expected( only the edges was 1 and inside of the moving object was 0).</p>
  
  <p>so I went for <code>createBackgroundSubtractorMOG2</code> and <code>createBackgroundSubtractorMOG</code> but this is not good either( same problem  ).</p>
  
  <p>is there a way to get the whole moving object?</p>