ReadDataMatrixBarcode2 Method
Syntax
CWIMAQVision.ReadDataMatrixBarcode2 SourceImage, GradingMode, DataMatrixDescriptionOptions, DataMatrixSizeOptions, DataMatrixSearchOptions, DataMatrixReport [, Regions]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Reads a Data Matrix barcode from an image. Many of the options provided by this method allow for automatic detection of properties of the Data Matrix barcode or what methods the function should use to locate and decode the barcode. Specificying 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 Data Matrix barcodes to read.
GradingMode As CWIMAQDataMatrixGradingModes
Specifies if the method should make calculations needed to prepare to grade the Data Matrix barcode.
DataMatrixDescriptionOptions As CWIMAQDataMatrixDescriptionOptions
Describes the Data Matrix barcode the method should look for.
DataMatrixSizeOptions As CWIMAQDataMatrixSizeOptions
Specifies the sizing information for the Data Matrix barcode the method should look for.
DataMatrixSearchOptions As CWIMAQDataMatrixSearchOptions
Specifies the parameters the method uses to search for the Data Matrix barcode.
DataMatrixReport As CWIMAQDataMatrixReport
On return, a CWIMAQDataMatrixReport containing information about the Data Matrix barcode, including a string containing the decoded barcode data.
Regions As Variant
[Optional] An CWIMAQRegions object that specifies the location of the Data Matrix barcodes 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 DataMatrixSearchOptions parameter is set to TRUE, a closed contour has an additional constraint of being four-sided.