Getting background after removing foreground in OpenCV background subtraction

386 views Asked by At

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. I am not able to find anywhere on how to do this. I can only find out how to extract the foreground from the background.

For example I have this as the original frame enter image description here

This is my foreground mask enter image description here

I want to attempt to display something like this: enter image description here

Is this possible to do with just OpenCV?

Can I cut out the masks and then convert back to RGB? My end goal is to inpaint the white mask blobs.

0

There are 0 answers