title: OpenCV in Java: error (N >= K) using kmeans clustering
body: <p>I'm getting an error when using OpenCV's <code>kmeans</code> function in Java. Does anyone know what this means?</p>
  
  <pre><code>error: (-215) N &gt;= K in function double cv::kmeans(cv::InputArray, int, cv::InputOutputArray, cv::TermCriteria, int, int, cv::OutputArray)
  </code></pre>
  
  <p>My parameters are:</p>
  
  <pre><code>Mat labels = new Mat();
  int attempts = 3;
  Mat centers = new Mat();
  TermCriteria criteria = new TermCriteria(TermCriteria.EPS + 
      TermCriteria.MAX_ITER,100,0.1);
  clusterCount = 14;
  </code></pre>
  
  <p>and samples is a matrix with <code>26</code> rows and <code>6</code> columns, representing <code>26</code> feature vectors each of which contains <code>6</code> features.</p>
  
  <p>My function call is</p>
  
  <pre><code>Core.kmeans(samples, clusterCount, labels, criteria, attempts, Core.KMEANS_PP_CENTERS, centers );
  </code></pre>
  
  <p>In the error message, <code>K</code> is obviously the number of clusters, and one of my guesses was that <code>N</code> is the number of rows in samples? But in that case N would clearly be more than <code>K</code>.</p>
  
  <p>Hoping someone has encountered this before and knows what this means.</p>