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
Namespace:
Emgu.CV
Assembly:
Emgu.CV (in Emgu.CV.dll) Version: 2.0.1.0 (2.0.1.0)
Syntax
Parameters
- descriptors
- Type: array<
array<
System..::.Single
>[]()[]
>[]()[]
The m feature descriptors to be searched from the feature tree
- results
- Type:
Emgu.CV..::.Matrix<(Of <(Int32>)>)
%
The results of the best k matched from the feature tree. A m x k matrix. Contains -1 in some columns if fewer than k neighbors found.
For each row the k neareast neighbors are not sorted. To findout the closet neighbour, look at the output matrix dist.
- dist
- Type:
Emgu.CV..::.Matrix<(Of <(Double>)>)
%
A m x k matrix of the distances to k nearest neighbors
- k
- Type: System..::.Int32
The number of neighbors to find
- emax
- Type: System..::.Int32
For k-d tree only: the maximum number of leaves to visit. Use 20 if not sure
See Also