With findcontours and drawcontours see code below I can draw some areas black which should represent a mask like below in the images, left the original, right one with the m