I am using the GMM-algorithm (BackgroundSubtractorMOG2) to find moving objects in a video. The output of this GMM-algorithm is a binary image with white pixels as the pixels that moved, and black pixels as background. I am looking for a way to ignore novel objects entering the field-of-view as long as they are not fully in the field-of-view. Here is an example picture I created:
Here, all the white pixels represent moving pixels. The circles are fully in the field-of-view, while the 2 triangles are just about to enter the field-of-view.The left bottom triangle has nearly completely entered the field-of-view, but is still not 100% in the field-of-view. Therefore I still want the left bottom triangle to be completely erased from the frame. Does anyone know a method to deal with this problem?
Thank you