eVision C++ API 26.10.0-beta.2.dev
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...

#include <eVision/EasyMatrixCode/EasyMatrixCode1/EMatrixCodeReader.h>

Collaboration diagram for eVision::EMatrixCodeReader:

Public Member Functions

 EMatrixCodeReader ()
 Default constructor for EMatrixCodeReader objects.
virtual ~EMatrixCodeReader () throw ()
eVision::EMatrixCode Read (const 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 (const eVision::EROIBW8 &roi)
 Tries to locate, decode and read the Data Matrix code in the given ROI.
eVision::EMatrixCode LearnMore (const 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 (const std::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 (const std::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.
eVision::ESearchParamsType & GetSearchParams ()
 Parameter space that the algorithm uses to read a Data Matrix code from an ROI.
bool GetComputeGrading ()
 Allows to choose whether the grading properties of the EMatrixCode object will be computed by the EMatrixCodeReader::Reset, EMatrixCodeReader::Read or EMatrixCodeReader::LearnMore methods.
void SetComputeGrading (bool value)
 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 GetMinimumPrintGrowth ()
 Minimum reference value in use for normalization of the PrintGrowth quality indicator.
void SetMinimumPrintGrowth (float value)
 Minimum reference value in use for normalization of the PrintGrowth quality indicator.
float GetMaximumPrintGrowth ()
 Maximum reference value in use for normalization of the PrintGrowth quality indicator.
void SetMaximumPrintGrowth (float value)
 Maximum reference value in use for normalization of the PrintGrowth quality indicator.
float GetNominalPrintGrowth ()
 Nominal reference value in use for normalization of the PrintGrowth quality indicator.
void SetNominalPrintGrowth (float value)
 Nominal reference value in use for normalization of the PrintGrowth quality indicator.
uint32_t GetTimeOut ()
 Time-out for the EMatrixCodeReader::Learn, EMatrixCodeReader::LearnMore and EMatrixCodeReader::Read methods.
void SetTimeOut (uint32_t value)
 Time-out for the EMatrixCodeReader::Learn, EMatrixCodeReader::LearnMore and EMatrixCodeReader::Read methods.
void SetMaxHeightWidthRatio (float value)
 Maximum value for a Data Matrix aspect ratio.
float GetMaxHeightWidthRatio ()
 Maximum value for a Data Matrix aspect ratio.
void SetIso29158CalibrationParameters (float Rcal, float MLcal, float SRcal, float SRtarget)
 Sets ISO/IEC 29158 calibration paramters.
 EMatrixCodeReader (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

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::GetSearchParams, 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() [1/2]

eVision::EMatrixCodeReader::EMatrixCodeReader ( )

Default constructor for EMatrixCodeReader objects.

◆ ~EMatrixCodeReader()

eVision::EMatrixCodeReader::~EMatrixCodeReader ( )
throw ( )
virtual

◆ EMatrixCodeReader() [2/2]

eVision::EMatrixCodeReader::EMatrixCodeReader ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ GetComputeGrading()

bool eVision::EMatrixCodeReader::GetComputeGrading ( )

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.

◆ 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

◆ GetMaxHeightWidthRatio()

float eVision::EMatrixCodeReader::GetMaxHeightWidthRatio ( )

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.

◆ GetMaximumPrintGrowth()

float eVision::EMatrixCodeReader::GetMaximumPrintGrowth ( )

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.

◆ GetMinimumPrintGrowth()

float eVision::EMatrixCodeReader::GetMinimumPrintGrowth ( )

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.

◆ GetNominalPrintGrowth()

float eVision::EMatrixCodeReader::GetNominalPrintGrowth ( )

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.

◆ GetSearchParams()

eVision::ESearchParamsType & eVision::EMatrixCodeReader::GetSearchParams ( )

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::GetSearchParams properties and methods.

◆ GetTimeOut()

uint32_t eVision::EMatrixCodeReader::GetTimeOut ( )

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.

◆ Learn()

eVision::EMatrixCode eVision::EMatrixCodeReader::Learn ( const 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::GetFound property for information about the outcome of the Learn process.

◆ LearnMore()

eVision::EMatrixCode eVision::EMatrixCodeReader::LearnMore ( const 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::GetFound property for information about the outcome of the LearnMore process.

◆ Load() [1/2]

void eVision::EMatrixCodeReader::Load ( const std::string & path)

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

Parameters
pathA string containing the full path to the file.

◆ Load() [2/2]

void eVision::EMatrixCodeReader::Load ( eVision::ESerializer * serializer)

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

Parameters
serializerThe serializer.

◆ Read()

eVision::EMatrixCode eVision::EMatrixCodeReader::Read ( const 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::GetFound 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 ( const std::string & path)

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

Parameters
pathA string containing the full path to the file.

◆ Save() [2/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.

◆ SetComputeGrading()

void eVision::EMatrixCodeReader::SetComputeGrading ( bool value)

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.

◆ 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.

◆ SetMaxHeightWidthRatio()

void eVision::EMatrixCodeReader::SetMaxHeightWidthRatio ( float value)

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.

◆ SetMaximumPrintGrowth()

void eVision::EMatrixCodeReader::SetMaximumPrintGrowth ( float value)

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.

◆ SetMinimumPrintGrowth()

void eVision::EMatrixCodeReader::SetMinimumPrintGrowth ( float value)

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.

◆ SetNominalPrintGrowth()

void eVision::EMatrixCodeReader::SetNominalPrintGrowth ( float value)

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.

◆ SetTimeOut()

void eVision::EMatrixCodeReader::SetTimeOut ( uint32_t value)

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.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EMatrixCodeReader::wrappedClass_