Class Feature2D
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Abstract base class for 2D image feature detectors and descriptor extractors
public class Feature2D : Algorithm, IDisposable, ICvPtrHolder
- Inheritance
-
Feature2D
- Implements
- Derived
- Inherited Members
Constructors
Feature2D()
protected Feature2D()
Properties
DefaultNorm
public virtual int DefaultNorm { get; }
Property Value
DescriptorSize
public virtual int DescriptorSize { get; }
Property Value
DescriptorType
public virtual int DescriptorType { get; }
Property Value
Methods
Compute(InputArray, ref KeyPoint[], OutputArray)
Compute the descriptors for a set of keypoints in an image.
public virtual void Compute(InputArray image, ref KeyPoint[] keypoints, OutputArray descriptors)
Parameters
imageInputArrayThe image.
keypointsKeyPoint[]The input keypoints. Keypoints for which a descriptor cannot be computed are removed.
descriptorsOutputArrayComputed descriptors. Row i is the descriptor for KeyPoint i.
Compute(IEnumerable<Mat>, ref KeyPoint[][], IEnumerable<Mat>)
Compute the descriptors for a keypoints collection detected in image collection.
public virtual void Compute(IEnumerable<Mat> images, ref KeyPoint[][] keypoints, IEnumerable<Mat> descriptors)
Parameters
imagesIEnumerable<Mat>Image collection.
keypointsKeyPoint[][]Input keypoints collection. keypoints[i] is keypoints detected in images[i]. Keypoints for which a descriptor cannot be computed are removed.
descriptorsIEnumerable<Mat>Descriptor collection. descriptors[i] are descriptors computed for set keypoints[i].
Detect(InputArray, Mat?)
Detect keypoints in an image.
public KeyPoint[] Detect(InputArray image, Mat? mask = null)
Parameters
imageInputArrayThe image.
maskMatMask specifying where to look for keypoints (optional). Must be a char matrix with non-zero values in the region of interest.
Returns
- KeyPoint[]
The detected keypoints.
Detect(Mat, Mat?)
Detect keypoints in an image.
public KeyPoint[] Detect(Mat image, Mat? mask = null)
Parameters
imageMatThe image.
maskMatMask specifying where to look for keypoints (optional). Must be a char matrix with non-zero values in the region of interest.
Returns
- KeyPoint[]
The detected keypoints.
Detect(IEnumerable<Mat>, IEnumerable<Mat>?)
Detect keypoints in an image set.
public KeyPoint[][] Detect(IEnumerable<Mat> images, IEnumerable<Mat>? masks = null)
Parameters
imagesIEnumerable<Mat>Image collection.
masksIEnumerable<Mat>Masks for image set. masks[i] is a mask for images[i].
Returns
- KeyPoint[][]
Collection of keypoints detected in an input images. keypoints[i] is a set of keypoints detected in an images[i].
DetectAndCompute(InputArray, InputArray?, out KeyPoint[], OutputArray, bool)
Detects keypoints and computes the descriptors
public virtual void DetectAndCompute(InputArray image, InputArray? mask, out KeyPoint[] keypoints, OutputArray descriptors, bool useProvidedKeypoints = false)
Parameters
imageInputArraymaskInputArraykeypointsKeyPoint[]descriptorsOutputArrayuseProvidedKeypointsbool
Empty()
Return true if detector object is empty
public virtual bool Empty()
Returns
GetDefaultName()
public override string GetDefaultName()
Returns
Read(string)
public void Read(string fileName)
Parameters
fileNamestring
Write(string)
public void Write(string fileName)
Parameters
fileNamestring