A fast convex hull algorithm for binary image