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  BarCodeRecognitionException
 General exception thrown by BarCodeReader, inherited from BarCodeException 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  ICOMBarCodeReader
 Interface for COM interop usage. More...
 
class  MultyDecodeType
 Composite decode type. More...
 
class  SingleDecodeType
 Single decode type. See decode type to get instance. More...
 

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...
 
enum  ManualHint {
  ManualHint::None = 0, ManualHint::InvertImage = 1, ManualHint::IncorrectBarcodes = 2, ManualHint::ComplexBackground = 4,
  ManualHint::MedianSmoothing = 8, ManualHint::UseRestoration = 16, ManualHint::UseRegular = 32, ManualHint::SpecialFormOfCells = 64,
  ManualHint::SkipRotatedBarcodes = 128
}
 Manual hints. More...
 
enum  RecognitionMode { RecognitionMode::MaxPerformance = 1, RecognitionMode::MaxQuality = 2, RecognitionMode::MaxBarCodes = 3, RecognitionMode::ManualHints = 4 }
 Recognition modes. Note: only one recognition mode can be selected. More...
 

Functions

 DECLARE_ENUM_OPERATORS (Aspose::BarCode::BarCodeRecognition::ManualHint)
 

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 ///

◆ ManualHint

Manual hints.

Enumerator
None 

There are no heavy recognition algorithms. The fastest recognition algorithms are used there, however if image is noisy recognition will fail. Used by default.

InvertImage 

Use when image is white on black background. Typically BarCode images are black on white background.

IncorrectBarcodes 

Addition algorithms are included to recognize incorrectly generated or damaged barcodes (skipped bars, stop symbol, etc). May return deniable recognition.

ComplexBackground 

Analyzes barcode background. Useful with complex or colored backgrounds.

MedianSmoothing 

MedianSmoothing. Works with BarcodeReader's MedianSmoothingWindowSize property. The MaxQuality mode includes this flag by default.

UseRestoration 

Starts recognition using only the restoration algorithms from MaxQuality mode.

UseRegular 

Starts recognition using algorithms from MaxPerfomance mode. Useful to combine with other hints.

SpecialFormOfCells 

Starts recognition barcodes with the special form of cells. Example: dot peen Datamatrix. The MaxQuality mode includes this flag by default.

SkipRotatedBarcodes 

Switches off algorithms of rotating and so increases the recognition speed. It works only for Datamatrix and linear barcodes.

◆ RecognitionMode

Recognition modes. Note: only one recognition mode can be selected.

Enumerator
MaxPerformance 

Finds all the possible good and average quality barcodes. Uses only the fastest algorithms. Enabled by default.

MaxQuality 

Finds all the possible barcodes with good or bad quality. Doesn't return potential barcodes. Uses different fast and slow algorithms.

MaxBarCodes 

Extends MaxQuality. Finds even potential barcodes. Uses extra algorithms which may recognize incorrect barcodes, barcodes on complex background, noisy or damaged barcodes and etc. You may observe extra spurious barcodes.

ManualHints 

User configures hints optionally. Allows you to adjust the balance between speed and quality manually.

Function Documentation

◆ DECLARE_ENUM_OPERATORS()

Aspose::BarCode::BarCodeRecognition::DECLARE_ENUM_OPERATORS ( Aspose::BarCode::BarCodeRecognition::ManualHint  )