CVBpy 15.0
DataMatrix Class Reference

Configuration class for Data Matrix codes. More...

Public Member Functions

cvb.code_reader.DataMatrix disable (self)
 Disables decoding.
 
cvb.code_reader.DataMatrix enable (self)
 Enables decoding.
 

Properties

 is_enabled = property
 bool: Checks if decoding is enabled.
 
 is_mirroring_enabled = property
 bool: Gets or sets the status of the mirroring feature.
 
 max_line_filter_size = property
 int: Gets or sets the maximum line filter size in pixels.
 
 max_module_size = property
 int: Gets or sets the maximum module size of Data Matrix in pixels.
 
 max_number_modules = property
 int: Gets or sets the maximum number of Data Matrix column modules.
 
 maximum_size = property
 int: Gets or sets the maximum Data Matrix size.
 
 min_number_modules = property
 int: Gets or sets the minimum number of Data Matrix column modules.
 
 minimum_size = property
 int: Gets or sets the minimum Data Matrix size.
 
 polarity = property
 int: Gets or sets the polarity mode for decoding (see cvb.code_reader.Polarity).
 
 rectangular_decoding = property
 int: Gets or sets the rectangular decoding mode (see cvb.code_reader.RectangularDecoding).
 

Detailed Description

Configuration class for Data Matrix codes.

Use this class to configure decoding options for Data Matrix codes. To access the configuration and enable decoding Data Matrix codes, use the following example. For additional details on configuration, refer to the documentation for Decoder.config().

decoder.config(cvb.code_reader.Symbology.DataMatrix).enable()
cvb.code_reader.Decoder create()
Creates and returns a new decoder object.
Definition __init__.py:182

A more comprehensive code example demonstrating configuration in a broader context, as well as the decoding process, can be found here.

Note, that ECC0-140 is not supported.

Member Function Documentation

◆ disable()

cvb.code_reader.DataMatrix disable ( self)

Disables decoding.

Returns

cvb.code_reader.DataMatrix A reference to the current configuration object for method chaining.

◆ enable()

Enables decoding.

Returns

cvb.code_reader.DataMatrix A reference to the current configuration object for method chaining.

Property Documentation

◆ is_enabled

is_enabled = property
static

bool: Checks if decoding is enabled.

True if decoding is enabled, False otherwise.

◆ is_mirroring_enabled

is_mirroring_enabled = property
static

bool: Gets or sets the status of the mirroring feature.

True if the mirroring feature is enabled, False otherwise.

◆ max_line_filter_size

max_line_filter_size = property
static

int: Gets or sets the maximum line filter size in pixels.

The default value is 0. Setting it to a larger value will help filter out line patterns that are notpart of the Data Matrix borders, and speed up Data Matrix locating with background clutter. Valid values range from 0 to 36 pixels.

◆ max_module_size

max_module_size = property
static

int: Gets or sets the maximum module size of Data Matrix in pixels.

The default value is 100 pixels. Setting it to a smaller value sufficient for decoding all possible Data Matrix sizes in the image may speed up Data Matrix locating with background clutter. Valid values range from 2 to 100 pixels.

◆ max_number_modules

max_number_modules = property
static

int: Gets or sets the maximum number of Data Matrix column modules.

The default value is 144 for the 144x144 Data Matrix. Setting it to the largest column number of the Data Matrix in the image may speed up Data Matrix locating with background clutter. Valid values range from 10 to 144 pixels.

◆ maximum_size

maximum_size = property
static

int: Gets or sets the maximum Data Matrix size.

TThe default value is 2048 pixel. Setting to a lower value that is slightly greater than the biggest Data Matrix in the image may speed up Data Matrix locating with background clutter. Valid values range from 0 to 2048 pixels.

◆ min_number_modules

min_number_modules = property
static

int: Gets or sets the minimum number of Data Matrix column modules.

The default value is 10 for the 10x10 Data Matrix. Setting it to the smallest column number of the Data Matrix in the image may speed up Data Matrix locating with background clutter. Valid values range from 10 to 144 pixels.

◆ minimum_size

minimum_size = property
static

int: Gets or sets the minimum Data Matrix size.

The default value is 0 pixel. Setting to a higher value that is slightly smaller than the smallest Data Matrix in the image may speed up Data Matrix locating with background clutter. Valid values range from 0 to 2048 pixels.