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.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.2.1.1150 (2.2.1.1150)
Syntax
C# | Visual Basic | Visual C++ |
Public Sub FindFeatures ( _ descriptors As Single()(), _ <OutAttribute> ByRef results As Matrix(Of Integer), _ <OutAttribute> ByRef dist As Matrix(Of Double), _ k As Integer, _ emax As Integer _ )
public: void FindFeatures( array<array<float>^>^ descriptors, [OutAttribute] Matrix<int>^% results, [OutAttribute] Matrix<double>^% dist, int k, int emax )
Parameters
- descriptors
- array<array<Single>[]()[][]>[]()[][]
The m feature descriptors to be searched from the feature tree
- results
- 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.
- k
- Int32
The number of neighbors to find
- emax
- Int32
For k-d tree only: the maximum number of leaves to visit. Use 20 if not sure