eVision .NET API
Loading...
Searching...
No Matches
eVision.EMatrixCodeReader Class Reference

A EMatrixCodeReader.EMatrixCodeReader instance is a tool that processes an ROI and returns a EMatrixCode instance. More...

Inheritance diagram for eVision.EMatrixCodeReader:
Collaboration diagram for eVision.EMatrixCodeReader:

Public Member Functions

 EMatrixCodeReader ()
 Default constructor for EMatrixCodeReader objects.
eVision.EMatrixCode Read (eVision.EROIBW8 roi)
 Tries to locate, decode and read the Data Matrix code in the given ROI.
void Reset ()
 Resets the parameter search space to its default: the full range of all parameters.
eVision.EMatrixCode Learn (eVision.EROIBW8 roi)
 Tries to locate, decode and read the Data Matrix code in the given ROI.
eVision.EMatrixCode LearnMore (eVision.EROIBW8 roi)
 Tries to locate, decode and read the Data Matrix code in the given ROI.
void Load (eVision.ESerializer serializer)
 Saves a EMatrixCodeReader. The given ESerializer must have been created for writing.
void Load (string path)
 Saves a EMatrixCodeReader. The given ESerializer must have been created for writing.
void Save (eVision.ESerializer serializer)
 Loads a EMatrixCodeReader. The given ESerializer must have been created for reading.
void Save (string path)
 Loads a EMatrixCodeReader. The given ESerializer must have been created for reading.
void SetLearnMaskElement (eVision.ELearnParam index, bool value)
 Allows to choose which decoded parameters are learnt when the EMatrixCodeReader.Learn or EMatrixCodeReader.LearnMore methods are called.
bool GetLearnMaskElement (eVision.ELearnParam index)
 Allows to know which decoded parameters are learnt when the EMatrixCodeReader.Learn or EMatrixCodeReader.LearnMore methods are called.
void SetIso29158CalibrationParameters (float Rcal, float MLcal, float SRcal, float SRtarget)
 Sets ISO/IEC 29158 calibration paramters.

Properties

eVision.ESearchParamsType SearchParams [get]
 Parameter space that the algorithm uses to read a Data Matrix code from an ROI.
bool ComputeGrading [get, set]
 Allows to choose whether the grading properties of the EMatrixCode object will be computed by the EMatrixCodeReader.Reset, EMatrixCodeReader.Read or EMatrixCodeReader.LearnMore methods.
float MinimumPrintGrowth [get, set]
 Minimum reference value in use for normalization of the PrintGrowth quality indicator.
float MaximumPrintGrowth [get, set]
 Maximum reference value in use for normalization of the PrintGrowth quality indicator.
float NominalPrintGrowth [get, set]
 Nominal reference value in use for normalization of the PrintGrowth quality indicator.
uint TimeOut [get, set]
 Time-out for the EMatrixCodeReader.Learn, EMatrixCodeReader.LearnMore and EMatrixCodeReader.Read methods.
float MaxHeightWidthRatio [get, set]
 Maximum value for a Data Matrix aspect ratio.

Detailed Description

A EMatrixCodeReader.EMatrixCodeReader instance is a tool that processes an ROI and returns a EMatrixCode instance.

A EMatrixCodeReader.EMatrixCodeReader has properties that allow customizing the reading process. One of these properties is EMatrixCodeReader.SearchParams, which is an instance of ESearchParamsType. This object embeds the parameter space where a Data Matrix code will be searched and has an interface of its own. The EMatrixCodeReader.EMatrixCodeReader class is found in the Euresys namespace

License(s): EasyMatrixCode

Deprecated

Deprecated, use EMatrixCodeReader instead.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

Constructor & Destructor Documentation

◆ EMatrixCodeReader()

eVision.EMatrixCodeReader.EMatrixCodeReader ( )

Default constructor for EMatrixCodeReader objects.

Member Function Documentation

◆ GetLearnMaskElement()

bool eVision.EMatrixCodeReader.GetLearnMaskElement ( eVision.ELearnParam index)

