eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EasyBarCode2::EBarCodeReader Class Reference

Represents a 1D Bar Code Reading Context. More...

#include <eVision/EasyBarCode/EasyBarCode2/EBarCodeReader.h>

Collaboration diagram for eVision::EasyBarCode2::EBarCodeReader:

Public Member Functions

 EBarCodeReader ()
 Constructs a EBarCodeReader context.
 EBarCodeReader (const eVision::EasyBarCode2::EBarCodeReader &other)
 Constructs a EBarCodeReader context.
virtual ~EBarCodeReader () throw ()
eVision::EasyBarCode2::EBarCodeReader & operator= (const eVision::EasyBarCode2::EBarCodeReader &other)
 Copies all the data from another EBarCodeReader object into the current EBarCodeReader object.
float Learn (const std::vector< eVision::EROIBW8 * > &rois, bool keepDefaultScales, bool addAllScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EROIBW8 * > &rois, bool keepDefaultScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EROIBW8 * > &rois)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 * > &images, bool keepDefaultScales, bool addAllScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 * > &images, bool keepDefaultScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 * > &images)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EROIBW8 > &rois, bool keepDefaultScales, bool addAllScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EROIBW8 > &rois, bool keepDefaultScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EROIBW8 > &rois)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 > &images, bool keepDefaultScales, bool addAllScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 > &images, bool keepDefaultScales)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
float Learn (const std::vector< eVision::EImageBW8 > &images)
 Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.
void ResetLearning ()
 Forgets the learned parameter settings and resets them to their default values.
bool GetLearningPerformed () const
 Returns whether a learning has been performed on the EBarCodeReader.
std::vector< eVision::EasyBarCode2::EBarCode > Read (const eVision::EROIBW8 &img) const
 Finds and reads all the barcodes in the provided Image/ROI.
std::vector< eVision::EasyBarCode2::EBarCode > Read (const eVision::EROIBW8 &img, const eVision::EFrame &frame) const
 Finds and reads all the barcodes in the provided Image/ROI.
std::vector< eVision::EasyBarCode2::EBarCode > Read (const eVision::EROIBW8 &img, const eVision::ERegion &region) const
 Finds and reads all the barcodes in the provided Image/ROI.
std::vector< eVision::EasyBarCode2::EBarCode > Read (const eVision::EROIBW8 &img, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, int32_t numCellsX, int32_t numCellsY, float extension) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, int32_t numCellsX, int32_t numCellsY) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, int32_t numCellsX, int32_t numCellsY, float extension) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, int32_t numCellsX, int32_t numCellsY) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EasyBarCode2::EBarCodeGrid &grid, float extension) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EasyBarCode2::EBarCodeGrid &grid) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, const eVision::EasyBarCode2::EBarCodeGrid &grid, float extension) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, const eVision::EasyBarCode2::EBarCodeGrid &grid) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::EGrid &grid) const
 Finds and reads all the barcodes in the provided Image/ROI.
eVision::EasyBarCode2::EBarCodeGrid Read (const eVision::EROIBW8 &img, const eVision::EGrid &grid, const eVision::EFrame &frame) const
 Finds and reads all the barcodes in the provided Image/ROI.
uint32_t GetMaxNumCodes () const
 Maximum number of barcodes to find in a single Image/ROI.
void SetMaxNumCodes (uint32_t max)
 Maximum number of barcodes to find in a single Image/ROI.
bool GetValidateWithChecksum () const
 Enables/Disables all barcode validations.
void SetValidateWithChecksum (bool validate)
 Enables/Disables all barcode validations.
bool GetValidateBarCode () const
 Enables/Disables all barcode validations.
void SetValidateBarCode (bool validate)
 Enables/Disables all barcode validations.
bool GetValidateMandatoryChecksum () const
 Enables/Disables checksum validation for all symbologies for which a checksum is mandatory, for example EBarCodeSymbologies::EBarCodeSymbologies_Code128.
void SetValidateMandatoryChecksum (bool validate)
 Enables/Disables checksum validation for all symbologies for which a checksum is mandatory, for example EBarCodeSymbologies::EBarCodeSymbologies_Code128.
