CVB++ 14.0
Cvb::Barcode Namespace Reference

Namespace for the Barcode package. More...

Classes

class  BarcodeGrading
 Configuration to access parameters of barcode grading. More...
 
class  Codabar
 Configuration to access parameters of Codabar. More...
 
class  Code11
 Configuration to access parameters of Code11. More...
 
class  Code128
 Configuration to access parameters of Code128. More...
 
class  Code32
 Configuration to access parameters of Code32. More...
 
class  Code39
 Configuration to access parameters of Code39. More...
 
class  Code93
 Configuration to access parameters of Code93. More...
 
class  DataMatrix
 Configuration to access parameters of DataMatrix. More...
 
class  DataMatrixGrading
 Configuration to access parameters of DataMatrixGrading. More...
 
class  Discrete2of5
 Configuration to access parameters of Discrete2of5. More...
 
class  Ean13
 Configuration to access parameters of Ean13. More...
 
class  Ean8
 Configuration to access parameters of Ean8. More...
 
class  FourStateAustralian
 Configuration to access parameters of FourStateAustralian (4-State Australian). More...
 
class  FourStateKix
 Configuration to access parameters of FourStateKix. More...
 
class  FourStateRoyalMail
 Configuration to access parameters of FourStateRoyalMail (4-State RoyalMail Postal Code). More...
 
class  FourStateUsps
 Configuration to access parameters of FourStateUsps. More...
 
class  GradeResult1D
 Object contains the barcode grading results for one dimensional barcodes. More...
 
class  GradeResultDataMatrix
 Object contains the barcode grading results for DataMatrix and PharmaCode2D barcodes. More...
 
class  GradeResultQr
 Object contains the barcode grading results for QR barcodes. More...
 
class  Interleaved2of5
 Configuration to access parameters of Interleaved2of5. More...
 
class  MicroPdf417
 Configuration to access parameters of MicroPdf417. More...
 
class  MsiPlessey
 Configuration to access parameters of MsiPlessey. More...
 
class  Pdf417
 Configuration to access parameters of Pdf417. More...
 
class  PharmaCode
 Configuration to access parameters of PharmaCode. More...
 
class  Planet
 Configuration to access parameters of Planet. More...
 
class  Postnet
 Configuration to access parameters of Postnet. More...
 
class  Qr
 Configuration to access parameters of Qr. More...
 
class  QrGrading
 Configuration to access parameters of QrGrading. More...
 
class  Reader
 The key class for reading barcodes. More...
 
class  ReaderConfig
 Contains a map of configurations for all active barcode types. More...
 
class  ReadResult
 Base class for reading decoded barcode results. More...
 
class  ReadResult1D
 Derived from ReadResult and gives specific access to 1D results. More...
 
class  ReadResultCode128
 Derived from ReadResult and gives specific access to Code128 results. More...
 
class  ReadResultCode39Code93
 Derived from ReadResult and gives specific access to Code39 results. More...
 
class  ReadResultDataMatrix
 Derived from ReadResult and gives specific access to DataMatrix and PharmaCode2D results. More...
 
class  ReadResultPdf417
 Derived from ReadResult and gives specific access to Pdf417 results. More...
 
class  ReadResultQr
 Derived from ReadResult2D and gives specific access to Qr results. More...
 
class  ReadResultSonyCode
 Derived from ReadResult1D and gives specific access to SonyCode results. More...
 
class  ReadResultUpcE
 Derived from ReadResult1D and gives specific access to UpcE results. More...
 
class  Rss
 Configuration to access parameters of Rss. More...
 
class  SonyCode
 Configuration to access parameters of SonyCode. More...
 
class  UpcA
 Configuration to access parameters of UpcA. More...
 
class  UpcE
 Configuration to access parameters of UpcE. More...
 

Typedefs

using ReadResultPtr = std::shared_ptr< ReadResult >
 Convenience shared pointer for ReadResult.
 

Enumerations

enum class  Readout {
  Omnidirectional = CExports::CVC_BC_OMNI , Fence = CExports::CVC_BC_FENCE , Ladder = CExports::CVC_BC_LADDER , FenceOrLadder = CExports::CVC_BC_BOTH ,
  SmallCodes = CExports::CVC_BC_SMALL_CODES
}
 Available readout modes. More...
 
enum class  ReaderInitialization { ReadNone , ReadAll }
 Possible ways to initialize a Barcode reader. More...
 
