Aspose::BarCode::BarCodeRecognition Namespace Reference

Classes

class  BarCodeReader
 BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform Read operation to detect barcodes. This sample shows how to detect Code39 barcode with supplement.
[C#]
using(BarCodeReader reader = new BarCodeReader(@"c:\test.jpg", DecodeType.Code39Standard))
{
while(reader.Read())
{
Console.WriteLine("BarCode Type: " + reader.GetCodeType());
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
}
[VB.NET]
Using reader As BarCodeReader = New BarCodeReader("c:\test.jpg", DecodeType.Code39Standard)
While reader.Read()
Console.WriteLine("BarCode Type: " + reader.GetCodeTypeName())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText())
End While
End Using
More...
 
class  BarCodeRegion
 Represents the barcode's region. More...
 
class  BaseDecodeType
 Base class for MultyDecodeType and SingleDecodeType. More...
 
class  Code128DataPortion
 Contains the data of subtype for Code128 type barcode More...
 
class  DecodeType
 Specify the type of barcode to read. This sample shows how to detect Code39 and Code128 barcode.
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg", DecodeType.Code39Standard, DecodeType.Code128))
{
while (reader.Read())
{
Console.WriteLine("BarCode Type: " + reader.GetCodeType());
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
}
[VB.NET]
Using reader As BarCodeReader = New BarCodeReader("c:\test.jpg", DecodeType.Code39Standard, DecodeType.Code128)
While reader.Read()
Console.WriteLine("BarCode Type: " + reader.GetCodeTypeName())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText())
End While
End Using
More...
 
class  Details_BarCodeRecognitionException
 General exception thrown by BarCodeReader, inherited from BarCodeException More...
 
class  MultyDecodeType
 Composite decode type. More...
 
class  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. This sample shows how to use QualitySettings with BarCodeReader
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//set high performance mode
reader.QualitySettings = QualitySettings.HighPerformance;
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//normal quality mode is set by default
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//set high quality mode with low speed recognition
reader.QualitySettings = QualitySettings.HighQuality;
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//set max barcodes mode, which tries to find all possible barcodes, even incorrect. The slowest recognition mode
reader.QualitySettings = QualitySettings.MaxBarCodes;
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//set high performance mode
reader.QualitySettings = QualitySettings.HighPerformance;
//set separate options
reader.QualitySettings.AllowMedianSmoothing = true;
reader.QualitySettings.MedianSmoothingWindowSize = 5;
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.jpg"))
{
//default mode is NormalQuality
//set separate options
reader.QualitySettings.AllowMedianSmoothing = true;
reader.QualitySettings.MedianSmoothingWindowSize = 5;
while (reader.Read())
Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
}
More...
 
class  SingleDecodeType
 Single decode type. See decode type to get instance. More...
 

Typedefs

using BarCodeRecognitionException = System::ExceptionWrapper< Details_BarCodeRecognitionException >
 

Enumerations

enum  ChecksumValidation { ChecksumValidation::Default, ChecksumValidation::On, ChecksumValidation::Off }
 
enum  Code128SubType { Code128SubType::CodeSetA = 1, Code128SubType::CodeSetB = 2, Code128SubType::CodeSetC = 3 }
 Contains types of Code128 subset More...
 

Typedef Documentation

◆ BarCodeRecognitionException

Enumeration Type Documentation

◆ ChecksumValidation

Enable checksum validation during recognition for 1D barcodes.

Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.

Checksum never used: Codabar

Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN

Checksum always used: Rest symbologies

Enumerator
Default 

If checksum is required by the specification - it will be validated.

On 

Always validate checksum if possible.

Off 

Do not validate checksum.

◆ Code128SubType

Contains types of Code128 subset

Enumerator
CodeSetA 

ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4 ///

CodeSetB 

ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4 ///

CodeSetC 

00–99 (encodes two digits with a single code point) and FNC1 ///