Table of Contents

Class QRCodeDetectorAruco

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

QR code detector that uses the Aruco-based marker detector for locating the finder patterns.

public class QRCodeDetectorAruco : CvObject, IDisposable
Inheritance
QRCodeDetectorAruco
Implements
Inherited Members

Constructors

QRCodeDetectorAruco()

Creates a QRCodeDetectorAruco with default parameters.

public QRCodeDetectorAruco()

QRCodeDetectorAruco(QRCodeDetectorArucoParams)

Creates a QRCodeDetectorAruco with given parameters.

public QRCodeDetectorAruco(QRCodeDetectorArucoParams parameters)

Parameters

parameters QRCodeDetectorArucoParams

Parameters for the QRCodeDetectorAruco

Properties

ArucoParameters

Aruco detector parameters used to search for the finder patterns.

public DetectorParameters ArucoParameters { get; set; }

Property Value

DetectorParameters

DetectorParameters

Detector parameters of QRCodeDetectorAruco.

public QRCodeDetectorArucoParams DetectorParameters { get; set; }

Property Value

QRCodeDetectorArucoParams

Methods

Decode(InputArray, IEnumerable<Point2f>, OutputArray)

Decodes QR code in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.

public string Decode(InputArray img, IEnumerable<Point2f> points, OutputArray straightQrCode = default)

Parameters

img InputArray

grayscale or color (BGR) image containing QR code.

points IEnumerable<Point2f>

Quadrangle vertices found by detect() method (or some other algorithm).

straightQrCode OutputArray

The optional output image containing rectified and binarized QR code

Returns

string

DecodeMulti(InputArray, IEnumerable<Point2f>, out string?[])

Decodes QR codes in image once it's found by the detect() method. Returns UTF8-encoded output vector of strings or empty vector of strings if the codes cannot be decoded.

public bool DecodeMulti(InputArray img, IEnumerable<Point2f> points, out string?[] decodedInfo)

Parameters

img InputArray

grayscale or color (BGR) image containing QR code.

points IEnumerable<Point2f>

Quadrangle vertices found by detect() method (or some other algorithm).

decodedInfo string[]

UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

Returns

bool

DecodeMulti(InputArray, IEnumerable<Point2f>, out string?[], out Mat[])

Decodes QR codes in image once it's found by the detect() method. Returns UTF8-encoded output vector of strings or empty vector of strings if the codes cannot be decoded.

public bool DecodeMulti(InputArray img, IEnumerable<Point2f> points, out string?[] decodedInfo, out Mat[] straightQrCode)

Parameters

img InputArray

grayscale or color (BGR) image containing QR code.

points IEnumerable<Point2f>

Quadrangle vertices found by detect() method (or some other algorithm).

decodedInfo string[]

UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

straightQrCode Mat[]

The optional output image containing rectified and binarized QR code

Returns

bool

Detect(InputArray, out Point2f[])

Detects QR code in image and returns the quadrangle containing the code.

public bool Detect(InputArray img, out Point2f[] points)

Parameters

img InputArray

grayscale or color (BGR) image containing (or not) QR code.

points Point2f[]

Output vector of vertices of the minimum-area quadrangle containing the code.

Returns

bool

DetectAndDecode(InputArray, out Point2f[], OutputArray)

Both detects and decodes QR code

public string DetectAndDecode(InputArray img, out Point2f[] points, OutputArray straightQrCode = default)

Parameters

img InputArray

grayscale or color (BGR) image containing QR code.

points Point2f[]

optional output array of vertices of the found QR code quadrangle. Will be empty if not found.

straightQrCode OutputArray

The optional output image containing rectified and binarized QR code

Returns

string

DetectAndDecodeMulti(InputArray, out string?[], out Point2f[], out Mat[])

Both detects and decodes QR codes

public bool DetectAndDecodeMulti(InputArray img, out string?[] decodedInfo, out Point2f[] points, out Mat[] straightQrCode)

Parameters

img InputArray

grayscale or color (BGR) image containing QR codes.

decodedInfo string[]

UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

points Point2f[]

optional output array of vertices of the found QR code quadrangles. Will be empty if not found.

straightQrCode Mat[]

The optional output vector of images containing rectified and binarized QR codes

Returns

bool

DetectMulti(InputArray, out Point2f[])

Detects QR codes in image and returns the quadrangles containing the codes.

public bool DetectMulti(InputArray img, out Point2f[] points)

Parameters

img InputArray

grayscale or color (BGR) image containing (or not) QR code.

points Point2f[]

Output vector of vertices of the minimum-area quadrangle containing the codes.

Returns

bool