CVBpy 14.0
ReaderConfig Class Reference

Contains a map of configurations for all active barcode types. More...

Inherits object.

Public Member Functions

bool contains_symbology (self, int symbology)
 Creates a new configuration for the object. More...
 
Union[cvb.barcode.Code128, cvb.barcode.Codabar, cvb.barcode.Ean13, cvb.barcode.Ean8, cvb.barcode.UpcA, cvb.barcode.UpcE, cvb.barcode.Pdf417, cvb.barcode.DataMatrix, cvb.barcode.Code39, cvb.barcode.Code93, cvb.barcode.Discrete2of5, cvb.barcode.Interleaved2of5, cvb.barcode.Code32, cvb.barcode.PharmaCode, cvb.barcode.SonyCode, cvb.barcode.Rss, cvb.barcode.FourStateKix, cvb.barcode.Postnet, cvb.barcode.Planet, cvb.barcode.Qr, cvb.barcode.FourStateRoyalMail, cvb.barcode.FourStateAustralian, cvb.barcode.FourStateUsps, cvb.barcode.MicroPdf417, cvb.barcode.MsiPlessey, cvb.barcode.Code11, cvb.barcode.BarcodeGrading, cvb.barcode.DataMatrixGrading, cvb.barcode.QrGradingcreate_configuration (self, Union[cvb.barcode.Code128, cvb.barcode.Codabar, cvb.barcode.Ean13, cvb.barcode.Ean8, cvb.barcode.UpcA, cvb.barcode.UpcE, cvb.barcode.Pdf417, cvb.barcode.DataMatrix, cvb.barcode.Code39, cvb.barcode.Code93, cvb.barcode.Discrete2of5, cvb.barcode.Interleaved2of5, cvb.barcode.Code32, cvb.barcode.PharmaCode, cvb.barcode.SonyCode, cvb.barcode.Rss, cvb.barcode.FourStateKix, cvb.barcode.Postnet, cvb.barcode.Planet, cvb.barcode.Qr, cvb.barcode.FourStateRoyalMail, cvb.barcode.FourStateAustralian, cvb.barcode.FourStateUsps, cvb.barcode.MicroPdf417, cvb.barcode.MsiPlessey, cvb.barcode.Code11, cvb.barcode.BarcodeGrading, cvb.barcode.DataMatrixGrading, cvb.barcode.QrGrading] config_type)
 Creates a new configuration for the object. More...
 
cvb.barcode.ReaderConfig load (str file_name)
 Reads the configuration data from file_name. More...
 
None save (self, str file_name)
 Writes the data of the configuration to file_name. More...
 

Properties

 check_code_position = property
 bool: Enables and disables the code position check configuration. More...
 
 omni_directional_readout_angle_count = property
 int: Absolute number of profile rotations. More...
 
 omni_directional_readout_stripe_count = property
 int: Absolute number of profile lines. More...
 
 readout_mode = property
 int: Readout mode.
 
 readout_stripe_distance = property
 int: Distance between lines in pixel. More...
 
 time_limit = property
 int: Maximum evaluation time in milliseconds for the decoding of a barcode. More...
 

Detailed Description

Contains a map of configurations for all active barcode types.

Constructor to initialize object.

Parameters

init_mode : int Specifies whether all or no barcodes are to be initially permitted (see cvb.barcode.ReaderInitialization).

Member Function Documentation

◆ contains_symbology()

bool contains_symbology (   self,
int  symbology 
)

Creates a new configuration for the object.

Check if the object contains the given symbology.

Parameters

symbology : int Symbology to check if it is available (see cvb.barcode.Symbology).

Returns

bool Returns true in case the symbology is available in the map. Otherwise false.

◆ create_configuration()

Creates a new configuration for the object.

In case the requested configuration already exists, this configuration is returned. Otherwise creates a new configuration, adds it to the map and returns it.

Parameters

config_type : Union[cvb.barcode.Code128, cvb.barcode.Codabar, cvb.barcode.Ean13, cvb.barcode.Ean8, cvb.barcode.UpcA, cvb.barcode.UpcE, cvb.barcode.Pdf417, cvb.barcode.DataMatrix, cvb.barcode.Code39, cvb.barcode.Code93, cvb.barcode.Discrete2of5, cvb.barcode.Interleaved2of5, cvb.barcode.Code32, cvb.barcode.PharmaCode, cvb.barcode.SonyCode, cvb.barcode.Rss, cvb.barcode.FourStateKix, cvb.barcode.Postnet, cvb.barcode.Planet, cvb.barcode.Qr, cvb.barcode.FourStateRoyalMail, cvb.barcode.FourStateAustralian, cvb.barcode.FourStateUsps, cvb.barcode.MicroPdf417, cvb.barcode.MsiPlessey, cvb.barcode.Code11, cvb.barcode.BarcodeGrading, cvb.barcode.DataMatrixGrading, cvb.barcode.QrGrading] An inherited type of cvb.barcode.ConfigBase.

Returns

Union[cvb.barcode.Code128, cvb.barcode.Codabar, cvb.barcode.Ean13, cvb.barcode.Ean8, cvb.barcode.UpcA, cvb.barcode.UpcE, cvb.barcode.Pdf417, cvb.barcode.DataMatrix, cvb.barcode.Code39, cvb.barcode.Code93, cvb.barcode.Discrete2of5, cvb.barcode.Interleaved2of5, cvb.barcode.Code32, cvb.barcode.PharmaCode, cvb.barcode.SonyCode, cvb.barcode.Rss, cvb.barcode.FourStateKix, cvb.barcode.Postnet, cvb.barcode.Planet, cvb.barcode.Qr, cvb.barcode.FourStateRoyalMail, cvb.barcode.FourStateAustralian, cvb.barcode.FourStateUsps, cvb.barcode.MicroPdf417, cvb.barcode.MsiPlessey, cvb.barcode.Code11, cvb.barcode.BarcodeGrading, cvb.barcode.DataMatrixGrading, cvb.barcode.QrGrading] Initialized ReaderConfig object from file. Datatype is the given parameter config_type.

◆ load()

cvb.barcode.ReaderConfig load ( str  file_name)

Reads the configuration data from file_name.

Parameters

file_name : str Name of the file, possibly with path specification.

Returns

cvb.barcode.ReaderConfig Initialized ReaderConfig object from file.

◆ save()

None save (   self,
str  file_name 
)

Writes the data of the configuration to file_name.

The data is stored in an ASCII format which is based on the format of the Windows INI files.If necessary, it can be edited using a simple ASCII editor.

Parameters

file_name : str Name of the file, possibly with path specification.

Property Documentation

◆ check_code_position

check_code_position = property
static

bool: Enables and disables the code position check configuration.

An edge can have its coordinates outside the image borders in case the barcode is incomplete.

◆ omni_directional_readout_angle_count

omni_directional_readout_angle_count = property
static

int: Absolute number of profile rotations.

Number of readout angles (only used in omni directional readout mode).

◆ omni_directional_readout_stripe_count

omni_directional_readout_stripe_count = property
static

int: Absolute number of profile lines.

Number of readout stripes (only used in omni directional readout mode).

◆ readout_stripe_distance

readout_stripe_distance = property
static

int: Distance between lines in pixel.

The Readout definition for the readout modes Ladder, Fence and FenceOrLadder.

◆ time_limit

time_limit = property
static

int: Maximum evaluation time in milliseconds for the decoding of a barcode.

When the configuration cannot be concluded in this time, the function Decode throws an exception even if the code is present in the image.