contour finding and filling