Table of Contents

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

Mat

Interpolation

Switch to disable interpolation for speed improvement at minor quality loss.

public bool Interpolation { get; set; }

Property Value

bool

Norm

Descriptors normalization type.

public DAISYNormalizationType Norm { get; set; }

Property Value

DAISYNormalizationType

QHist

Amount of gradient orientations range division quantity.

public int QHist { get; set; }

Property Value

int

QRadius

Amount of radial range division quantity.

public int QRadius { get; set; }

Property Value

int

QTheta

Amount of angular range division quantity.

public int QTheta { get; set; }

Property Value

int

Radius

Radius of the descriptor at the initial scale.

public float Radius { get; set; }

Property Value

float

UseOrientation

Sample patterns using keypoints orientation, disabled by default.

public bool UseOrientation { get; set; }

Property Value

bool

Methods

Compute(InputArray, OutputArray)

Computes the descriptor for every pixel in the image.

public void Compute(InputArray image, OutputArray descriptors)

Parameters

image InputArray

Image to extract descriptors from.

descriptors OutputArray

Resulted 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

image InputArray

Image to extract descriptors from.

roi Rect

Region of interest within the image. Must cover the entire image (see remarks).

descriptors OutputArray

Resulted 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

radius float

Radius of the descriptor at the initial scale.

qRadius int

Amount of radial range division quantity.

qTheta int

Amount of angular range division quantity.

qHist int

Amount of gradient orientations range division quantity.

norm DAISYNormalizationType

Descriptors normalization type.

h InputArray

Optional 3x3 homography matrix used to warp the grid of daisy but sampling keypoints remains unwarped on image.

interpolation bool

Switch to disable interpolation for speed improvement at minor quality loss.

useOrientation bool

Sample patterns using keypoints orientation, disabled by default.

Returns

DAISY

GetDescriptor(double, double, int)

Retrieves the descriptor at the given position and orientation.

public float[] GetDescriptor(double y, double x, int orientation)

Parameters

y double

Position y on image.

x double

Position x on image.

orientation int

Orientation 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

y double

Position y on image.

x double

Position x on image.

orientation int

Orientation on image (0-360).

h double[]

Homography matrix for warped grid (row-major, 9 elements).

descriptor float[]

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

y double

Position y on image.

x double

Position x on image.

orientation int

Orientation 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

y double

Position y on image.

x double

Position x on image.

orientation int

Orientation on image (0-360).

h double[]

Homography matrix for warped grid (row-major, 9 elements).

descriptor float[]

The computed descriptor.

Returns

bool

false if the descriptor could not be computed (e.g. it falls outside the image), true otherwise.