enum class  Symbology {
  None = 0 , Code128 = 1 , Codabar = 2 , Ean13 = 3 ,
  Ean8 = 4 , UpcA = 5 , UpcE = 6 , Pdf417 = 7 ,
  DataMatrix = 8 , Code39 = 9 , Code93 = 10 , Discrete2of5 = 11 ,
  Interleaved2of5 = 12 , Code32 = 13 , PharmaCode = 14 , PharmaCode2D = 15 ,
  SonyCode = 16 , RSS = 17 , FourStateKix = 19 , Postnet = 21 ,
  Planet = 22 , Qr = 23 , FourStateRoyalMail = 24 , FourStateAustralian = 25 ,
  FourStateUsps = 26 , MicroPdf417 = 29 , MsiPlessey = 30 , Code11 = 31 ,
  BarcodeGrading = 256 , DataMatrixGrading = 257 , QrGrading = 258
}
 The symbologies supported by Barcode. More...
 
enum class  MsiPlesseyCheckDigit {
  None , Mod10 , Mod11 , Mod1010 ,
  Mod1011
}
 Available check digits for MSI Plessey codes. More...
 
enum class  Code11CheckDigit { None , One , Two }
 Available check digits for Code11. More...
 
enum class  CodeOrientation { Fence = 1 , Ladder = 2 , FenceOrLadder = 3 }
 Directions that a four state code may have. More...
 
enum class  FourStateAustralianLevels {
  None = 0 , Custom = 1 , Routing = 2 , ReplyPaid = 4 ,
  Redirection = 8 , Custom2 = 16 , Custom3 = 32 , Reserved = 64 ,
  All = 32767
}
 Available level flags Four State Australian codes. More...
 
enum class  FourStateLsb { Left , Bottom , Right , Top }
 LSB settings for four state codes. More...
 
enum class  PlanetLevels { None = 0 , Bars62 = 1 , Bars72 = 2 , All = 32767 }
 Available level flags for Planet codes. More...
 
enum class  PostnetLevels {
  None = 0 , Bars32 = 1 , Bars37 = 2 , Bars47 = 4 ,
  Bars52 = 8 , Bars62 = 16 , All = 32767
}
 Available level flags for Postnet codes. More...
 
enum class  PharmaCodeRunDirection { Right , Up , Left , Down }
 Run direction of Pharma Codes. More...
 
enum class  PharmaCodeTolerance { Standard , Extended }
 Tolerance levels for Pharma Code reading acceptance checks. More...
 
enum class  DataMatrixLevels {
  Ecc0 = 1 , Ecc50 = 2 , Ecc80 = 4 , Ecc100 = 8 ,
  Ecc140 = 16 , Ecc200 = 32 , All = 32767
}
 Levels of DataMatrix codes to recognize. Different levels may be combined using '|'. More...
 
enum class  DataMatrixFormats {
  Base11 = 1 , Base27 = 2 , Base37 = 4 , Base41 = 8 ,
  Ascii = 16 , Binary = 32 , All = 32767
}
 Formats of DataMatrix codes to recognize. Different formats may be combined using '|'. More...
 
enum class  DataMatrixSubType { DataMatrix , PharmaCode2D , DottedDatamatrix }
 Sub types of data matrix codes to read. More...
 
enum class  PharmaCodeSkew {
  StrongRight = -2 , ModerateRight = -1 , None = 0 , ModerateLeft = 1 ,
  StrongLeft = 2
}
 Skew of the Pharma Code bars. More...
 
enum class  PharmaCode2DDisposition { DontCare , Present , Miss }
 Expectation setting for Pharma Code 2D elements. More...
 
enum class  Pdf417Levels {
  Level0 = 1 , Level1 = 2 , Level2 = 4 , Level3 = 8 ,
  Level4 = 16 , Level5 = 32 , Level6 = 64 , Level7 = 128 ,
  Level8 = 256 , All = 32767
}
 Available PDF417 levels. More...
 
enum class  QrSubType { Mini , Standard , Both }
 QR code types to read. More...
 
enum class  RssTypes {
  Rss14 = 1 , Rss14Truncated = 2 , Rss14Stacked = 4 , Rss14StackedOmnidirectional = 8 ,
  Limited = 16 , Expanded = 32 , ExpandedStacked = 64 , All = 32767
}
 Types of RSS codes to read. More...
 
enum class  RssComposition {
  Off = 0 , None = 1 , CCA = 2 , CCB = 4 ,
  All = 32767
}
 Composition flags for RSS codes. More...
 
enum class  DecodeResult {
  Success , NothingFound , SymbologyOnly , WrongCodeSize ,
  WrongCodeFormat , ErrorDetectionFailed , ColorNotCorrect , QuietzoneViolation = 32766 ,
  Error
}
 Possible barcode reading results. More...
 
