cleaned up code, now have functions to get contours as well as centroids