Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
View all activity pages
You might try looking at the k-means function in opencv for Python or C. Additionally, the k-means function in Matlab may be useful as well. To further clarify, I believe OP would describe the center ...