Class BOWImgDescriptorExtractor
- Namespace
- Emgu.CV.Features2D
- Assembly
- Emgu.CV.dll
Class to compute an image descriptor using the bag of visual words. Such a computation consists of the following steps:
- Compute descriptors for a given image and its key points set.
- Find the nearest visual words from the vocabulary for each key point descriptor.
- Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the vocabulary in the given image.
public class BOWImgDescriptorExtractor : UnmanagedObject, IDisposable
- Inheritance
-
BOWImgDescriptorExtractor
- Implements
- Inherited Members
Constructors
BOWImgDescriptorExtractor(Feature2D, DescriptorMatcher)
Create a BOWImgDescriptorExtractor
public BOWImgDescriptorExtractor(Feature2D descriptorExtractor, DescriptorMatcher descriptorMatcher)
Parameters
descriptorExtractor
Feature2DDescriptor extractor that is used to compute descriptors for an input image and its key points.
descriptorMatcher
DescriptorMatcherDescriptor matcher that is used to find the nearest word of the trained vocabulary for each key point descriptor of the image.
Methods
Compute(IInputArray, VectorOfKeyPoint, Mat)
Computes an image descriptor using the set visual vocabulary.
public void Compute(IInputArray image, VectorOfKeyPoint keypoints, Mat imgDescriptors)
Parameters
image
IInputArrayImage, for which the descriptor is computed
keypoints
VectorOfKeyPointKey points detected in the input image.
imgDescriptors
MatThe output image descriptors.
DisposeObject()
Release all the unmanaged memory associated with this object
protected override void DisposeObject()
SetVocabulary(Mat)
Sets a visual vocabulary.
public void SetVocabulary(Mat vocabulary)
Parameters
vocabulary
MatThe vocabulary