added centroid calculation and centroid visualization to cluster_extraction.cpp