Class QRCodeDetector
Implements
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class QRCodeDetector : DisposableCvObject, ICvPtrHolder
Constructors
| Improve this Doc View SourceQRCodeDetector()
Declaration
public QRCodeDetector()
Methods
| Improve this Doc View SourceDecode(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.
Declaration
public string Decode(InputArray img, IEnumerable<Point2f> points, OutputArray straightQrCode = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing QR code. |
IEnumerable<OpenCvSharp.Point2f> | points | Quadrangle vertices found by detect() method (or some other algorithm). |
OutputArray | straightQrCode | The optional output image containing rectified and binarized QR code |
Returns
Type | Description |
---|---|
System.String |
DecodeMulti(InputArray, IEnumerable<Point2f>, out String[])
Decodes QR codes in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.
Declaration
public bool DecodeMulti(InputArray img, IEnumerable<Point2f> points, out string[] decodedInfo)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing QR code. |
IEnumerable<OpenCvSharp.Point2f> | points | Quadrangle vertices found by detect() method (or some other algorithm). |
System.String[] | decodedInfo | UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. |
Returns
Type | Description |
---|---|
System.Boolean |
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 string or empty string if the code cannot be decoded.
Declaration
public bool DecodeMulti(InputArray img, IEnumerable<Point2f> points, out string[] decodedInfo, out Mat[] straightQrCode)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing QR code. |
IEnumerable<OpenCvSharp.Point2f> | points | Quadrangle vertices found by detect() method (or some other algorithm). |
System.String[] | decodedInfo | UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. |
Mat[] | straightQrCode | The optional output image containing rectified and binarized QR code |
Returns
Type | Description |
---|---|
System.Boolean |
DecodeMulti(InputArray, IEnumerable<Point2f>, out String[], out Mat[], Boolean)
Decodes QR codes in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.
Declaration
protected bool DecodeMulti(InputArray img, IEnumerable<Point2f> points, out string[] decodedInfo, out Mat[] straightQrCode, bool isOutputStraightQrCode)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing QR code. |
IEnumerable<OpenCvSharp.Point2f> | points | Quadrangle vertices found by detect() method (or some other algorithm). |
System.String[] | decodedInfo | UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. |
Mat[] | straightQrCode | The optional output image containing rectified and binarized QR code |
System.Boolean | isOutputStraightQrCode | true to output |
Returns
Type | Description |
---|---|
System.Boolean |
Detect(InputArray, out Point2f[])
Detects QR code in image and returns the quadrangle containing the code.
Declaration
public bool Detect(InputArray img, out Point2f[] points)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing (or not) QR code. |
OpenCvSharp.Point2f[] | points | Output vector of vertices of the minimum-area quadrangle containing the code. |
Returns
Type | Description |
---|---|
System.Boolean |
DetectAndDecode(InputArray, out Point2f[], OutputArray)
Both detects and decodes QR code
Declaration
public string DetectAndDecode(InputArray img, out Point2f[] points, OutputArray straightQrCode = null)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing QR code. |
OpenCvSharp.Point2f[] | points | optional output array of vertices of the found QR code quadrangle. Will be empty if not found. |
OutputArray | straightQrCode | The optional output image containing rectified and binarized QR code |
Returns
Type | Description |
---|---|
System.String |
DetectMulti(InputArray, out Point2f[])
Detects QR codes in image and returns the quadrangles containing the codes.
Declaration
public bool DetectMulti(InputArray img, out Point2f[] points)
Parameters
Type | Name | Description |
---|---|---|
InputArray | img | grayscale or color (BGR) image containing (or not) QR code. |
OpenCvSharp.Point2f[] | points | Output vector of vertices of the minimum-area quadrangle containing the codes. |
Returns
Type | Description |
---|---|
System.Boolean |
DisposeUnmanaged()
Releases unmanaged resources
Declaration
protected override void DisposeUnmanaged()
Overrides
| Improve this Doc View SourceSetEpsX(Double)
sets the epsilon used during the horizontal scan of QR code stop marker detection.
Declaration
public void SetEpsX(double epsX)
Parameters
Type | Name | Description |
---|---|---|
System.Double | epsX | Epsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard. |
SetEpsY(Double)
sets the epsilon used during the vertical scan of QR code stop marker detection.
Declaration
public void SetEpsY(double epsY)
Parameters
Type | Name | Description |
---|---|---|
System.Double | epsY | Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard. |