How to find centroid for each cluster of points


how can I find the centroid of each cluster of leds ? Instead of individual centorid of leds ?