Method Create
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Create(string, int, float, Size, int, int)
Creates a DISK detector from a model file path. On Windows, a non-ASCII path is read into memory and passed through CreateFromMemory(byte[], int, float, Size, int, int) instead, since the native path overload is marshaled through the ANSI code page.
public static DISK Create(string modelPath, int maxKeypoints = -1, float scoreThreshold = 0, Size imageSize = default, int backendId = 0, int targetId = 0)
Parameters
modelPathstringPath to the DISK ONNX model.
maxKeypointsintMaximum number of keypoints to return per image; -1 keeps all detections.
scoreThresholdfloatDiscard keypoints with network score strictly below this value.
imageSizeSizeTarget 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.
backendIdintDNN backend identifier (see Backend); 0 = default.
targetIdintDNN target identifier (see Target); 0 = CPU.