Change all the center to centroid

And start weighed contour error develop