enum class  EccLevelQr {
  NotDecodable , None , L , M ,
  Q , H
}
 ECC levels as used by QR codes. More...
 
enum class  Code128SubType { Ean128 , Code128 }
 Possible sub types of Code128. More...
 
enum class  QrMasking {
  Unknown , Mode000 , Mode001 , Mode010 ,
  Mode011 , Mode100 , Mode101 , Mode110 ,
  Mode111
}
 Masking modes of QR codes. More...
 
enum class  GradeResult1DInfo {
  Ok = 0 , NoResult = 1 , CodePositionOutsideAoi = 2 , CodeHeightTooSmall = 3 ,
  CodeNotRectangular = 4 , GradingNotSupported = 5 , Timeout = 6 , CodeTypeNotSupported = -1 ,
  TooManyCharacters = -2 , MeasuringOrificeNotSupported = -3 , AoiTooSmall = -4 , DecodabilityCheckFailed = -5 ,
  PixelOutsideAoi = -6 , BoundaryCheckFailed = -7 , TrimmingToParallelFailed = -8 , ErrNoMaxFailed = -9 ,
  ECMinFailed = -10
}
 Additional information about 1D grading results. More...
 

Detailed Description

Namespace for the Barcode package.

Online Manual
Common Vision Blox-Tool Barcode
Remarks
CMake users: Link to imported target CVB::CvbBarcode
Example with most basic calls: Decoding a QR barcode
#include <cvb/barcode/reader_config.hpp>
#include <cvb/barcode/reader.hpp>
using namespace Cvb::Barcode;
// Configure
auto pConfig = ReaderConfig::Create(ReaderInitialization::ReadAll);
auto qrConfig = pConfig.CreateConfiguration<Qr>();
// Load image
Cvb::String imagePath(Cvb::ExpandPath(CVB_LIT("%CVB%/Tutorial/Barcode/Images/QR/QR05.bmp")));
auto img = Cvb::Image::Load(imagePath);
// Decode barcode
if (auto result = Reader::Decode<ReadResultQr>(pConfig, img->Plane(0))
{
// Read results
Cvb::String text = qrResult->Text();
auto location = qrResult->Location();
auto barcodeType = qrResult->Type();
if (auto gradingResult = qrResult->GradeResult())
{
auto grade = gradingResult->GradeOverall();
auto decode = gradingResult->GradeDecode();
}
}
Configuration to access parameters of Qr.
Definition: qr.hpp:18
void SetSubTypes(QrSubType subTypes)
Determine which varieties of QR codes to read.
Definition: qr.hpp:134
static std::unique_ptr< Image > Load(const String &fileName)
Loads an image with the given file name.
Definition: detail_image.hpp:32
Namespace for the Barcode package.
Definition: barcode_grading.hpp:11
@ Standard
Standard QR codes only.
@ ReadAll
Initialize the reader to read all codes.

Enumeration Type Documentation

◆ Code11CheckDigit

enum class Code11CheckDigit
strong

Available check digits for Code11.

Enumerator
None 

no check digit

One 

check digit 1

Two 

check digit 2

◆ Code128SubType

enum class Code128SubType
strong

Possible sub types of Code128.

Enumerator
Ean128 

EAN 128 sub type.

Code128 

Code 128 sub type.

◆ CodeOrientation

enum class CodeOrientation
strong

Directions that a four state code may have.

Enumerator
Fence 

Bars are aligned vertically.

Ladder 

Bars are aligned horizontally.

FenceOrLadder 

Bars may be aligned vertically or horizontally.

◆ DataMatrixFormats

enum class DataMatrixFormats
strong

Formats of DataMatrix codes to recognize. Different formats may be combined using '|'.

Enumerator
Base11 

Base 11 Data Matrix format.

Base27 

Base 27 Data Matrix format.

Base37 

Base 37 Data Matrix format.

Base41 

Base 41 Data Matrix format.

Ascii 

ASCII Data Matrix format.

Binary 

Binary Data Matrix format.

All 

All Data Matrix formats.

◆ DataMatrixLevels

enum class DataMatrixLevels
strong

Levels of DataMatrix codes to recognize. Different levels may be combined using '|'.

Enumerator
Ecc0 

ECC level 0.

Ecc50 

ECC level 50.

Ecc80 

ECC level 80.

Ecc100 

ECC level 100.

Ecc140 

ECC level 140.

Ecc200 

ECC level.

All 

All available ECC levels.

◆ DataMatrixSubType

enum class DataMatrixSubType
strong

Sub types of data matrix codes to read.

Enumerator
DataMatrix 

Regular printed data matrix code.

PharmaCode2D 

2D Pharma code

DottedDatamatrix 

Direct Part Marking Data Matrix ('dotted' data matrix)

◆ DecodeResult

enum class DecodeResult
strong

Possible barcode reading results.

Enumerator
Success 

Code was successfully read.

NothingFound 

No code was found in the area of interest.

SymbologyOnly 

A code symbology was detected in the area of interest but reading the code failed.

WrongCodeSize 

A code symbology was detected and decoded, but the code had an unexpected size that violates the limits of the symbology.

WrongCodeFormat 

A code symbology was detected and decoded, but the code turned out to have the wrong format.

ErrorDetectionFailed 

A code symbology was detected and decoded, but the error detection checks failed.

ColorNotCorrect 

A 2D Pharmacode uses and invalid color bar.

QuietzoneViolation 

A code symbology was detected and decoded but the code violates the quiet zone requirements.

Error 

An unspecified error occurred during code reading.

◆ EccLevelQr

enum class EccLevelQr
strong

ECC levels as used by QR codes.

Enumerator
NotDecodable 

The ECC level was not decodeable.

None 

No ECC information found.

ECC level L detected.

ECC level M detected.

ECC level Q detected.

ECC level H detected.

◆ FourStateAustralianLevels

enum class FourStateAustralianLevels
strong

Available level flags Four State Australian codes.

Enumerator
None 

No level information.

Custom 

Custom info.

Routing 

Routing.

ReplyPaid 

Reply paid.

Redirection 

Redirected.

Custom2 

Custom 2 info.

Custom3 

Custom 3 info.

Reserved 

Reserved.

All 

All levels.

◆ FourStateLsb

enum class FourStateLsb
strong

LSB settings for four state codes.

Enumerator
Left 

Left.

Bottom 

Bottom.

Right 

Right.

Top 

Top.

◆ GradeResult1DInfo

enum class GradeResult1DInfo
strong

Additional information about 1D grading results.

Enumerator
Ok 

Grading was successful and did yield a result.

NoResult 

Barcode could not be decoded, therefore no grading was calculated.

CodePositionOutsideAoi 

The Barcode is partly outside the AOI.

CodeHeightTooSmall 

The Barcode's height is too small for grading.

CodeNotRectangular 

The Barcode does not have a rectangular shape, making it unsuitable for grading.

GradingNotSupported 

Barcode grading is not supported for the encountered symbology.

Timeout 

Time limit reached during grading.

CodeTypeNotSupported 

An unsupported code type was encountered.

TooManyCharacters 

The code contained more characters than permitted for its symbology.

MeasuringOrificeNotSupported 

Orifice measurement is currently not supported.

AoiTooSmall 

The area of interest specified is too small to contain a valid code.

DecodabilityCheckFailed 

A code was found but considered to be undecodable.

PixelOutsideAoi 

Some pixels of the code are outside the specified area of interest.

BoundaryCheckFailed 

A boundary check failed.

TrimmingToParallelFailed 

Trimming failed.

ErrNoMaxFailed 

?

ECMinFailed 

?

◆ MsiPlesseyCheckDigit

enum class MsiPlesseyCheckDigit
strong

Available check digits for MSI Plessey codes.

Enumerator
None 

None.

Mod10 

Mod10.

Mod11 

Mod11.

Mod1010 

Mod10 10.

Mod1011 

Mod10 11.

◆ Pdf417Levels

enum class Pdf417Levels
strong

Available PDF417 levels.

Enumerator
Level0 

Level 0.

Level1 

Level 1.

Level2 

Level 2.

Level3 

Level 3.

Level4 

Level 4.

Level5 

Level 5.

Level6 

Level 6.

Level7 

Level 7.

Level8 

Level 8.

All 

All available levels.

◆ PharmaCode2DDisposition

enum class PharmaCode2DDisposition
strong

Expectation setting for Pharma Code 2D elements.

Enumerator
DontCare 

It won't matter whether or not the element is present.

Present 

The element should be present.

Miss 

The element should not be present.

◆ PharmaCodeRunDirection

enum class PharmaCodeRunDirection
strong

Run direction of Pharma Codes.

Enumerator
Right 

Code runs from left to right.

Up 

Code runs vertically up.

Left 

Code runs from right to left.

Down 

Code runs vertically down.

◆ PharmaCodeSkew

enum class PharmaCodeSkew
strong

Skew of the Pharma Code bars.

Enumerator
StrongRight 

Strongly skewed to the right.

ModerateRight 

Moderately skewed to the right.

None 

Not skewed.

ModerateLeft 

Moderately skewed to the left.

StrongLeft 

Strongly skewed to the left.

◆ PharmaCodeTolerance

enum class PharmaCodeTolerance
strong

Tolerance levels for Pharma Code reading acceptance checks.

Enumerator
Standard 

Standard tolerance level.

Extended 

Extended (= more relaxed) tolerance level.

◆ PlanetLevels

enum class PlanetLevels
strong

Available level flags for Planet codes.

Enumerator
None 

None.

Bars62 

62 bars.

Bars72 

72 bars.

All 

All available levels.

◆ PostnetLevels

enum class PostnetLevels
strong

Available level flags for Postnet codes.

Enumerator
None 

None.

Bars32 

32 bars.

Bars37 

37 bars.

Bars47 

47 bars.

Bars52 

52 bars.

Bars62 

62 bars.

All 

All available levels.

◆ QrMasking

enum class QrMasking
strong

Masking modes of QR codes.

Enumerator
Unknown 

Unknown mask mode.

Mode000 

Mask mode 000.

Mode001 

Mask mode 001.

Mode010 

Mask mode 010.

Mode011 

Mask mode 011.

Mode100 

Mask mode 100.

Mode101 

Mask mode 101.

Mode110 

Mask mode 110.

Mode111 

Mask mode 111.

◆ QrSubType

enum class QrSubType
strong

QR code types to read.

Enumerator
Mini 

Mini QR codes only.

Standard 

Standard QR codes only.

Both 

Both types of QR codes.

◆ ReaderInitialization

enum class ReaderInitialization
strong

Possible ways to initialize a Barcode reader.

Enumerator
ReadNone 

Initialize the reader to read no code.

ReadAll 

Initialize the reader to read all codes.

◆ Readout

enum class Readout
strong

Available readout modes.

Enumerator
Omnidirectional 

Read a barcode no matter what the orientation of the bars is.

Fence 

Read a barcode only if the bars are oriented vertically.

Ladder 

Read a barcode only if the bars are oriented horizontally.

FenceOrLadder 

Read a barcode if the bars are either oriented vertically or horizontally.

SmallCodes 

Expect the barcodes to be very small.

◆ RssComposition

enum class RssComposition
strong

Composition flags for RSS codes.

Enumerator
Off 

Composition off.

None 

No composition.

CCA 

CCA composition.

CCB 

CCB composition.

All 

All available compositions.

◆ RssTypes

enum class RssTypes
strong

Types of RSS codes to read.

Enumerator
Rss14 

RSS 14.

Rss14Truncated 

Truncated RSS 14.

Rss14Stacked 

Stacked RSS 14.

Rss14StackedOmnidirectional 

Stacked RSS 14 (omni directional reading).

Limited 

RSS Limited.

Expanded 

RSS Expanded.

ExpandedStacked 

RSS Expanded Stacked.

All 

All available types.

◆ Symbology

enum class Symbology
strong

The symbologies supported by Barcode.

Enumerator
None 

No symbology (e.g. if reading failed).

Code128 

Code 128 Barcode.

Codabar 

Codabar Barcode.

Ean13 

EAN 13 Barcode.

Ean8 

EAN 8 Barcode.

UpcA 

UPC-A Barcode.

UpcE 

UPC-E Barcode.

Pdf417 

PDF417 Matrix Code.

DataMatrix 

Data Matrix Code.

Code39 

Code 39 Barcode.

Code93 

Code 93 Barcode.

Discrete2of5 

2 of 5 Discrete Barcode

Interleaved2of5 

2 of 5 Interleaved Barcode

Code32 

Code 32 Barcode.

PharmaCode 

PharmaCode Barcode.

PharmaCode2D 

PharmaCode Matrix Code.

SonyCode 

SonyCode Barcode.

RSS 

RSS Barcode.

FourStateKix 

Four State KIX Barcode.

Postnet 

Postnet Barcode.

Planet 

Planet Barcode.

Qr 

QR Matrix Code.

FourStateRoyalMail 

Four State Royal Mail Barcode.

FourStateAustralian 

Four State Australian Barcode.

FourStateUsps 

Four State USPS Barcode.

MicroPdf417 

Micro PDF417 Matrix Code.

MsiPlessey 

MSI Plessey Barcode.

Code11 

Code 11 Barcode.

BarcodeGrading 

1D Barcode grading

DataMatrixGrading 

DataMatrix grading.

QrGrading 

QR code grading.