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.
something like this:
at first I tried it with getting the difference absDiff()
from running average accumulateWeighted()
and the current frame but the result was not what I expected( only the edges was 1 and inside of the moving object was 0).
so I went for createBackgroundSubtractorMOG2
and createBackgroundSubtractorMOG
but this is not good either( same problem ).
is there a way to get the whole moving object?
MOG2
to crop roi and it worked! ty – Notogaea