Finding external contours

a picture and code to run on it would be helpful for this discussion