ImageGear .NET v24.12 - Updated
Recognize a Barcode
User Guide > How to Work with... > Barcodes > Recognize a Barcode

Once your image has been acquired and pre-image processing has been performed to recognize the barcode on the image, the following properties must first be set:

Checks Before Barcode Recognition

If possible, the following properties should be set before the detection process is started:

Property

Description

InkColor The default barcode color is black.
Orientation The default barcode orientation is horizontal/vertical orientations.
BarcodeTypes

The type of barcodes you want to detect. The default is all 1D barcodes. See the BarcodeTypes property for specific identification of barcode types that must be explicitly set to be recognized, and how to speed up barcode detection for known barcode types.

If the barcode image quality is poor (i.e. less than 300 dpi), set the BarcodeTypes property to the specific barcode type in order to obtain accurate results.
MaximumBarcodes

Sets the maximum number of barcodes that will be detected. The default is 100.

If you know how many barcodes you expect to find, set the MaximumBarcodes to that value, and the barcode engine will stop looking once that number is found.

Once these properties are set you are ready to recognize the barcode on the image.

The barcode engine detects all barcodes in an image and gives you complete details about them.

If you know where on the image the barcodes reside, setting the Area values to define a smaller rectangular area on your image will speed up processing. By default these values are set to 0 which tells the barcode engine to search the entire image automatically.

Supported Barcodes for Recognition

Once the BarcodeTypes property has been determined as stated in the How to Acquire an Image topic, use the following methods and properties to recognize the barcode.

Methods

Method Description
Analyze(ImGearPage) This method detects barcodes within the given ImGearPage

 

Properties

Property Description
AppendCheckSum This property gets or sets a value which determines if a checksum value is appended to the barcode during recognition.
Area This property gets or sets the area of the image, in pixels, to analyze for barcode recognition.
AustralianPostCustomDecodeMode This property gets or sets the AustralianPostCustomDecodeType.
BarcodeTypes This property gets or sets the type of barcodes to analyze during recognition processing.
IncludeControlCharacters This property gets or sets the control characters in the barcode value during recognition processing.
InkColor This property gets or sets the ink color of barcodes to search for during recognition processing.
MaximumBarcodes This property gets or sets the maximum number of barcodes to recognize.
Orientation This property gets or sets the orientation of the barcodes to analyze during recognition.
ReturnPossibleBarcodes This property gets or sets a value to determine if possible barcodes are returned in the result list.