added changes to measure centroid and hu moments