Show / Hide Table of Contents

Class QRCodeDetector

Inheritance
System.Object
DisposableObject
DisposableCvObject
QRCodeDetector
Implements
ICvPtrHolder
Inherited Members
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.DisposeManaged()
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class QRCodeDetector : DisposableCvObject, ICvPtrHolder

Constructors

| Improve this Doc View Source

QRCodeDetector()

Declaration
public QRCodeDetector()

Methods

| Improve this Doc View Source

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.

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 straightQrCode

Returns
Type Description
System.Boolean
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

DisposeUnmanaged()

Releases unmanaged resources

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

SetEpsX(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.

| Improve this Doc View Source

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.

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX