Compute stats for contours