[−][src]Function cv::knn::linear_knn
pub fn linear_knn<'b, T>(
search: &T,
neighbors: &'a mut [Neighbor],
space: impl IntoIterator<Item = &'b T>
) -> &'a mut [Neighbor] where
T: 'b + MetricPoint,
Performs a linear knn search by iterating over everything in the space and performing a binary search on running set of neighbors.
search
is the feature we are searching nearest neighbors for.neighbors
is where the nearest neighbors are placed nearest to furthest.space
is all of the points we are searching.
Returns a slice of the nearest neighbors from nearest to furthest.