C# Class OpenCvSharp.DescriptorMatcher

Inheritance: Algorithm
Afficher le fichier Open project: shimat/opencvsharp Class Usage Examples

Private Properties

Свойство Type Description
FromPtr DescriptorMatcher
FromRawPtr DescriptorMatcher

Méthodes publiques

Méthode Description
Add ( IEnumerable descriptors ) : void

Add descriptors to train descriptor collection.

Clear ( ) : void

Clear train descriptors collection.

Create ( string descriptorMatcherType ) : DescriptorMatcher

Create descriptor matcher by type name.

Empty ( ) : bool

Return true if there are not train descriptors in collection.

GetTrainDescriptors ( ) : OpenCvSharp.Mat[]

Get train descriptors collection.

IsMaskSupported ( ) : bool

Return true if the matcher supports mask in match methods.

KnnMatch ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, int k, OpenCvSharp.Mat mask = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]

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.

KnnMatch ( OpenCvSharp.Mat queryDescriptors, int k, OpenCvSharp.Mat masks = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]

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.

Match ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat masks = null ) : OpenCvSharp.DMatch[]

Find one best match for each query descriptor (if mask is empty).

Match ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, OpenCvSharp.Mat mask = null ) : OpenCvSharp.DMatch[]

Find one best match for each query descriptor (if mask is empty).

RadiusMatch ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, float maxDistance, OpenCvSharp.Mat mask = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]

Find best matches for each query descriptor which have distance less than maxDistance (in increasing order of distances).

RadiusMatch ( OpenCvSharp.Mat queryDescriptors, float maxDistance, OpenCvSharp.Mat masks = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]

Find best matches for each query descriptor which have distance less than maxDistance (in increasing order of distances).

Train ( ) : void

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).

Méthodes protégées

Méthode Description
DescriptorMatcher ( ) : System

Dispose ( bool disposing ) : void

Releases the resources

Private Methods

Méthode Description
FromPtr ( IntPtr ptr ) : DescriptorMatcher

Creates instance from cv::Ptr<T> . ptr is disposed when the wrapper disposes.

FromRawPtr ( IntPtr ptr ) : DescriptorMatcher

Creates instance from raw pointer T*

Method Details

Add() public méthode

Add descriptors to train descriptor collection.
public Add ( IEnumerable descriptors ) : void
descriptors IEnumerable Descriptors to add. Each descriptors[i] is a descriptors set from one image.
Résultat void

Clear() public méthode

Clear train descriptors collection.
public Clear ( ) : void
Résultat void

Create() public static méthode

Create descriptor matcher by type name.
public static Create ( string descriptorMatcherType ) : DescriptorMatcher
descriptorMatcherType string
Résultat DescriptorMatcher

DescriptorMatcher() protected méthode

protected DescriptorMatcher ( ) : System
Résultat System

Dispose() protected méthode

Releases the resources
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
Résultat void

Empty() public méthode

Return true if there are not train descriptors in collection.
public Empty ( ) : bool
Résultat bool

GetTrainDescriptors() public méthode

Get train descriptors collection.
public GetTrainDescriptors ( ) : OpenCvSharp.Mat[]
Résultat OpenCvSharp.Mat[]

IsMaskSupported() public méthode

Return true if the matcher supports mask in match methods.
public IsMaskSupported ( ) : bool
Résultat bool

KnnMatch() public méthode

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.
public KnnMatch ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, int k, OpenCvSharp.Mat mask = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]
queryDescriptors OpenCvSharp.Mat
trainDescriptors OpenCvSharp.Mat
k int
mask OpenCvSharp.Mat
compactResult bool
Résultat OpenCvSharp.DMatch[][]

KnnMatch() public méthode

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.
public KnnMatch ( OpenCvSharp.Mat queryDescriptors, int k, OpenCvSharp.Mat masks = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]
queryDescriptors OpenCvSharp.Mat
k int
masks OpenCvSharp.Mat
compactResult bool
Résultat OpenCvSharp.DMatch[][]

Match() public méthode

Find one best match for each query descriptor (if mask is empty).
public Match ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat masks = null ) : OpenCvSharp.DMatch[]
queryDescriptors OpenCvSharp.Mat
masks OpenCvSharp.Mat
Résultat OpenCvSharp.DMatch[]

Match() public méthode

Find one best match for each query descriptor (if mask is empty).
public Match ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, OpenCvSharp.Mat mask = null ) : OpenCvSharp.DMatch[]
queryDescriptors OpenCvSharp.Mat
trainDescriptors OpenCvSharp.Mat
mask OpenCvSharp.Mat
Résultat OpenCvSharp.DMatch[]

RadiusMatch() public méthode

Find best matches for each query descriptor which have distance less than maxDistance (in increasing order of distances).
public RadiusMatch ( OpenCvSharp.Mat queryDescriptors, OpenCvSharp.Mat trainDescriptors, float maxDistance, OpenCvSharp.Mat mask = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]
queryDescriptors OpenCvSharp.Mat
trainDescriptors OpenCvSharp.Mat
maxDistance float
mask OpenCvSharp.Mat
compactResult bool
Résultat OpenCvSharp.DMatch[][]

RadiusMatch() public méthode

Find best matches for each query descriptor which have distance less than maxDistance (in increasing order of distances).
public RadiusMatch ( OpenCvSharp.Mat queryDescriptors, float maxDistance, OpenCvSharp.Mat masks = null, bool compactResult = false ) : OpenCvSharp.DMatch[][]
queryDescriptors OpenCvSharp.Mat
maxDistance float
masks OpenCvSharp.Mat
compactResult bool
Résultat OpenCvSharp.DMatch[][]

Train() public méthode

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 Train ( ) : void
Résultat void