bool GetValidateOptionalChecksum () const
 Enables/Disables checksum validation for all symbologies for which a checksum is optional, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39.
void SetValidateOptionalChecksum (bool validate)
 Enables/Disables checksum validation for all symbologies for which a checksum is optional, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39.
bool GetValidatePharmacode () const
 Enables/Disables validation for the EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack symbology.
void SetValidatePharmacode (bool validate)
 Enables/Disables validation for the EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack symbology.
void EnableSymbology (eVision::EasyBarCode2::EBarCodeSymbologies symbology)
 Enables a single symbology.
void EnableSymbologies (const std::vector< eVision::EasyBarCode2::EBarCodeSymbologies > &symbologies)
 Enables a set of symbologies.
void EnableAllSymbologies ()
 Enables all supported symbologies, with the exception of EBarCodeSymbologies::EBarCodeSymbologies_PDF417, EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode because they might degrade the detection of other symbologies or generate false positives.
void EnableSafeSymbologies ()
 Enables all supported symbologies that do not degrade the detection of other symbologies or generate false positives. That is, all with the exception of EBarCodeSymbologies::EBarCodeSymbologies_PDF417, EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode.
void EnableDefaultSymbologies ()
 Enables default symbologies.
std::vector< eVision::EasyBarCode2::EBarCodeSymbologies > GetEnabledSymbologies () const
 Enabled symbologies.
void DisableAllSymbologies ()
 Disables all symbologies.
uint64_t GetTimeOut () const
 Time-out for the EBarCodeReader::Read method.
void SetTimeOut (uint64_t value)
 Time-out for the EBarCodeReader::Read method.
void Save (const std::string &file)
 Save the reader configuration.
void Save (eVision::ESerializer *serializer)
 Save the reader configuration.
void Load (const std::string &file)
 Load the reader configuration.
void Load (eVision::ESerializer *serializer)
 Load the reader configuration.
void SetMinModuleSize (float minModuleSize)
 Parameter used before version 24.10. It has currently no effect.
float GetMinModuleSize () const
 Parameter used before version 24.10. It has currently no effect.
void SetUseMinModuleSize (bool useMinModuleSize)
 Parameter used before version 24.10. It has currently no effect.
bool GetUseMinModuleSize () const
 Parameter used before version 24.10. It has currently no effect.
void SetEnablePermissiveDecoding (bool enable)
 Enables or disables the decoding of codes containing partially incorrect information.
bool GetEnablePermissiveDecoding () const
 Enables or disables the decoding of codes containing partially incorrect information.
void SetEnablePatternCorrection (bool enable)
 Enables or disables the correction of patterns incorrectly decoded. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.
bool GetEnablePatternCorrection () const
 Enables or disables the correction of patterns incorrectly decoded. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.
void SetEnableAdvancedDecoding (bool enable)
 Enables or disables some advanced decoding for the EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13 symbologies specifically.
bool GetEnableAdvancedDecoding () const
 Enables or disables some advanced decoding for the EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13 symbologies specifically.
void SetEnablePrintingErrorCorrection (bool enable)
 Enables or disables the correction of patterns incorrectly printed. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.
bool GetEnablePrintingErrorCorrection () const
 Enables or disables the correction of patterns incorrectly printed. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.
void SetReadingOrientation (eVision::EasyBarCode2::EReadingOrientation orientation)
 Some symbologies do not specify start and stop patterns, namely: EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode. In these cases, we do not know if we should decode the barcode from left to right or from right to left. EBarCodeReader::SetReadingOrientation solves this problem.
eVision::EasyBarCode2::EReadingOrientation GetReadingOrientation () const
 Some symbologies do not specify start and stop patterns, namely: EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode. In these cases, we do not know if we should decode the barcode from left to right or from right to left. EBarCodeReader::SetReadingOrientation solves this problem.
void SetComputeGrading (bool enable)
 Enables or disables the computation of the grades of the read barcodes according to ISO 15416.