Allows to know which decoded parameters are learnt when the EMatrixCodeReader.Learn or EMatrixCodeReader.LearnMore methods are called.

Parameters
indexParameter identifier, as defined in ELearnParam

◆ Learn()

eVision.EMatrixCode eVision.EMatrixCodeReader.Learn ( eVision.EROIBW8 roi)

Tries to locate, decode and read the Data Matrix code in the given ROI.

Parameters
roiROI in which the Data Matrix has to be found.

If successful, it adds the parameters of the Data Matrix code found into the internal learning database. The decoding results can be found in the returned EMatrixCode object. The addition of the parameters of the Data Matrix code found into the internal learning database means that subsequent Read operations will be faster, but can only be performed on similar Data Matrix codes/conditions. Only the parameters that are tagged for learning are remembered for the subsequent EMatrixCodeReader.Read operations (see EMatrixCodeReader.SetLearnMaskElement). See the EMatrixCode.Found property for information about the outcome of the Learn process.

◆ LearnMore()

eVision.EMatrixCode eVision.EMatrixCodeReader.LearnMore ( eVision.EROIBW8 roi)

Tries to locate, decode and read the Data Matrix code in the given ROI.

Parameters
roiROI in which the Data Matrix has to be found.

If successful, it cumulates the parameters of the Data Matrix code found with those already present in the internal learning database. The decoding results can be found in the returned EMatrixCode object. The cumulation of the parameters of the Data Matrix code found with those already present in the internal learning database means that subsequent Read operations will be faster, but can only be performed on similar Data Matrix codes/conditions. Only the parameters that are tagged for learning are remembered for the subsequent EMatrixCodeReader.Read operations (see EMatrixCodeReader.SetLearnMaskElement). See the EMatrixCode.Found property for information about the outcome of the LearnMore process.

◆ Load() [1/2]

void eVision.EMatrixCodeReader.Load ( eVision.ESerializer serializer)

Saves a EMatrixCodeReader. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ Load() [2/2]

void eVision.EMatrixCodeReader.Load ( string path)

Saves a EMatrixCodeReader. The given ESerializer must have been created for writing.

Parameters
pathA string containing the full path to the file.

◆ Read()

eVision.EMatrixCode eVision.EMatrixCodeReader.Read ( eVision.EROIBW8 roi)

Tries to locate, decode and read the Data Matrix code in the given ROI.

Parameters
roiROI in which the Data Matrix has to be found.

The decoding results can be found in the returned EMatrixCode object. See the EMatrixCode.Found property for information about the outcome of the Read process.

Note
This function throws an exception if the matrix code in the given ROI can not be read.

◆ Reset()

void eVision.EMatrixCodeReader.Reset ( )

Resets the parameter search space to its default: the full range of all parameters.

This does not modify the learning mask.

◆ Save() [1/2]

void eVision.EMatrixCodeReader.Save ( eVision.ESerializer serializer)

Loads a EMatrixCodeReader. The given ESerializer must have been created for reading.

Parameters
serializerThe ESerializer object that is read from.

◆ Save() [2/2]

void eVision.EMatrixCodeReader.Save ( string path)

Loads a EMatrixCodeReader. The given ESerializer must have been created for reading.

Parameters
pathA string containing the full path to the file.

◆ SetIso29158CalibrationParameters()

void eVision.EMatrixCodeReader.SetIso29158CalibrationParameters ( float Rcal,
float MLcal,
float SRcal,
float SRtarget )

Sets ISO/IEC 29158 calibration paramters.

Parameters
RcalReported reflectance value, from a calibration standard.
MLcalMean of the light from a histogram of the calibrated standard.
SRcalSystem response parameters(such as exposure and/or again) used to create an image of the calibration standard.
SRtargetSystem response parameters(such as exposure and/or again) used to create an image of the symbole under test.

◆ SetLearnMaskElement()

void eVision.EMatrixCodeReader.SetLearnMaskElement ( eVision.ELearnParam index,
bool value )

Allows to choose which decoded parameters are learnt when the EMatrixCodeReader.Learn or EMatrixCodeReader.LearnMore methods are called.

