Table of Contents

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:

  1. Compute descriptors for a given image and its key points set.
  2. Find the nearest visual words from the vocabulary for each key point descriptor.
  3. 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 Feature2D

Descriptor extractor that is used to compute descriptors for an input image and its key points.

descriptorMatcher DescriptorMatcher

Descriptor 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 IInputArray

Image, for which the descriptor is computed

keypoints VectorOfKeyPoint

Key points detected in the input image.

imgDescriptors Mat

The 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 Mat

The vocabulary