Added a function floodFill. I also changed all the instances of findContours to use mode=cv.RETR_TREE instead of mode=cv.RETR_LIST to correctly account for the 'holes'