Table of Contents

Class DISK

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

DISK: deep learning based local feature detector and descriptor (OpenCV 5). Runs an ONNX model through the DNN module. Requires OpenCV built with the dnn module.

public class DISK : Feature2D, IDisposable
Inheritance
DISK
Implements
Inherited Members

Properties

ImageSize

Target input size fed to the network.

public Size ImageSize { get; set; }

Property Value

Size

MaxKeypoints

Maximum number of keypoints to return per image; -1 keeps all detections.

public int MaxKeypoints { get; set; }

Property Value

int

ScoreThreshold

Keypoints with network score strictly below this value are discarded.

public float ScoreThreshold { get; set; }

Property Value

float

Methods

Create(string, int, float, Size, int, int)

Creates a DISK detector from a model file path.

public static DISK Create(string modelPath, int maxKeypoints = -1, float scoreThreshold = 0, Size imageSize = default, int backendId = 0, int targetId = 0)

Parameters

modelPath string

Path to the DISK ONNX model.

maxKeypoints int

Maximum number of keypoints to return per image; -1 keeps all detections.

scoreThreshold float

Discard keypoints with network score strictly below this value.

imageSize Size

Target input size fed to the network. Default (empty) falls back to the network's fixed 1024x1024 input. When overriding, both dimensions must be positive multiples of 16.

backendId int

DNN backend identifier (see Backend); 0 = default.

targetId int

DNN target identifier (see Target); 0 = CPU.

Returns

DISK

CreateFromMemory(byte[], int, float, Size, int, int)

Creates a DISK detector from an in-memory ONNX model buffer.

public static DISK CreateFromMemory(byte[] bufferModel, int maxKeypoints = -1, float scoreThreshold = 0, Size imageSize = default, int backendId = 0, int targetId = 0)

Parameters

bufferModel byte[]

A buffer containing the contents of the DISK ONNX model.

maxKeypoints int

Maximum number of keypoints to return per image; -1 keeps all detections.

scoreThreshold float

Discard keypoints with network score strictly below this value.

imageSize Size

Target input size fed to the network. Default (empty) falls back to the network's fixed 1024x1024 input. When overriding, both dimensions must be positive multiples of 16.

backendId int

DNN backend identifier (see Backend); 0 = default.

targetId int

DNN target identifier (see Target); 0 = CPU.

Returns

DISK