BarCodeReader

BarCodeReader class

BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.

The BarCodeReader type exposes the following members:

Constructors

NameDescription
BarCodeReader()Initializes a new instance of the BarCodeReader class with default values.
Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method.
BarCodeReader(filename)Initializes a new instance of the BarCodeReader class
BarCodeReader(filename, decode_types)Initializes a new instance of the BarCodeReader class
BarCodeReader(filename, type)Initializes a new instance of the BarCodeReader class
BarCodeReader(stream)Initializes a new instance of the BarCodeReader class
BarCodeReader(stream, type)Initializes a new instance of the BarCodeReader class
BarCodeReader(stream, decode_types)Initializes a new instance of the BarCodeReader class

Properties

NameDescription
processor_settingsGets a settings of using processor cores.
timeoutGets or sets the timeout of recognition process in milliseconds.
found_bar_codesGets recognized BarCodeResults array
found_countGets recognized barcodes count
quality_settingsQualitySettings allows to configure recognition quality and speed manually.
You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
HighQuality, MaxBarCodes or you can manually configure separate options.
Default value of QualitySettings is NormalQuality.
barcode_settingsThe main BarCode decoding parameters. Contains parameters which make influence on recognized data.

Methods

NameDescription
set_bar_code_image(filename)Sets image file for recognition.
Must be called before ReadBarCodes() method.
set_bar_code_image(stream)Sets image stream for recognition.
Must be called before ReadBarCodes() method.
set_bar_code_read_type(barcode_types)Sets SingleDecodeType type array for recognition.
Must be called before ReadBarCodes() method.
set_bar_code_read_type(type)Sets decode type for recognition.
Must be called before ReadBarCodes() method.
export_to_xml(xml_file)Exports BarCode properties to the xml-file specified
export_to_xml(xml_stream)Exports BarCode properties to the xml-stream specified
import_from_xml(xml_file)Imports BarCode properties from the xml-file specified and applies them to the current BarCodeReader instance.
import_from_xml(xml_stream)Imports BarCode properties from the xml-stream specified and applies them to the current BarCodeReader instance.
abort()Function requests termination of current recognition session from other thread. Abort is unblockable method and returns control just after calling.
The method should be used when recognition process is too long.
read_bar_codes()Reads BarCodeResults from the image.

See Also