Class FlannBasedMatcher
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one.
public class FlannBasedMatcher : DescriptorMatcher, IDisposable, ICvPtrHolder
- Inheritance
-
FlannBasedMatcher
- Implements
- Inherited Members
Constructors
FlannBasedMatcher(IndexParams?, SearchParams?)
public FlannBasedMatcher(IndexParams? indexParams = null, SearchParams? searchParams = null)
Parameters
indexParamsIndexParamssearchParamsSearchParams
Methods
Add(IEnumerable<Mat>)
Add descriptors to train descriptor collection.
public override void Add(IEnumerable<Mat> descriptors)
Parameters
descriptorsIEnumerable<Mat>Descriptors to add. Each descriptors[i] is a descriptors set from one image.
Clear()
Clear train descriptors collection.
public override void Clear()
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()
DisposeUnmanaged()
Releases managed resources
protected override void DisposeUnmanaged()
IsMaskSupported()
Return true if the matcher supports mask in match methods.
public override bool IsMaskSupported()
Returns
Train()
Train matcher (e.g. train flann index). In all methods to match the method train() is run every time before matching. Some descriptor matchers (e.g. BruteForceMatcher) have empty implementation of this method, other matchers really train their inner structures (e.g. FlannBasedMatcher trains flann::Index). So nonempty implementation of train() should check the class object state and do traing/retraining only if the state requires that (e.g. FlannBasedMatcher trains flann::Index if it has not trained yet or if new descriptors have been added to the train collection).
public override void Train()