Parameters
indexParameter identifier, as defined in ELearnParam.
valuetrue to enable the parameter for learning.

In order to enable a parameter for learning, you need to set corresponding item of LearnMask to true. Default: all items are set to true.

Property Documentation

◆ ComputeGrading

bool eVision.EMatrixCodeReader.ComputeGrading
getset

Allows to choose whether the grading properties of the EMatrixCode object will be computed by the EMatrixCodeReader.Reset, EMatrixCodeReader.Read or EMatrixCodeReader.LearnMore methods.

Default: false.

◆ MaxHeightWidthRatio

float eVision.EMatrixCodeReader.MaxHeightWidthRatio
getset

Maximum value for a Data Matrix aspect ratio.

This property allows controlling what kind of objects are considered as potential MatrixCode instances in the image. When objects are found in the image, only those where the bounding box has an aspect ratio smaller than this value are taken into account for digitization and decoding. The default value is 3.8, and should be adjusted if the MatrixCode cells in your image are non-square, or if your matrix code uses a very non-square symbology such as 32x8. The supplied value must lie between 0.0 and 5.0.

◆ MaximumPrintGrowth

float eVision.EMatrixCodeReader.MaximumPrintGrowth
getset

Maximum reference value in use for normalization of the PrintGrowth quality indicator.

Default: 2.0. After the standard, parameter PrintGrowth must be computed as normalized value related to three references: minimum, nominal and maximum values have to be provided. Parameter MeasuredPrintGrowth is the raw, un-normalized print quality parameter. It is computed as the measured area of the active cells over the area of ideal square cells, having sides equal to the pitches (such cells perfectly tile the symbol). Its value typically is on the order of unity. The PrintGrowth is derived from the MeasuredPrintGrowth by means of the three normalization parameters.

◆ MinimumPrintGrowth

float eVision.EMatrixCodeReader.MinimumPrintGrowth
getset

Minimum reference value in use for normalization of the PrintGrowth quality indicator.

Default: 0.0. After the standard, parameter PrintGrowth must be computed as normalized value related to three references: minimum, nominal and maximum values have to be provided. Parameter MeasuredPrintGrowth is the raw, un-normalized print quality parameter. It is computed as the measured area of the active cells over the area of ideal square cells, having sides equal to the pitches (such cells perfectly tile the symbol). Its value typically is on the order of unity. The PrintGrowth is derived from the MeasuredPrintGrowth by means of the three normalization parameters.

◆ NominalPrintGrowth

float eVision.EMatrixCodeReader.NominalPrintGrowth
getset

Nominal reference value in use for normalization of the PrintGrowth quality indicator.

Default: 1.0. After the standard, parameter PrintGrowth must be computed as normalized value related to three references: minimum, nominal and maximum values have to be provided. Parameter MeasuredPrintGrowth is the raw, un-normalized print quality parameter. It is computed as the measured area of the active cells over the area of ideal square cells, having sides equal to the pitches (such cells perfectly tile the symbol). Its value typically is on the order of unity. The PrintGrowth is derived from the MeasuredPrintGrowth by means of the three normalization parameters.

◆ SearchParams

eVision.ESearchParamsType eVision.EMatrixCodeReader.SearchParams
get

Parameter space that the algorithm uses to read a Data Matrix code from an ROI.

It can be modified through automatic learning (using the EMatrixCodeReader.Learn or EMatrixCodeReader.LearnMore methods) or by using EMatrixCodeReader.SearchParams properties and methods.

◆ TimeOut

uint eVision.EMatrixCodeReader.TimeOut
getset

Time-out for the EMatrixCodeReader.Learn, EMatrixCodeReader.LearnMore and EMatrixCodeReader.Read methods.

If the processing time of one of these functions becomes longer than the set time-out, the processing is stopped and an exception is thrown. In that case, the error code of the exception is EError.EError_TimeoutReached. The time-out is set in microseconds. This time-out is not a real time-out. The processing is stopped as soon as possible after the time-out has been reached. This means that the time elapsed effectively in the method can be greater than the time-out in itself.