Class DescriptorMatcher
Inheritance
System.Object
DescriptorMatcher
Assembly: OpenCvSharp.dll
Syntax
public class DescriptorMatcher : Algorithm, ICvPtrHolder
Constructors
|
Improve this Doc
View Source
DescriptorMatcher()
Declaration
protected DescriptorMatcher()
Methods
|
Improve this Doc
View Source
Add(IEnumerable<Mat>)
Add descriptors to train descriptor collection.
Declaration
public virtual void Add(IEnumerable<Mat> descriptors)
Parameters
Type |
Name |
Description |
IEnumerable<Mat> |
descriptors |
Descriptors to add. Each descriptors[i] is a descriptors set from one image.
|
|
Improve this Doc
View Source
Clear()
Clear train descriptors collection.
Declaration
public virtual void Clear()
|
Improve this Doc
View Source
Create(String)
Create descriptor matcher by type name.
Declaration
public static DescriptorMatcher Create(string descriptorMatcherType)
Parameters
Type |
Name |
Description |
System.String |
descriptorMatcherType |
|
Returns
|
Improve this Doc
View Source
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
|
Improve this Doc
View Source
Empty()
Return true if there are not train descriptors in collection.
Declaration
public virtual bool Empty()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetTrainDescriptors()
Get train descriptors collection.
Declaration
public Mat[] GetTrainDescriptors()
Returns
|
Improve this Doc
View Source
IsMaskSupported()
Return true if the matcher supports mask in match methods.
Declaration
public virtual bool IsMaskSupported()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
KnnMatch(Mat, Mat, Int32, Mat, Boolean)
Find k best matches for each query descriptor (in increasing order of distances).
compactResult is used when mask is not empty. If compactResult is false matches
vector will have the same size as queryDescriptors rows. If compactResult is true
matches vector will not contain matches for fully masked out query descriptors.
Declaration
public DMatch[][] KnnMatch(Mat queryDescriptors, Mat trainDescriptors, int k, Mat mask = null, bool compactResult = false)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
Mat |
trainDescriptors |
|
System.Int32 |
k |
|
Mat |
mask |
|
System.Boolean |
compactResult |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[][] |
|
|
Improve this Doc
View Source
KnnMatch(Mat, Int32, Mat[], Boolean)
Find k best matches for each query descriptor (in increasing order of distances).
compactResult is used when mask is not empty. If compactResult is false matches
vector will have the same size as queryDescriptors rows. If compactResult is true
matches vector will not contain matches for fully masked out query descriptors.
Declaration
public DMatch[][] KnnMatch(Mat queryDescriptors, int k, Mat[] masks = null, bool compactResult = false)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
System.Int32 |
k |
|
Mat[] |
masks |
|
System.Boolean |
compactResult |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[][] |
|
|
Improve this Doc
View Source
Match(Mat, Mat, Mat)
Find one best match for each query descriptor (if mask is empty).
Declaration
public DMatch[] Match(Mat queryDescriptors, Mat trainDescriptors, Mat mask = null)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
Mat |
trainDescriptors |
|
Mat |
mask |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[] |
|
|
Improve this Doc
View Source
Match(Mat, Mat[])
Find one best match for each query descriptor (if mask is empty).
Declaration
public DMatch[] Match(Mat queryDescriptors, Mat[] masks = null)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
Mat[] |
masks |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[] |
|
|
Improve this Doc
View Source
RadiusMatch(Mat, Mat, Single, Mat, Boolean)
Find best matches for each query descriptor which have distance less than
maxDistance (in increasing order of distances).
Declaration
public DMatch[][] RadiusMatch(Mat queryDescriptors, Mat trainDescriptors, float maxDistance, Mat mask = null, bool compactResult = false)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
Mat |
trainDescriptors |
|
System.Single |
maxDistance |
|
Mat |
mask |
|
System.Boolean |
compactResult |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[][] |
|
|
Improve this Doc
View Source
RadiusMatch(Mat, Single, Mat[], Boolean)
Find best matches for each query descriptor which have distance less than
maxDistance (in increasing order of distances).
Declaration
public DMatch[][] RadiusMatch(Mat queryDescriptors, float maxDistance, Mat[] masks = null, bool compactResult = false)
Parameters
Type |
Name |
Description |
Mat |
queryDescriptors |
|
System.Single |
maxDistance |
|
Mat[] |
masks |
|
System.Boolean |
compactResult |
|
Returns
Type |
Description |
OpenCvSharp.DMatch[][] |
|
|
Improve this Doc
View Source
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).
Declaration
public virtual void Train()
Implements