Class cv::DISK#
DISK feature detector and descriptor, based on a DNN model. View details
#include <opencv2/features.hpp>Collaboration diagram for cv::DISK:
Public Member Functions#
Public Member Functions inherited from cv::Feature2D
Return |
Name |
Description |
|---|---|---|
|
|
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). |
|
||
|
||
|
||
|
||
|
|
Detects keypoints in an image (first variant) or image set (second variant). |
|
||
|
||
|
Return true if detector object is empty. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
||
|
Stores algorithm parameters in a file storage. |
|
|
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
DISK feature detector and descriptor, based on a DNN model.
DISK (Deep Image Structure and Keypoints) is a learned local-feature pipeline that produces keypoints and 128-D L2-normalized descriptors via a single forward pass through a fully convolutional network. This class wraps an ONNX export of the pre-trained DISK model through cv::dnn::Net and exposes it under the standard cv::Feature2D interface so it can be used as a drop-in alternative to SIFT/ORB.
The class assumes the ONNX model has a single input named image taking an N×3×H×W float32 tensor in [0, 1] (RGB channel order) and three outputs named keypoints (N×2), scores (N) and descriptors (N×128).
Member Function Documentation#
create()#
static Ptr< DISK > cv::DISK::create(
const std::vector< uchar > & bufferModel,
int maxKeypoints = -1,
float scoreThreshold = 0.0f,
const Size & imageSize = Size(),
int backendId = 0,
int targetId = 0 )
Python:
cv.DISK.create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK.createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK_create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK_createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
Creates a DISK detector from an in-memory model buffer.
This overload loads the DISK ONNX model from a buffer instead of a file on disk. It is intended for cases where the model is read from application resources (for example Android assets) and is not available as a path on the filesystem.
Note
In C++ this is an overload of create. The Python/Java/Objective-C bindings expose it as createFromMemory, because Objective-C selectors are not disambiguated by argument type and would otherwise clash with the file-path create.
Parameters
bufferModel— A buffer containing the contents of the DISK ONNX model.maxKeypoints— Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.scoreThreshold— Discard keypoints with network score strictly below this value.imageSize— Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network’s expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.backendId— DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.targetId— DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.
create()#
static Ptr< DISK > cv::DISK::create(
const String & modelPath,
int maxKeypoints = -1,
float scoreThreshold = 0.0f,
const Size & imageSize = Size(),
int backendId = 0,
int targetId = 0 )
Python:
cv.DISK.create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK.createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK_create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
cv.DISK_createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
Creates a DISK detector.
Parameters
modelPath— Path to the DISK ONNX model.maxKeypoints— Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.scoreThreshold— Discard keypoints with network score strictly below this value.imageSize— Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network’s expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.backendId— DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.targetId— DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.
getDefaultName()#
String cv::DISK::getDefaultName()
Python:
cv.DISK.getDefaultName() -> retval
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
getImageSize()#
Python:
cv.DISK.getImageSize() -> retval
getMaxKeypoints()#
int cv::DISK::getMaxKeypoints()
Python:
cv.DISK.getMaxKeypoints() -> retval
getScoreThreshold()#
float cv::DISK::getScoreThreshold()
Python:
cv.DISK.getScoreThreshold() -> retval
setImageSize()#
void cv::DISK::setImageSize(const Size & size)
Python:
cv.DISK.setImageSize(size)
setMaxKeypoints()#
void cv::DISK::setMaxKeypoints(int maxKeypoints)
Python:
cv.DISK.setMaxKeypoints(maxKeypoints)
setScoreThreshold()#
void cv::DISK::setScoreThreshold(float threshold)
Python:
cv.DISK.setScoreThreshold(threshold)
Source file#
The documentation for this class was generated from the following file:
opencv2/features.hpp