trying to improve the mask image, for some error margin, check the color of the frame pixels with the background color.