Class Feature2D
Abstract base class for 2D image feature detectors and descriptor extractors
Inheritance
Implements
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class Feature2D : Algorithm, ICvPtrHolder
Constructors
| Improve this Doc View SourceFeature2D()
Declaration
protected Feature2D()
Properties
| Improve this Doc View SourceDefaultNorm
Declaration
public virtual int DefaultNorm { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DescriptorSize
Declaration
public virtual int DescriptorSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DescriptorType
Declaration
public virtual int DescriptorType { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceCompute(IEnumerable<Mat>, ref KeyPoint[][], IEnumerable<Mat>)
Compute the descriptors for a keypoints collection detected in image collection.
Declaration
public virtual void Compute(IEnumerable<Mat> images, ref KeyPoint[][] keypoints, IEnumerable<Mat> descriptors)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Mat> | images | Image collection. |
OpenCvSharp.KeyPoint[][] | keypoints | Input keypoints collection. keypoints[i] is keypoints detected in images[i]. Keypoints for which a descriptor cannot be computed are removed. |
IEnumerable<Mat> | descriptors | Descriptor collection. descriptors[i] are descriptors computed for set keypoints[i]. |
Compute(InputArray, ref KeyPoint[], OutputArray)
Compute the descriptors for a set of keypoints in an image.
Declaration
public virtual void Compute(InputArray image, ref KeyPoint[] keypoints, OutputArray descriptors)
Parameters
Type | Name | Description |
---|---|---|
InputArray | image | The image. |
OpenCvSharp.KeyPoint[] | keypoints | The input keypoints. Keypoints for which a descriptor cannot be computed are removed. |
OutputArray | descriptors | Computed descriptors. Row i is the descriptor for KeyPoint i. |
Detect(IEnumerable<Mat>, Nullable<IEnumerable<Mat>>)
Detect keypoints in an image set.
Declaration
public KeyPoint[][] Detect(IEnumerable<Mat> images, IEnumerable<Mat>? masks = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Mat> | images | Image collection. |
System.Nullable<IEnumerable<Mat>> | masks | Masks for image set. masks[i] is a mask for images[i]. |
Returns
Type | Description |
---|---|
OpenCvSharp.KeyPoint[][] | Collection of keypoints detected in an input images. keypoints[i] is a set of keypoints detected in an images[i]. |
Detect(InputArray, Mat)
Detect keypoints in an image.
Declaration
public KeyPoint[] Detect(InputArray image, Mat mask = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | image | The image. |
Mat | mask | Mask specifying where to look for keypoints (optional). Must be a char matrix with non-zero values in the region of interest. |
Returns
Type | Description |
---|---|
OpenCvSharp.KeyPoint[] | The detected keypoints. |
Detect(Mat, Mat)
Detect keypoints in an image.
Declaration
public KeyPoint[] Detect(Mat image, Mat mask = null)
Parameters
Type | Name | Description |
---|---|---|
Mat | image | The image. |
Mat | mask | Mask specifying where to look for keypoints (optional). Must be a char matrix with non-zero values in the region of interest. |
Returns
Type | Description |
---|---|
OpenCvSharp.KeyPoint[] | The detected keypoints. |
DetectAndCompute(InputArray, InputArray, out KeyPoint[], OutputArray, Boolean)
Detects keypoints and computes the descriptors
Declaration
public virtual void DetectAndCompute(InputArray image, InputArray mask, out KeyPoint[] keypoints, OutputArray descriptors, bool useProvidedKeypoints = false)
Parameters
Type | Name | Description |
---|---|---|
InputArray | image | |
InputArray | mask | |
OpenCvSharp.KeyPoint[] | keypoints | |
OutputArray | descriptors | |
System.Boolean | useProvidedKeypoints |
Empty()
Return true if detector object is empty
Declaration
public virtual bool Empty()
Returns
Type | Description |
---|---|
System.Boolean |
GetDefaultName()
Declaration
public override string GetDefaultName()
Returns
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceRead(String)
Declaration
public void Read(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
Write(String)
Declaration
public void Write(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |