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
parametersQRCodeDetectorArucoParamsParameters for the QRCodeDetectorAruco
Properties
ArucoParameters
Aruco detector parameters used to search for the finder patterns.
public DetectorParameters ArucoParameters { get; set; }
Property Value
DetectorParameters
Detector parameters of QRCodeDetectorAruco.
public QRCodeDetectorArucoParams DetectorParameters { get; set; }
Property Value
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
imgInputArraygrayscale or color (BGR) image containing QR code.
pointsIEnumerable<Point2f>Quadrangle vertices found by detect() method (or some other algorithm).
straightQrCodeOutputArrayThe optional output image containing rectified and binarized QR code
Returns
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
imgInputArraygrayscale or color (BGR) image containing QR code.
pointsIEnumerable<Point2f>Quadrangle vertices found by detect() method (or some other algorithm).
decodedInfostring[]UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
Returns
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
imgInputArraygrayscale or color (BGR) image containing QR code.
pointsIEnumerable<Point2f>Quadrangle vertices found by detect() method (or some other algorithm).
decodedInfostring[]UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
straightQrCodeMat[]The optional output image containing rectified and binarized QR code
Returns
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
imgInputArraygrayscale or color (BGR) image containing (or not) QR code.
pointsPoint2f[]Output vector of vertices of the minimum-area quadrangle containing the code.
Returns
DetectAndDecode(InputArray, out Point2f[], OutputArray)
Both detects and decodes QR code
public string DetectAndDecode(InputArray img, out Point2f[] points, OutputArray straightQrCode = default)
Parameters
imgInputArraygrayscale or color (BGR) image containing QR code.
pointsPoint2f[]optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
straightQrCodeOutputArrayThe optional output image containing rectified and binarized QR code
Returns
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
imgInputArraygrayscale or color (BGR) image containing QR codes.
decodedInfostring[]UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsPoint2f[]optional output array of vertices of the found QR code quadrangles. Will be empty if not found.
straightQrCodeMat[]The optional output vector of images containing rectified and binarized QR codes
Returns
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
imgInputArraygrayscale or color (BGR) image containing (or not) QR code.
pointsPoint2f[]Output vector of vertices of the minimum-area quadrangle containing the codes.