ReadQRCode Method
Syntax
CWIMAQVision.ReadQRCode SourceImage, GradingMode, QRDescriptionOptions, QRSizeOptions, QRSearchOptions, QRBarcodeReport [, TokenizedData] [, Regions]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Reads a QR code from an image. Many of the options provided by this method allow for automatic detection of properties of the QR code or what methods the function should use to locate and decode the code. Specifying specific properties and methods for these options will greatly increase the performance of the method.
Remarks
Use this method with U8 images.
Parameters
SourceImage As CWIMAQImage
The image containing the QR codes to read.
GradingMode As CWIMAQQRGradingModes
Specifies if the method should make calculations needed to prepare to grade the QR code. This parameter should always be CWIMAQGradingModesNone.
QRDescriptionOptions As CWIMAQQRDescriptionOptions
Describes the QR code the method should look for.
QRSizeOptions As CWIMAQQRSizeOptions
Specifies the sizing information for the QR code the method should look for.
QRSearchOptions As CWIMAQQRSearchOptions
Specifies the parameters the method uses to search for the QR code.
QRBarcodeReport As CWIMAQQRCodeReport
On return, a CWIMAQQRReport containing information about the QR code, including a string containing the decoded code data.
TokenizedData As Variant
[Optional] On return, a CWIMAQQRDataTokens object that contains the data tokenized in exactly the way it was encoded in the symbol. This is useful if the QR code is encoded using multiple languages.
Regions As Variant
[Optional] A CWIMAQRegions object that specifies the location of the QR codes in the image. The method uses the first CWIMAQRegion object in the collection, which must be a polygon, rectangle, or rotated rectangle region. If SkipLocation of the QRSearchOptions parameter is set to TRUE, a closed contour has an additional constraint of being four-sided.