C# Class OpenCvSharp.BOWImgDescriptorExtractor

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.
Inheritance: OpenCvSharp.DisposableCvObject
ファイルを表示 Open project: shimat/opencvsharp

Public Methods

Method Description
BOWImgDescriptorExtractor ( DescriptorMatcher dmatcher ) : System

The constructor.

BOWImgDescriptorExtractor ( Feature2D dextractor, DescriptorMatcher dmatcher ) : System

The constructor.

Compute ( InputArray image, KeyPoint &keypoints, OutputArray imgDescriptor, int &pointIdxsOfClusters, OpenCvSharp.Mat descriptors = null ) : void

Computes an image descriptor using the set visual vocabulary.

Compute ( InputArray keypointDescriptors, OutputArray imgDescriptor, int &pointIdxsOfClusters ) : void

Computes an image descriptor using the set visual vocabulary.

Compute2 ( OpenCvSharp.Mat image, KeyPoint &keypoints, OpenCvSharp.Mat imgDescriptor ) : void

Computes an image descriptor using the set visual vocabulary.

DescriptorSize ( ) : int

Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.

DescriptorType ( ) : int

Returns an image descriptor type.

GetVocabulary ( ) : OpenCvSharp.Mat

Returns the set vocabulary.

SetVocabulary ( OpenCvSharp.Mat vocabulary ) : void

Sets a visual vocabulary.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the resources

Method Details

BOWImgDescriptorExtractor() public method

The constructor.
public BOWImgDescriptorExtractor ( DescriptorMatcher dmatcher ) : System
dmatcher DescriptorMatcher Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image.
return System

BOWImgDescriptorExtractor() public method

The constructor.
public BOWImgDescriptorExtractor ( Feature2D dextractor, DescriptorMatcher dmatcher ) : System
dextractor Feature2D Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
dmatcher DescriptorMatcher Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image.
return System

Compute() public method

Computes an image descriptor using the set visual vocabulary.
public Compute ( InputArray image, KeyPoint &keypoints, OutputArray imgDescriptor, int &pointIdxsOfClusters, OpenCvSharp.Mat descriptors = null ) : void
image InputArray Image, for which the descriptor is computed.
keypoints KeyPoint Keypoints detected in the input image.
imgDescriptor OutputArray Computed output image descriptor.
pointIdxsOfClusters int pointIdxsOfClusters Indices of keypoints that belong to the cluster. /// This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster(word of vocabulary) returned if it is non-zero.
descriptors OpenCvSharp.Mat Descriptors of the image keypoints that are returned if they are non-zero.
return void

Compute() public method

Computes an image descriptor using the set visual vocabulary.
public Compute ( InputArray keypointDescriptors, OutputArray imgDescriptor, int &pointIdxsOfClusters ) : void
keypointDescriptors InputArray Computed descriptors to match with vocabulary.
imgDescriptor OutputArray Computed output image descriptor.
pointIdxsOfClusters int Indices of keypoints that belong to the cluster. /// This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster(word of vocabulary) returned if it is non-zero.
return void

Compute2() public method

Computes an image descriptor using the set visual vocabulary.
public Compute2 ( OpenCvSharp.Mat image, KeyPoint &keypoints, OpenCvSharp.Mat imgDescriptor ) : void
image OpenCvSharp.Mat Image, for which the descriptor is computed.
keypoints KeyPoint Keypoints detected in the input image.
imgDescriptor OpenCvSharp.Mat Computed output image descriptor.
return void

DescriptorSize() public method

Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.
public DescriptorSize ( ) : int
return int

DescriptorType() public method

Returns an image descriptor type.
public DescriptorType ( ) : int
return int

Dispose() protected method

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. ///
return void

GetVocabulary() public method

Returns the set vocabulary.
public GetVocabulary ( ) : OpenCvSharp.Mat
return OpenCvSharp.Mat

SetVocabulary() public method

Sets a visual vocabulary.
public SetVocabulary ( OpenCvSharp.Mat vocabulary ) : void
vocabulary OpenCvSharp.Mat Vocabulary (can be trained using the inheritor of BOWTrainer ). /// Each row of the vocabulary is a visual word(cluster center).
return void