I want to merge two frames of a single video into a single image based on a movement mask. I was able to align the frames (using feature matching), calculate the background (median), and estimate the movement mask (using BackgroundSubtractorMOG2) but the mask doesn’t give me the perfect movement body shape, and instead, it has “holes”. I’m using that mask to copy pixels from the source frame to the calculated background:
How can I saturate the mask to ensure that the whole body is selected?