Class DAISY
- Namespace
- OpenCvSharp.XFeatures2D
- Assembly
- OpenCvSharp.dll
Class implementing the DAISY descriptor.
public class DAISY : Feature2D, IDisposable
- Inheritance
-
DAISY
- Implements
- Inherited Members
Properties
H
Optional 3x3 homography matrix used to warp the grid of daisy but sampling keypoints remains unwarped on image.
public Mat H { get; set; }
Property Value
Interpolation
Switch to disable interpolation for speed improvement at minor quality loss.
public bool Interpolation { get; set; }
Property Value
Norm
Descriptors normalization type.
public DAISYNormalizationType Norm { get; set; }
Property Value
QHist
Amount of gradient orientations range division quantity.
public int QHist { get; set; }
Property Value
QRadius
Amount of radial range division quantity.
public int QRadius { get; set; }
Property Value
QTheta
Amount of angular range division quantity.
public int QTheta { get; set; }
Property Value
Radius
Radius of the descriptor at the initial scale.
public float Radius { get; set; }
Property Value
UseOrientation
Sample patterns using keypoints orientation, disabled by default.
public bool UseOrientation { get; set; }
Property Value
Methods
Compute(InputArray, OutputArray)
Computes the descriptor for every pixel in the image.
public void Compute(InputArray image, OutputArray descriptors)
Parameters
imageInputArrayImage to extract descriptors from.
descriptorsOutputArrayResulted descriptors array for all image pixels.
Compute(InputArray, Rect, OutputArray)
Computes the descriptor for every pixel within the given region of interest.
public void Compute(InputArray image, Rect roi, OutputArray descriptors)
Parameters
imageInputArrayImage to extract descriptors from.
roiRectRegion of interest within the image. Must cover the entire image (see remarks).
descriptorsOutputArrayResulted descriptors array for the roi image pixels.
Remarks
OpenCV's native implementation indexes the output buffer using absolute image
coordinates even though the buffer is only sized roi.Width * roi.Height rows,
so it overflows unless roi covers the entire image
(roi.X == 0 && roi.Y == 0 && roi.Width == image.Cols && roi.Height == image.Rows).
This is validated up front and throws ArgumentException instead of letting a
partial ROI corrupt memory.
Create(float, int, int, int, DAISYNormalizationType, InputArray, bool, bool)
Creates the DAISY descriptor.
public static DAISY Create(float radius = 15, int qRadius = 3, int qTheta = 8, int qHist = 8, DAISYNormalizationType norm = DAISYNormalizationType.None, InputArray h = default, bool interpolation = true, bool useOrientation = false)
Parameters
radiusfloatRadius of the descriptor at the initial scale.
qRadiusintAmount of radial range division quantity.
qThetaintAmount of angular range division quantity.
qHistintAmount of gradient orientations range division quantity.
normDAISYNormalizationTypeDescriptors normalization type.
hInputArrayOptional 3x3 homography matrix used to warp the grid of daisy but sampling keypoints remains unwarped on image.
interpolationboolSwitch to disable interpolation for speed improvement at minor quality loss.
useOrientationboolSample patterns using keypoints orientation, disabled by default.
Returns
GetDescriptor(double, double, int)
Retrieves the descriptor at the given position and orientation.
public float[] GetDescriptor(double y, double x, int orientation)
Parameters
ydoublePosition y on image.
xdoublePosition x on image.
orientationintOrientation on image (0-360).
Returns
- float[]
The computed descriptor.
GetDescriptor(double, double, int, double[], out float[])
Retrieves the descriptor at the given position and orientation, using a homography matrix for the warped grid.
public bool GetDescriptor(double y, double x, int orientation, double[] h, out float[] descriptor)
Parameters
ydoublePosition y on image.
xdoublePosition x on image.
orientationintOrientation on image (0-360).
hdouble[]Homography matrix for warped grid (row-major, 9 elements).
descriptorfloat[]The computed descriptor.
Returns
- bool
false if the descriptor could not be computed (e.g. it falls outside the image), true otherwise.
GetUnnormalizedDescriptor(double, double, int)
Retrieves the unnormalized descriptor at the given position and orientation.
public float[] GetUnnormalizedDescriptor(double y, double x, int orientation)
Parameters
ydoublePosition y on image.
xdoublePosition x on image.
orientationintOrientation on image (0-360).
Returns
- float[]
The computed descriptor.
GetUnnormalizedDescriptor(double, double, int, double[], out float[])
Retrieves the unnormalized descriptor at the given position and orientation, using a homography matrix for the warped grid.
public bool GetUnnormalizedDescriptor(double y, double x, int orientation, double[] h, out float[] descriptor)
Parameters
ydoublePosition y on image.
xdoublePosition x on image.
orientationintOrientation on image (0-360).
hdouble[]Homography matrix for warped grid (row-major, 9 elements).
descriptorfloat[]The computed descriptor.
Returns
- bool
false if the descriptor could not be computed (e.g. it falls outside the image), true otherwise.