Finds (with high probability) the k nearest neighbors in tr for each of the given (row-)vectors in desc, using best-bin-first searching ([Beis97]). The complexity of the entire operation is at most O(m*emax*log2(n)), where n is the number of vectors in the tree


- tr (IntPtr)
- Pointer to kd-tree index of reference vectors
- desc (IntPtr)
- m x d matrix of (row-)vectors to find the nearest neighbors of
- results (IntPtr)
- m x k set of row indices of matching vectors (referring to matrix passed to cvCreateFeatureTree). Contains -1 in some columns if fewer than k neighbors found
- dist (IntPtr)
- m x k matrix of distances to k nearest neighbors
- k (Int32)
- The number of neighbors to find
- emax (Int32)
- The maximum number of leaves to visit