Aspose::BarCode::BarCodeRecognition::BarCodeReader class
Contents
[
Hide
]BarCodeReader class
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
class BarCodeReader : public System::IDisposable
Methods
Method | Description |
---|---|
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. |
BarCodeReader() | Initializes a new instance of the BarCodeReader class with default values. Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>) | Initializes a new instance of the BarCodeReader class from an image. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::SharedPtr<BaseDecodeType>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::Drawing::Rectangle, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::Drawing::Rectangle, System::SharedPtr<BaseDecodeType>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::ArrayPtr<System::Drawing::Rectangle>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::ArrayPtr<System::Drawing::Rectangle>, System::SharedPtr<BaseDecodeType>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::String) | Initializes a new instance of the BarCodeReader class from file. |
BarCodeReader(System::String, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::String, System::SharedPtr<BaseDecodeType>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::IO::Stream>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::IO::Stream>, System::SharedPtr<BaseDecodeType>) | Initializes a new instance of the BarCodeReader class. |
BarCodeReader(System::SharedPtr<System::IO::Stream>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) | Initializes a new instance of the BarCodeReader class. |
Dispose() override | Release resource. |
ExportToXml(System::String) | Exports BarCode properties to the xml-file specified. |
ExportToXml(System::SharedPtr<System::IO::Stream>) | Exports BarCode properties to the xml-stream specified. |
get_BarcodeSettings() | The main BarCode decoding parameters. Contains parameters which make influence on recognized data. |
get_FoundBarCodes() | Gets recognized BarCodeResults array. |
get_FoundCount() | Gets recognized barcodes count. |
static get_ProcessorSettings() | Gets a settings of using processor cores. |
get_QualitySettings() | QualitySettings 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. |
get_Timeout() | Gets the timeout of recognition process in milliseconds. |
static ImportFromXml(System::String) | Imports BarCode properties from the xml-file specified and applies them to the current BarCodeReader instance. |
static ImportFromXml(System::SharedPtr<System::IO::Stream>) | Imports BarCode properties from the xml-stream specified and applies them to the current BarCodeReader instance. |
ReadBarCodes() | Reads BarCodeResults from the image. |
set_QualitySettings(System::SharedPtr<Aspose::BarCode::BarCodeRecognition::QualitySettings>) | QualitySettings 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. |
set_Timeout(int32_t) | Sets the timeout of recognition process in milliseconds. |
SetBarCodeImage(System::SharedPtr<System::Drawing::Bitmap>) | Sets bitmap image for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeImage(System::SharedPtr<System::Drawing::Bitmap>, System::ArrayPtr<System::Drawing::Rectangle>) | Sets bitmap image and areas for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeImage(System::SharedPtr<System::Drawing::Bitmap>, System::Drawing::Rectangle) | Sets bitmap image and area for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeImage(System::String) | Sets image file for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeImage(System::SharedPtr<System::IO::Stream>) | Sets image stream for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeReadType(const System::ArrayPtr<System::SharedPtr<SingleDecodeType>>&) | Sets SingleDecodeType type array for recognition. Must be called before ReadBarCodes() method. |
SetBarCodeReadType(System::SharedPtr<BaseDecodeType>) | Sets decode type for recognition. Must be called before ReadBarCodes() method. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
See Also
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++