Table of Contents

Class Cv2.Dnn

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

cv::dnn functions

public static class Cv2.Dnn
Inheritance
Cv2.Dnn
Inherited Members

Methods

BlobFromImage(Mat, double, Size, Scalar, bool, bool, InterpolationFlags)

Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.

BlobFromImageWithParams(InputArray, Image2BlobParams?)

Creates 4-dimensional blob from image with given params. This function is an extension of BlobFromImage(Mat, double, Size, Scalar, bool, bool, InterpolationFlags) with additional preprocessing options.

BlobFromImages(IEnumerable<Mat>, double, Size, Scalar, bool, bool, InterpolationFlags)

Creates 4-dimensional blob from series of images. Optionally resizes and crops @p images from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.

BlobFromImagesWithParams(IEnumerable<Mat>, Image2BlobParams?)

Creates 4-dimensional blob from series of images with given params.

EnableModelDiagnostics(bool)

Enables detailed logging of the DNN model loading with CV DNN API. Diagnostic mode provides detailed logging of the model loading stage to explore potential problems (ex.: not implemented layer type).

GetAvailableBackends()

Returns the list of available (backend, target) pairs supported by this build.

GetAvailableTargets(Backend)

Returns the list of available computation targets for the given backend.

ImagesFromBlob(Mat)

Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector<cv::Mat>).

NMSBoxes(IEnumerable<Rect2d>, IEnumerable<float>, float, float, out int[], float, int)

Performs non maximum suppression given boxes and corresponding scores.

NMSBoxes(IEnumerable<Rect>, IEnumerable<float>, float, float, out int[], float, int)

Performs non maximum suppression given boxes and corresponding scores.

NMSBoxes(IEnumerable<RotatedRect>, IEnumerable<float>, float, float, out int[], float, int)

Performs non maximum suppression given boxes and corresponding scores.

NMSBoxesBatched(IEnumerable<Rect2d>, IEnumerable<float>, IEnumerable<int>, float, float, out int[], float, int)

Performs batched non maximum suppression on given boxes and corresponding scores across different classes.

NMSBoxesBatched(IEnumerable<Rect>, IEnumerable<float>, IEnumerable<int>, float, float, out int[], float, int)

Performs batched non maximum suppression on given boxes and corresponding scores across different classes.

ReadNet(string, string, string, EngineType)

Loads a network and infers the format from its file extension. Supports ONNX, TensorFlow Lite and OpenVINO IR.

ReadNetFromONNX(byte[], EngineType)

Reads a network model ONNX https://onnx.ai/ from memory

ReadNetFromONNX(Stream, EngineType)

Reads a network model ONNX https://onnx.ai/ from stream.

ReadNetFromONNX(ReadOnlySpan<byte>, EngineType)

Reads a network model ONNX https://onnx.ai/ from memory

ReadNetFromONNX(string, EngineType)

Reads a network model ONNX https://onnx.ai/ from memory

ReadNetFromTFLite(byte[], EngineType)

Reads a network model stored in TFLite framework's format from memory.

ReadNetFromTFLite(Stream, EngineType)

Reads a network model stored in TFLite framework's format from stream.

ReadNetFromTFLite(ReadOnlySpan<byte>, EngineType)

Reads a network model stored in TFLite framework's format from memory.

ReadNetFromTFLite(string, EngineType)

Reads a network model stored in TFLite (https://www.tensorflow.org/lite) framework's format.

ReadTensorFromONNX(string)

Creates blob from .pb file.

ResetMyriadDevice()

Release a Myriad device is binded by OpenCV.

Single Myriad device cannot be shared across multiple processes which uses Inference Engine's Myriad plugin.

SoftNMSBoxes(IEnumerable<Rect>, IEnumerable<float>, out float[], float, float, out int[], int, float, SoftNMSMethod)

Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503