bool GetComputeGrading () const
 Enables or disables the computation of the grades of the read barcodes according to ISO 15416.
 EBarCodeReader (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a 1D Bar Code Reading Context.

License(s): EasyBarCode

Constructor & Destructor Documentation

◆ EBarCodeReader() [1/3]

eVision::EasyBarCode2::EBarCodeReader::EBarCodeReader ( )

Constructs a EBarCodeReader context.

The default constructor constructs an uninitialized EBarCodeReader object. All properties are initialized to their respective default values. The copy constructor constructs a EBarCodeReader context based on a pre-existing EBarCodeReader object. All properties and internal data are copied.

◆ EBarCodeReader() [2/3]

eVision::EasyBarCode2::EBarCodeReader::EBarCodeReader ( const eVision::EasyBarCode2::EBarCodeReader & other)

Constructs a EBarCodeReader context.

Parameters
otherAnother EBarCodeReader object to be copied in the new EBarCodeReader object.

The default constructor constructs an uninitialized EBarCodeReader object. All properties are initialized to their respective default values. The copy constructor constructs a EBarCodeReader context based on a pre-existing EBarCodeReader object. All properties and internal data are copied.

◆ ~EBarCodeReader()

eVision::EasyBarCode2::EBarCodeReader::~EBarCodeReader ( )
throw ( )
virtual

◆ EBarCodeReader() [3/3]

eVision::EasyBarCode2::EBarCodeReader::EBarCodeReader ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ DisableAllSymbologies()

void eVision::EasyBarCode2::EBarCodeReader::DisableAllSymbologies ( )

Disables all symbologies.

◆ EnableAllSymbologies()

void eVision::EasyBarCode2::EBarCodeReader::EnableAllSymbologies ( )

Enables all supported symbologies, with the exception of EBarCodeSymbologies::EBarCodeSymbologies_PDF417, EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode because they might degrade the detection of other symbologies or generate false positives.

Deprecated

Deprecated, use EBarCodeReader::EnableSafeSymbologies instead.

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

◆ EnableDefaultSymbologies()

void eVision::EasyBarCode2::EBarCodeReader::EnableDefaultSymbologies ( )

Enables default symbologies.

◆ EnableSafeSymbologies()

void eVision::EasyBarCode2::EBarCodeReader::EnableSafeSymbologies ( )

Enables all supported symbologies that do not degrade the detection of other symbologies or generate false positives. That is, all with the exception of EBarCodeSymbologies::EBarCodeSymbologies_PDF417, EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode.

◆ EnableSymbologies()

void eVision::EasyBarCode2::EBarCodeReader::EnableSymbologies ( const std::vector< eVision::EasyBarCode2::EBarCodeSymbologies > & symbologies)

Enables a set of symbologies.

Parameters
symbologiesthe vector of symbologies to enable

◆ EnableSymbology()

void eVision::EasyBarCode2::EBarCodeReader::EnableSymbology ( eVision::EasyBarCode2::EBarCodeSymbologies symbology)

Enables a single symbology.

Parameters
symbologythe symbology to enable

◆ GetComputeGrading()

bool eVision::EasyBarCode2::EBarCodeReader::GetComputeGrading ( ) const

Enables or disables the computation of the grades of the read barcodes according to ISO 15416.

At the moment, grading is only supported for EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13.

ComputeGrading is disabled by default.

◆ GetEnableAdvancedDecoding()

bool eVision::EasyBarCode2::EBarCodeReader::GetEnableAdvancedDecoding ( ) const

Enables or disables some advanced decoding for the EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13 symbologies specifically.

In practice, when this option is set, the reader assumes a character might be badly printed and uses the checksum to correct that character. In rare cases, this option may lead to reading false positives codes.

Advanced decoding is enabled by default.

◆ GetEnabledSymbologies()

std::vector< eVision::EasyBarCode2::EBarCodeSymbologies > eVision::EasyBarCode2::EBarCodeReader::GetEnabledSymbologies ( ) const

Enabled symbologies.

◆ GetEnablePatternCorrection()

bool eVision::EasyBarCode2::EBarCodeReader::GetEnablePatternCorrection ( ) const

Enables or disables the correction of patterns incorrectly decoded. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.

In practice, when this option is set, the reader matches a badly decoded pattern to the closest one in some cases. In rare cases, this option may lead to reading false positives codes. It has no effect for symbologies with complex decoding (e.g. GS1 DataBar, PDF417) or without patterns (e.g. Pharmacode).

Pattern correction is enabled by default.

◆ GetEnablePermissiveDecoding()

bool eVision::EasyBarCode2::EBarCodeReader::GetEnablePermissiveDecoding ( ) const

Enables or disables the decoding of codes containing partially incorrect information.

In practice, when this option is set, the reader assumes a character might be badly printed and uses the checksum to correct that character. In rare cases, this option may lead to reading false positives codes. It has no effect for symbologies in which a checksum is not mandatory.

Permissive decoding is enabled by default.

◆ GetEnablePrintingErrorCorrection()

bool eVision::EasyBarCode2::EBarCodeReader::GetEnablePrintingErrorCorrection ( ) const

Enables or disables the correction of patterns incorrectly printed. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.

In practice, when this option is set, the reader tries to correct some printing defects. For example some bar or space of a pattern that has a width of 1 module instead of 2. In some cases, this option may lead to reading false positives codes. It has no effect for symbologies with complex decoding (e.g. GS1 DataBar, PDF417) or without patterns (e.g. Pharmacode).

Note that EBarCodeReader::SetEnablePrintingErrorCorrection adds an additional step in the processes enabled by EBarCodeReader::SetEnableAdvancedDecoding and EBarCodeReader::SetEnablePatternCorrection, so it has no effect when they are disabled.

Printing error correction is disabled by default.

◆ GetLearningPerformed()

bool eVision::EasyBarCode2::EBarCodeReader::GetLearningPerformed ( ) const

Returns whether a learning has been performed on the EBarCodeReader.

Note that after a failed call to EBarCodeReader::Learn (the value of 0 was returned), calling this method will returns false.

◆ GetMaxNumCodes()

uint32_t eVision::EasyBarCode2::EBarCodeReader::GetMaxNumCodes ( ) const

Maximum number of barcodes to find in a single Image/ROI.

By default, this parameter is set to 1.

◆ GetMinModuleSize()

float eVision::EasyBarCode2::EBarCodeReader::GetMinModuleSize ( ) const

Parameter used before version 24.10. It has currently no effect.

◆ GetReadingOrientation()

eVision::EasyBarCode2::EReadingOrientation eVision::EasyBarCode2::EBarCodeReader::GetReadingOrientation ( ) const

Some symbologies do not specify start and stop patterns, namely: EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode. In these cases, we do not know if we should decode the barcode from left to right or from right to left. EBarCodeReader::SetReadingOrientation solves this problem.

The default orientation is EReadingOrientation::EReadingOrientation_LeftToRight.

◆ GetTimeOut()

uint64_t eVision::EasyBarCode2::EBarCodeReader::GetTimeOut ( ) const

Time-out for the EBarCodeReader::Read method.

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

◆ GetUseMinModuleSize()

bool eVision::EasyBarCode2::EBarCodeReader::GetUseMinModuleSize ( ) const

Parameter used before version 24.10. It has currently no effect.

◆ GetValidateBarCode()

bool eVision::EasyBarCode2::EBarCodeReader::GetValidateBarCode ( ) const

Enables/Disables all barcode validations.

If this validation is enabled, barcodes with an erroneous checksum will not be returned.

For the PharmaCodeOneTrack symbology, no checksum is computed. We instead validate that the barcode is coherent along its height and that the relative width of the bars/space are coherent with the symbology's specification. This allow to reduce the number of false positives significantly.

Some symbologies have an optional checksum, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39, for these symbologies, enforcing checksum validation comes at the risk of removing good barcodes that do not have a checksum. See list of supported codes.

By default, validation is enforced when checksum is mandatory for the symbology and for Pharmacodes.

Deprecated

Deprecated, use EBarCodeReader::GetValidateMandatoryChecksum, EBarCodeReader::GetValidateOptionalChecksum and EBarCodeReader::GetValidatePharmacode instead.

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

◆ GetValidateMandatoryChecksum()

bool eVision::EasyBarCode2::EBarCodeReader::GetValidateMandatoryChecksum ( ) const

Enables/Disables checksum validation for all symbologies for which a checksum is mandatory, for example EBarCodeSymbologies::EBarCodeSymbologies_Code128.

See list of supported codes.

If validation is enabled for symbologies with a mandatory checksum, barcodes of these symbologies with an erroneous checksum will not be returned.

By default, validation is enforced when checksum is mandatory.

◆ GetValidateOptionalChecksum()

bool eVision::EasyBarCode2::EBarCodeReader::GetValidateOptionalChecksum ( ) const

Enables/Disables checksum validation for all symbologies for which a checksum is optional, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39.

See list of supported codes.

If validation is enabled for symbologies with an optional checksum, barcodes of these symbologies with an erroneous checksum will not be returned.

By default, validation is not enforced when checksum is optional to avoid removing correct codes.

◆ GetValidatePharmacode()

bool eVision::EasyBarCode2::EBarCodeReader::GetValidatePharmacode ( ) const

Enables/Disables validation for the EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack symbology.

Pharmacodes are validated by checking that the barcode is coherent along its height and that the relative width of the bars/space are coherent with the symbology's specification. This allows to reduce the number of false positives significantly.

By default, validation is enforced for Pharmacodes.

◆ GetValidateWithChecksum()

bool eVision::EasyBarCode2::EBarCodeReader::GetValidateWithChecksum ( ) const

Enables/Disables all barcode validations.

Deprecated

Deprecated, use EBarCodeReader::GetValidateMandatoryChecksum, EBarCodeReader::GetValidateOptionalChecksum and EBarCodeReader::GetValidatePharmacode instead.

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

◆ Learn() [1/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 * > & images)

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [2/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 * > & images,
bool keepDefaultScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [3/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 * > & images,
bool keepDefaultScales,
bool addAllScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true
addAllScalesif true, Learning adds all of the scales at which a code is detected. Otherwise, the smallest number of scales required to read all of the images is added. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [4/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 > & images)

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [5/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 > & images,
bool keepDefaultScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [6/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EImageBW8 > & images,
bool keepDefaultScales,
bool addAllScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
imagesImages in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true
addAllScalesif true, Learning adds all of the scales at which a code is detected. Otherwise, the smallest number of scales required to read all of the images is added. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [7/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 * > & rois)

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [8/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 * > & rois,
bool keepDefaultScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [9/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 * > & rois,
bool keepDefaultScales,
bool addAllScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true
addAllScalesif true, Learning adds all of the scales at which a code is detected. Otherwise, the smallest number of scales required to read all of the images is added. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [10/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 > & rois)

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [11/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 > & rois,
bool keepDefaultScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Learn() [12/12]

float eVision::EasyBarCode2::EBarCodeReader::Learn ( const std::vector< eVision::EROIBW8 > & rois,
bool keepDefaultScales,
bool addAllScales )

Learns the best options to use to read the given Images/ROIs. The scales at which we detect barcodes are modified. The other options (symbologies, checksum verification, max number of codes, ...) must be set by the user so that the codes are read correctly.

Returns \(\frac{NumberOfBarCodesLearned}{NumberOfImagesOrROI \times MaxNumCodes}\). If the return value is 0, i.e. no codes are read, the learned parameters are not modified.

Parameters
roisROIs in which to find the barcodes.
keepDefaultScalesif true, Learning does not remove the scales used by default even if they are useless for the given images. Default: true
addAllScalesif true, Learning adds all of the scales at which a code is detected. Otherwise, the smallest number of scales required to read all of the images is added. Default: true

Learning may have two benefits:

  • increasing the decoding capabilities at the cost of time (keepDefaultScales and addAllScales set to true)
  • increasing the speed at the cost of decoding capabilities on other images than the ones given (keepDefaultScales and addAllScales set to false)

◆ Load() [1/2]

void eVision::EasyBarCode2::EBarCodeReader::Load ( const std::string & file)

Load the reader configuration.

Parameters
fileFile path.

◆ Load() [2/2]

void eVision::EasyBarCode2::EBarCodeReader::Load ( eVision::ESerializer * serializer)

Load the reader configuration.

Parameters
serializerSerializer. Must be in read mode.

◆ operator=()

eVision::EasyBarCode2::EBarCodeReader & eVision::EasyBarCode2::EBarCodeReader::operator= ( const eVision::EasyBarCode2::EBarCodeReader & other)

Copies all the data from another EBarCodeReader object into the current EBarCodeReader object.

Parameters
otherEBarCodeReader object to be copied.

◆ Read() [1/14]

std::vector< eVision::EasyBarCode2::EBarCode > eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ Read() [2/14]

std::vector< eVision::EasyBarCode2::EBarCode > eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::EFrame & frame ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
frameReference frame of the input image

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ Read() [3/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::EGrid & grid ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
gridGrid with cell disabling capabilities

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ Read() [4/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::EGrid & grid,
const eVision::EFrame & frame ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
gridGrid with cell disabling capabilities
frameReference frame of the input image

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ Read() [5/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EasyBarCode2::EBarCodeGrid & grid ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
gridGrid with cell disabling capabilities

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [6/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EasyBarCode2::EBarCodeGrid & grid,
float extension ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
gridGrid with cell disabling capabilities
extensionExtension of the grid cells to allow cell overlap. For instance, 0.0 means no extension and 0.1 means a 10% cell size extension. default: 0.0

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [7/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
const eVision::EasyBarCode2::EBarCodeGrid & grid ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
frameReference frame of the input image
gridGrid with cell disabling capabilities

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [8/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
const eVision::EasyBarCode2::EBarCodeGrid & grid,
float extension ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
frameReference frame of the input image
gridGrid with cell disabling capabilities
extensionExtension of the grid cells to allow cell overlap. For instance, 0.0 means no extension and 0.1 means a 10% cell size extension. default: 0.0

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [9/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
int32_t numCellsX,
int32_t numCellsY ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
frameReference frame of the input image
numCellsXNumber of grid cells in the X direction
numCellsYNumber of grid cells in the Y direction

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [10/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
int32_t numCellsX,
int32_t numCellsY,
float extension ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
frameReference frame of the input image
numCellsXNumber of grid cells in the X direction
numCellsYNumber of grid cells in the Y direction
extensionExtension of the grid cells to allow cell overlap. For instance, 0.0 means no extension and 0.1 means a 10% cell size extension. default: 0.0

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [11/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
int32_t numCellsX,
int32_t numCellsY ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
numCellsXNumber of grid cells in the X direction
numCellsYNumber of grid cells in the Y direction

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [12/14]

eVision::EasyBarCode2::EBarCodeGrid eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERectangleRegion & area,
int32_t numCellsX,
int32_t numCellsY,
float extension ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
areaRectangular Region used as the full grid area
numCellsXNumber of grid cells in the X direction
numCellsYNumber of grid cells in the Y direction
extensionExtension of the grid cells to allow cell overlap. For instance, 0.0 means no extension and 0.1 means a 10% cell size extension. default: 0.0

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

Deprecated

Deprecated, use overloads taking an EGrid argument instead.

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

◆ Read() [13/14]

std::vector< eVision::EasyBarCode2::EBarCode > eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERegion & region ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
regionOptional region used to reduce the search domain.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ Read() [14/14]

std::vector< eVision::EasyBarCode2::EBarCode > eVision::EasyBarCode2::EBarCodeReader::Read ( const eVision::EROIBW8 & img,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const

Finds and reads all the barcodes in the provided Image/ROI.

Parameters
imgImage/ROI in which to find the barcodes.
regionOptional region used to reduce the search domain.
frameReference frame of the input image

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain barcodes. See the EBarCodeGrid class documentation for more information.

◆ ResetLearning()

void eVision::EasyBarCode2::EBarCodeReader::ResetLearning ( )

Forgets the learned parameter settings and resets them to their default values.

◆ Save() [1/2]

void eVision::EasyBarCode2::EBarCodeReader::Save ( const std::string & file)

Save the reader configuration.

Parameters
fileFile path.

◆ Save() [2/2]

void eVision::EasyBarCode2::EBarCodeReader::Save ( eVision::ESerializer * serializer)

Save the reader configuration.

Parameters
serializerSerializer. Must be in write mode.

◆ SetComputeGrading()

void eVision::EasyBarCode2::EBarCodeReader::SetComputeGrading ( bool enable)

Enables or disables the computation of the grades of the read barcodes according to ISO 15416.

At the moment, grading is only supported for EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13.

Parameters
enableWhether to enable the computation of the grades or not.

ComputeGrading is disabled by default.

◆ SetEnableAdvancedDecoding()

void eVision::EasyBarCode2::EBarCodeReader::SetEnableAdvancedDecoding ( bool enable)

Enables or disables some advanced decoding for the EBarCodeSymbologies::EBarCodeSymbologies_Code128, EBarCodeSymbologies::EBarCodeSymbologies_Gs1_128 and EBarCodeSymbologies::EBarCodeSymbologies_Ean13 symbologies specifically.

In practice, when this option is set, the reader assumes a character might be badly printed and uses the checksum to correct that character. In rare cases, this option may lead to reading false positives codes.

Parameters
enableWhether to enable advanced decoding or not.

Advanced decoding is enabled by default.

◆ SetEnablePatternCorrection()

void eVision::EasyBarCode2::EBarCodeReader::SetEnablePatternCorrection ( bool enable)

Enables or disables the correction of patterns incorrectly decoded. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.

In practice, when this option is set, the reader matches a badly decoded pattern to the closest one in some cases. In rare cases, this option may lead to reading false positives codes. It has no effect for symbologies with complex decoding (e.g. GS1 DataBar, PDF417) or without patterns (e.g. Pharmacode).

Parameters
enableWhether to enable pattern correction or not.

Pattern correction is enabled by default.

◆ SetEnablePermissiveDecoding()

void eVision::EasyBarCode2::EBarCodeReader::SetEnablePermissiveDecoding ( bool enable)

Enables or disables the decoding of codes containing partially incorrect information.

In practice, when this option is set, the reader assumes a character might be badly printed and uses the checksum to correct that character. In rare cases, this option may lead to reading false positives codes. It has no effect for symbologies in which a checksum is not mandatory.

Parameters
enableWhether to enable the permissive decoding or not.

Permissive decoding is enabled by default.

Deprecated

Deprecated, use EBarCodeReader::SetEnablePatternCorrection, EBarCodeReader::SetEnableAdvancedDecoding and EBarCodeReader::SetEnablePrintingErrorCorrection instead. EnablePermissiveDecoding is the combination of AdvancedDecoding and PrintingErrorCorrection.

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

◆ SetEnablePrintingErrorCorrection()

void eVision::EasyBarCode2::EBarCodeReader::SetEnablePrintingErrorCorrection ( bool enable)

Enables or disables the correction of patterns incorrectly printed. By pattern, we mean a group of n consecutive strips that is decoded to a single value, these exist in most symbologies.

In practice, when this option is set, the reader tries to correct some printing defects. For example some bar or space of a pattern that has a width of 1 module instead of 2. In some cases, this option may lead to reading false positives codes. It has no effect for symbologies with complex decoding (e.g. GS1 DataBar, PDF417) or without patterns (e.g. Pharmacode).

Note that EBarCodeReader::SetEnablePrintingErrorCorrection adds an additional step in the processes enabled by EBarCodeReader::SetEnableAdvancedDecoding and EBarCodeReader::SetEnablePatternCorrection, so it has no effect when they are disabled.

Parameters
enableWhether to enable printing error correction or not.

Printing error correction is disabled by default.

◆ SetMaxNumCodes()

void eVision::EasyBarCode2::EBarCodeReader::SetMaxNumCodes ( uint32_t max)

Maximum number of barcodes to find in a single Image/ROI.

By default, this parameter is set to 1.

◆ SetMinModuleSize()

void eVision::EasyBarCode2::EBarCodeReader::SetMinModuleSize ( float minModuleSize)

Parameter used before version 24.10. It has currently no effect.

Parameters
minModuleSize
Deprecated
Deprecated in version 24.10. Scheduled to be removed in version 27.6.

◆ SetReadingOrientation()

void eVision::EasyBarCode2::EBarCodeReader::SetReadingOrientation ( eVision::EasyBarCode2::EReadingOrientation orientation)

Some symbologies do not specify start and stop patterns, namely: EBarCodeSymbologies::EBarCodeSymbologies_CodeStk, EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack and EBarCodeSymbologies::EBarCodeSymbologies_BinaryCode. In these cases, we do not know if we should decode the barcode from left to right or from right to left. EBarCodeReader::SetReadingOrientation solves this problem.

The default orientation is EReadingOrientation::EReadingOrientation_LeftToRight.

◆ SetTimeOut()

void eVision::EasyBarCode2::EBarCodeReader::SetTimeOut ( uint64_t value)

Time-out for the EBarCodeReader::Read method.

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

◆ SetUseMinModuleSize()

void eVision::EasyBarCode2::EBarCodeReader::SetUseMinModuleSize ( bool useMinModuleSize)

Parameter used before version 24.10. It has currently no effect.

Parameters
useMinModuleSize
Deprecated
Deprecated in version 24.10. Scheduled to be removed in version 27.6.

◆ SetValidateBarCode()

void eVision::EasyBarCode2::EBarCodeReader::SetValidateBarCode ( bool validate)

Enables/Disables all barcode validations.

If this validation is enabled, barcodes with an erroneous checksum will not be returned.

For the PharmaCodeOneTrack symbology, no checksum is computed. We instead validate that the barcode is coherent along its height and that the relative width of the bars/space are coherent with the symbology's specification. This allow to reduce the number of false positives significantly.

Some symbologies have an optional checksum, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39, for these symbologies, enforcing checksum validation comes at the risk of removing good barcodes that do not have a checksum. See list of supported codes.

By default, validation is enforced when checksum is mandatory for the symbology and for Pharmacodes.

◆ SetValidateMandatoryChecksum()

void eVision::EasyBarCode2::EBarCodeReader::SetValidateMandatoryChecksum ( bool validate)

Enables/Disables checksum validation for all symbologies for which a checksum is mandatory, for example EBarCodeSymbologies::EBarCodeSymbologies_Code128.

See list of supported codes.

If validation is enabled for symbologies with a mandatory checksum, barcodes of these symbologies with an erroneous checksum will not be returned.

By default, validation is enforced when checksum is mandatory.

◆ SetValidateOptionalChecksum()

void eVision::EasyBarCode2::EBarCodeReader::SetValidateOptionalChecksum ( bool validate)

Enables/Disables checksum validation for all symbologies for which a checksum is optional, for example EBarCodeSymbologies::EBarCodeSymbologies_Code39.

See list of supported codes.

If validation is enabled for symbologies with an optional checksum, barcodes of these symbologies with an erroneous checksum will not be returned.

By default, validation is not enforced when checksum is optional to avoid removing correct codes.

◆ SetValidatePharmacode()

void eVision::EasyBarCode2::EBarCodeReader::SetValidatePharmacode ( bool validate)

Enables/Disables validation for the EBarCodeSymbologies::EBarCodeSymbologies_PharmacodeOneTrack symbology.

Pharmacodes are validated by checking that the barcode is coherent along its height and that the relative width of the bars/space are coherent with the symbology's specification. This allows to reduce the number of false positives significantly.

By default, validation is enforced for Pharmacodes.

◆ SetValidateWithChecksum()

void eVision::EasyBarCode2::EBarCodeReader::SetValidateWithChecksum ( bool validate)

Enables/Disables all barcode validations.

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

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EasyBarCode2::EBarCodeReader::wrappedClass_