title: Single link clustering
body: <p>I'm looking for a way to do single link clustering with OpenCV.  My scenario:</p>
  
  <ul>
  <li>Hundreds (potentially thousands) of feature vectors (vectors dimension can be up to ~800 features).</li>
  <li>Unknown number of clusters (likely to be much lower than the number of vectors).</li>
  <li>Fixed similarity threshold <code>E</code> - if the l1 norm between two vectors is less than <code>E</code>, then the vectors should be in the same cluster.</li>
  <li>I don't need a cluster to be compact.  That is, I don't need all the vectors in the cluster to be within <code>E</code> of each other.  This can lead to long "chains" instead of clusters, but I'm OK with this.</li>
  </ul>
  
  <p>I tried using K-means, but because I don't know the number of clusters it's not really applicable here.  I could do iterative K-means and look for the best K, but it sounds inefficient.  Is there a more suitable clustering algorithm implemented in OpenCV that I could use here?</p>
  
  <p>Ideally, I need something similar to the <a href="http://www.cs.gsu.edu/~wkim/index_files/papers/sibson.pdf" rel="nofollow">SLINK algorithm</a>, as this is what is quoted in the paper that I'm currently trying to implement.  My options are to implement SLINK directly (a bit of a task, because of debugging &amp; testing) or look for an existing algorithm that does something similar.</p>
  
  <p>Any suggestions?</p>