title: KMeans implementation in OpenCV 2
body: <p>I am trying to implement kmeans in OpenCV 2.3.1 to find the centers of clusters. I have a color thresholded, binary image stored in convertedImg and want to find the coordinates of the centers of each of the four clusters.</p>
  
  <p>kmeans(convertedImg, 4, labels, TermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER, 10, 1.0), 10, KMEANS_PP_CENTERS, centers);</p>
  
  <p>I am not sure how to get the coordinates of the centers from the OutputArray centers, which appears to be a Mat that is 4 x 320. Thanks in advance for the help!</p>