---
title: "BarCodeReader"
url: "https://reference.aspose.com/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/"
product: "Aspose.BarCode for Python via .NET API Reference"
---


## 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
| Name | Description |
| :- | :- |
|BarCodeReader()|Initializes a new instance of the [BarCodeReader](/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/) class with default values.<br/>            Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method.|
|BarCodeReader(image)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, type)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, area, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, area, type)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, areas, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(image, areas, type)|Initializes a new instance of the BarCodeReader class|
|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|
|BarCodeReader(frame, areas, type)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame, areas, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame, area, type)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame, area, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame, type)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame, decode_types)|Initializes a new instance of the BarCodeReader class|
|BarCodeReader(frame)|Initializes a new instance of the BarCodeReader class|
## Properties
| Name | Description |
| :- | :- |
|processor_settings|Gets a settings of using processor cores.|
|timeout|Gets or sets the timeout of recognition process in milliseconds.|
|found_bar_codes|Gets recognized [BarCodeResult](/barcode/python-net/aspose.barcode.barcoderecognition/barcoderesult/)s array|
|found_count|Gets recognized barcodes count|
|quality_settings|QualitySettings allows to configure recognition quality and speed manually.<br/>            You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, <br/>            HighQuality, MaxBarCodes or you can manually configure separate options.<br/>            Default value of QualitySettings is NormalQuality.|
|barcode_settings|The main BarCode decoding parameters. Contains parameters which make influence on recognized data.|
|bar_code_read_type|Gets or sets the barcode decode type used for recognition.<br/>            Must be set before calling [None](/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/).|
## Methods
| Name | Description |
| :- | :- |
|set_bar_code_image(value)|Sets bitmap image for recognition. <br/>            Must be called before ReadBarCodes() method.|
|set_bar_code_image(value, areas)|Sets bitmap image and areas for recognition. <br/>            Must be called before ReadBarCodes() method.|
|set_bar_code_image(value, area)|Sets bitmap image and areas for recognition. <br/>            Must be called before ReadBarCodes() method.|
|set_bar_code_image(filename)|Sets image file for recognition. <br/>            Must be called before ReadBarCodes() method.|
|set_bar_code_image(stream)|Sets image stream for recognition. <br/>            Must be called before ReadBarCodes() method.|
|set_bar_code_image(frame, area)|Sets the luminance frame and area for recognition. Must be called before the [None](/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/) method.|
|set_bar_code_image(frame, areas)|Sets the luminance frame and areas for recognition. Must be called before the [None](/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/) method.|
|set_bar_code_image(frame)|Sets the luminance frame and area for recognition. Must be called before the [None](/barcode/python-net/aspose.barcode.barcoderecognition/barcodereader/) 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. <br/>            The method should be used when recognition process is too long.|
|read_bar_codes()|Reads [BarCodeResult](/barcode/python-net/aspose.barcode.barcoderecognition/barcoderesult/)s from the image.|
|set_bar_code_read_type(barcode_types)|Sets [SingleDecodeType](/barcode/python-net/aspose.barcode.barcoderecognition/singledecodetype/) type array for recognition. <br/>            Must be called before ReadBarCodes() method.|

### See Also

* namespace [aspose.barcode.barcoderecognition](/barcode/python-net/aspose.barcode.barcoderecognition/)
* assembly [Aspose.BarCode](/barcode/python-net/)

