Table of Contents

Class Feature2D

Namespace
Emgu.CV.Features2D
Assembly
Emgu.CV.dll

The feature 2D base class

public abstract class Feature2D : SharedPtrObject, IDisposable, IAlgorithm
Inheritance
Feature2D
Implements
Derived
Inherited Members
Extension Methods

Constructors

Feature2D()

protected Feature2D()

Fields

_feature2D

The pointer to the Feature2D object

protected nint _feature2D

Field Value

nint

Properties

DescriptorSize

Get the number of elements in the descriptor.

public int DescriptorSize { get; }

Property Value

int

The number of elements in the descriptor

Feature2DPtr

Get the pointer to the Feature2D object

public nint Feature2DPtr { get; }

Property Value

nint

The pointer to the Feature2D object

Methods

Compute(IInputArray, VectorOfKeyPoint, IOutputArray)

Compute the descriptors on the image from the given keypoint locations.

public void Compute(IInputArray image, VectorOfKeyPoint keyPoints, IOutputArray descriptors)

Parameters

image IInputArray

The image to compute descriptors from

keyPoints VectorOfKeyPoint

The keypoints where the descriptor computation is perfromed

descriptors IOutputArray

The descriptors from the given keypoints

Detect(IInputArray, IInputArray)

Detect the keypoints from the image

public MKeyPoint[] Detect(IInputArray image, IInputArray mask = null)

Parameters

image IInputArray

The image to extract keypoints from

mask IInputArray

The optional mask.

Returns

MKeyPoint[]

An array of key points

DetectAndCompute(IInputArray, IInputArray, VectorOfKeyPoint, IOutputArray, bool)

Detect keypoints in an image and compute the descriptors on the image from the keypoint locations.

public void DetectAndCompute(IInputArray image, IInputArray mask, VectorOfKeyPoint keyPoints, IOutputArray descriptors, bool useProvidedKeyPoints)

Parameters

image IInputArray

The image

mask IInputArray

The optional mask, can be null if not needed

keyPoints VectorOfKeyPoint

The detected keypoints will be stored in this vector

descriptors IOutputArray

The descriptors from the keypoints

useProvidedKeyPoints bool

If true, the method will skip the detection phase and will compute descriptors for the provided keypoints

DetectRaw(IInputArray, VectorOfKeyPoint, IInputArray)

Detect the features in the image

public void DetectRaw(IInputArray image, VectorOfKeyPoint keypoints, IInputArray mask = null)

Parameters

image IInputArray

The image from which the features will be detected from

keypoints VectorOfKeyPoint

The result vector of keypoints

mask IInputArray

The optional mask.

DisposeObject()

Reset the pointers

protected override void DisposeObject()