erode added to improve contour detection in a butterfly binary mask