ReadBarcode Method
Syntax
CWIMAQVision.ReadBarcode SourceImage, BarcodeType, BarcodeReport [, Regions] [, Validate = False]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Reads a barcode from an image.
Remarks
Use this method with U8, I16, and SGL images.
Parameters
SourceImage As CWIMAQImage
The image containing the barcode to read.
BarcodeType As CWIMAQBarcodeTypes
The type of the barcode to read.
BarcodeReport As CWIMAQBarcodeReport
On return, a CWIMAQBarcodeReport containing information about the barcode, including a string containing the decoded barcode data.
Regions As Variant
[Optional] An CWIMAQRegions object that specifies the location of the barcode in the image.
Validate As Variant
[Optional] Specifies whether to validate the barcodes data. If the barcode type is Codabar, Code 39, or Interleaved 2 of 5, the error correction information is used to validate the results. For all other barcode types, either no validation is performed or the validation is performed automatically because the type requires it.
This parameter has a default value of False.
Example
Barcode Example Unwrap Barcode Example