Table of Contents

Class Index

Namespace
Emgu.CV.Flann
Assembly
Emgu.CV.dll

Flann index

public class Index : UnmanagedObject, IDisposable
Inheritance
Index
Implements
Inherited Members

Constructors

Index(IInputArray, IIndexParams, DistType)

Create a flann index

public Index(IInputArray values, IIndexParams ip, DistType distType = DistType.Euclidean)

Parameters

values IInputArray

A row by row matrix of descriptors

ip IIndexParams

The index parameter

distType DistType

The distance type

Methods

DisposeObject()

Release the unmanaged memory associated with this Flann Index

protected override void DisposeObject()

KnnSearch(IInputArray, IOutputArray, IOutputArray, int, int, float, bool)

Perform k-nearest-neighbours (KNN) search

public void KnnSearch(IInputArray queries, IOutputArray indices, IOutputArray squareDistances, int knn, int checks = 32, float eps = 0, bool sorted = true)

Parameters

queries IInputArray

A row by row matrix of descriptors to be query for nearest neighbours

indices IOutputArray

The result of the indices of the k-nearest neighbours

squareDistances IOutputArray

The square of the Eculidean distance between the neighbours

knn int

Number of nearest neighbors to search for

checks int

The number of times the tree(s) in the index should be recursively traversed. A higher value for this parameter would give better search precision, but also take more time. If automatic configuration was used when the index was created, the number of checks required to achieve the specified precision was also computed, in which case this parameter is ignored

eps float

The search epsilon

sorted bool

If set to true, the search result is sorted

RadiusSearch(IInputArray, IOutputArray, IOutputArray, double, int, int, float, bool)

Performs a radius nearest neighbor search for multiple query points

public int RadiusSearch(IInputArray queries, IOutputArray indices, IOutputArray squareDistances, double radius, int maxResults, int checks = 32, float eps = 0, bool sorted = true)

Parameters

queries IInputArray

The query points, one per row

indices IOutputArray

Indices of the nearest neighbors found

squareDistances IOutputArray

The square of the Eculidean distance between the neighbours

radius double

The search radius

maxResults int

The maximum number of results

checks int

The number of times the tree(s) in the index should be recursively traversed. A higher value for this parameter would give better search precision, but also take more time. If automatic configuration was used when the index was created, the number of checks required to achieve the specified precision was also computed, in which case this parameter is ignored

eps float

The search epsilon

sorted bool

If set to true, the search result is sorted

Returns

int

The number of points in the search radius