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

Represents the QR code reader, that is a context for the detection and decoding of QR codes, represented by EQRCode objects. More...

#include <eVision/EasyQRCode/EQRCodeReader.h>

Collaboration diagram for eVision::EQRCodeReader:

Public Member Functions

 EQRCodeReader ()
 Creates an EQRCodeReader object.
 EQRCodeReader (const eVision::EQRCodeReader &other)
 Creates an EQRCodeReader object.
virtual ~EQRCodeReader () throw ()
eVision::EQRCodeReader & operator= (const eVision::EQRCodeReader &other)
 Assignment operator.
void SetSearchField (eVision::EROIBW8 &field)
 Search field for the QR code reader.
void SetScanPrecision (eVision::EQRCodeScanPrecision precision)
 Precision of the EQRCodeReader::EQRCodeReader when scanning the search field.
eVision::EQRCodeScanPrecision GetScanPrecision () const
 Precision of the EQRCodeReader::EQRCodeReader when scanning the search field.
void SetDetectionTradeOff (eVision::EQRDetectionTradeOff tradeOff)
 This setting controls the trade-off between computation speed versus reliability of the algorithm and particularly of the detection methods.
eVision::EQRDetectionTradeOff GetDetectionTradeOff () const
 This setting controls the trade-off between computation speed versus reliability of the algorithm and particularly of the detection methods.
void SetMinimumScore (float minScore)
 Minimum pattern finder score that must be reached to consider that a finder pattern has been found.
float GetMinimumScore () const
 Minimum pattern finder score that must be reached to consider that a finder pattern has been found.
void SetMinimumIsotropy (float isotropy)
 QR code minimum isotropy.
float GetMinimumIsotropy () const
 QR code minimum isotropy.
void SetPerspectiveMode (eVision::EQRCodePerspectiveMode mode)
eVision::EQRCodePerspectiveMode GetPerspectiveMode () const
void SetDetectionMethod (int method)
 Sets the detection method for finding QR codes. The method can be any combination of the EQRDetectionMethod enums.
int GetDetectionMethod () const
 Sets the detection method for finding QR codes. The method can be any combination of the EQRDetectionMethod enums.
void SetForegroundDetectionThreshold (int threshold)
 Foreground detection threshold. This parameter determines by how many grayscale-values a pixel should deviate from its local background to be considered part of the foreground.
int GetForegroundDetectionThreshold () const
 Foreground detection threshold. This parameter determines by how many grayscale-values a pixel should deviate from its local background to be considered part of the foreground.
void SetAdaptiveThresholdHalfKernelSize (uint32_t halfKernelSize)
 Sets the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold.
uint32_t GetAdaptiveThresholdHalfKernelSize () const
 Sets the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold.
void SetComputeAdaptiveThresholdHalfKernelSizeFromImage (bool computeFromImage)
 Sets whether the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold is computed from image size or set by EQRCodeReader::SetAdaptiveThresholdHalfKernelSize.
bool GetComputeAdaptiveThresholdHalfKernelSizeFromImage () const
 Sets whether the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold is computed from image size or set by EQRCodeReader::SetAdaptiveThresholdHalfKernelSize.
void SetFilterOutUnreliablyDecodedQRCodes (bool filter)
 Activate or deactivate the filtering of unreliably decoded QR codes.
bool GetFilterOutUnreliablyDecodedQRCodes () const
 Activate or deactivate the filtering of unreliably decoded QR codes.
void SetCellPolarityConfidenceThreshold (float threshold)
 Sets the minimum cell polarity confidence threshold.
float GetCellPolarityConfidenceThreshold () const
 Sets the minimum cell polarity confidence threshold.
void SetComputeGrading (bool computeGrading)
 Allows to choose whether the grading properties of the EQRCode object will be computed by the EQRCodeReader::Read method. The default setting for this property is false.
bool GetComputeGrading () const
 Allows to choose whether the grading properties of the EQRCode object will be computed by the EQRCodeReader::Read method. The default setting for this property is false.
void SetSearchedModels (const std::vector< eVision::EQRCodeModel > &models)
 QR code models to be searched for.
std::vector< eVision::EQRCodeModel > GetSearchedModels () const
 QR code models to be searched for.
void SetMinimumVersion (unsigned int version)
 Minimum version of QR codes to be searched for.
unsigned int GetMinimumVersion () const
 Minimum version of QR codes to be searched for.
void SetMaximumVersion (unsigned int version)
 Maximum version of QR codes to be searched for.
unsigned int GetMaximumVersion () const
 Maximum version of QR codes to be searched for.
std::vector< eVision::EQRCodeGeometry > Detect () const
eVision::EQRCode Decode (const eVision::EQRCodeGeometry &geometry)
std::vector< eVision::EQRCode > Read () const
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
std::vector< eVision::EQRCode > Read (const eVision::EROIBW8 &roi)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
std::vector< eVision::EQRCode > Read (const eVision::EROIBW8 &roi, const eVision::ERegion &region)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
std::vector< eVision::EQRCode > Read (const eVision::EROIBW8 &roi, const eVision::ERegion &region, const eVision::EFrame &frame)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
std::vector< eVision::EQRCode > Read (const eVision::EROIBW8 &roi, const eVision::EFrame &frame)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, int32_t numCellsX, int32_t numCellsY, float extension)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, int32_t numCellsX, int32_t numCellsY)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, int32_t numCellsX, int32_t numCellsY, float extension)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, int32_t numCellsX, int32_t numCellsY)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EQRCodeGrid &grid, float extension)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EQRCodeGrid &grid)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, int32_t numCellsX, int32_t numCellsY, float extension)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, int32_t numCellsX, int32_t numCellsY)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, const eVision::EQRCodeGrid &grid, float extension)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::ERectangleRegion &area, const eVision::EFrame &frame, const eVision::EQRCodeGrid &grid)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::EGrid &grid)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
eVision::EQRCodeGrid Read (const eVision::EROIBW8 &roi, const eVision::EGrid &grid, const eVision::EFrame &frame)
 Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.
uint64_t GetTimeOut () const
 Time-out for the EQRCodeReader::Read method.
void SetTimeOut (uint64_t value)
 Time-out for the EQRCodeReader::Read method.
void Load (const std::string &path)
 Load the configuration for this EQRCodeReader instance.
void Load (eVision::ESerializer *serializer)
 Load the configuration for this EQRCodeReader instance.
void Save (const std::string &path)
 Save the configuration for this EQRCodeReader instance.
void Save (eVision::ESerializer *serializer)
 Save the configuration for this EQRCodeReader instance.
uint32_t GetMaxNumCodes () const
 Maximum number of QR codes to find in a single Image/ROI.
void SetMaxNumCodes (uint32_t max)
 Maximum number of QR codes to find in a single Image/ROI.
 EQRCodeReader (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents the QR code reader, that is a context for the detection and decoding of QR codes, represented by EQRCode objects.

License(s): EasyQRCode

Constructor & Destructor Documentation

◆ EQRCodeReader() [1/3]

eVision::EQRCodeReader::EQRCodeReader ( )

Creates an EQRCodeReader object.

◆ EQRCodeReader() [2/3]

eVision::EQRCodeReader::EQRCodeReader ( const eVision::EQRCodeReader & other)

Creates an EQRCodeReader object.

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

◆ ~EQRCodeReader()

eVision::EQRCodeReader::~EQRCodeReader ( )
throw ( )
virtual

◆ EQRCodeReader() [3/3]

eVision::EQRCodeReader::EQRCodeReader ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Decode()

eVision::EQRCode eVision::EQRCodeReader::Decode ( const eVision::EQRCodeGeometry & geometry)

◆ Detect()

std::vector< eVision::EQRCodeGeometry > eVision::EQRCodeReader::Detect ( ) const

◆ GetAdaptiveThresholdHalfKernelSize()

uint32_t eVision::EQRCodeReader::GetAdaptiveThresholdHalfKernelSize ( ) const

Sets the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold.

Default: 50.

Prior to eVision 26.10, this setting was computed from the image size, to get previous behavior, set EQRCodeReader::SetComputeAdaptiveThresholdHalfKernelSizeFromImage to true.

◆ GetCellPolarityConfidenceThreshold()

float eVision::EQRCodeReader::GetCellPolarityConfidenceThreshold ( ) const

Sets the minimum cell polarity confidence threshold.

When the cell confidence is under the threshold, additional processing is attempted to improve its polarity detection. The cell polarity confidence reflects the confidence in the cell digitization result, on a scale from 0 to 1. Increasing the threshold can improve reading of overprinted or underprinted QR codes. Default: 0.2f.

Large values can affect the speed and will increase the probability of false positive changes.

◆ GetComputeAdaptiveThresholdHalfKernelSizeFromImage()

bool eVision::EQRCodeReader::GetComputeAdaptiveThresholdHalfKernelSizeFromImage ( ) const

Sets whether the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold is computed from image size or set by EQRCodeReader::SetAdaptiveThresholdHalfKernelSize.

Default: false.

Prior to eVision 26.10, EQRCodeReader::SetAdaptiveThresholdHalfKernelSize was computed from the image size, to get previous behavior, set this to true.

◆ GetComputeGrading()

bool eVision::EQRCodeReader::GetComputeGrading ( ) const

Allows to choose whether the grading properties of the EQRCode object will be computed by the EQRCodeReader::Read method. The default setting for this property is false.

This setting is not available for Micro QR code symbols.

◆ GetDetectionMethod()

int eVision::EQRCodeReader::GetDetectionMethod ( ) const

Sets the detection method for finding QR codes. The method can be any combination of the EQRDetectionMethod enums.

The default value is: 'EQRDetectionMethod::EQRDetectionMethod_Gradient | EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold'.

◆ GetDetectionTradeOff()

eVision::EQRDetectionTradeOff eVision::EQRCodeReader::GetDetectionTradeOff ( ) const

This setting controls the trade-off between computation speed versus reliability of the algorithm and particularly of the detection methods.

Setting the trade-off will overwrite the current settings for EQRCodeScanPrecision and EQRDetectionMethod.

Available values are defined by EQRDetectionTradeOff. The default value is EQRDetectionTradeOff_Balanced.

◆ GetFilterOutUnreliablyDecodedQRCodes()

bool eVision::EQRCodeReader::GetFilterOutUnreliablyDecodedQRCodes ( ) const

Activate or deactivate the filtering of unreliably decoded QR codes.

By default, the QR code reader does not return unreliably decoded QR codes.

◆ GetForegroundDetectionThreshold()

int eVision::EQRCodeReader::GetForegroundDetectionThreshold ( ) const

Foreground detection threshold. This parameter determines by how many grayscale-values a pixel should deviate from its local background to be considered part of the foreground.

In most cases, changing the value of this parameter is not required. A small threshold value may help to locate codes in low contrast images. If you think you might need to use this parameter, contact technical support for advice. The default value for this parameter is 10.

◆ GetMaximumVersion()

unsigned int eVision::EQRCodeReader::GetMaximumVersion ( ) const

Maximum version of QR codes to be searched for.

This parameter value ranges from 1 to 40. Default value: 40.

◆ GetMaxNumCodes()

uint32_t eVision::EQRCodeReader::GetMaxNumCodes ( ) const

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

By default, this parameter is set to 1.

◆ GetMinimumIsotropy()

float eVision::EQRCodeReader::GetMinimumIsotropy ( ) const

QR code minimum isotropy.

The isotropy of a QR code is defined as its short side divided by its long side.

This parameter value ranges from 0 to 1. Default value: 0.75.

◆ GetMinimumScore()

float eVision::EQRCodeReader::GetMinimumScore ( ) const

Minimum pattern finder score that must be reached to consider that a finder pattern has been found.

The pattern finder score is based on a normalized correlation with a perfect finder pattern model.

A perfect match with the model would return a score of 1. This parameter value ranges from 0 to 1. Default value: 0.7.

◆ GetMinimumVersion()

unsigned int eVision::EQRCodeReader::GetMinimumVersion ( ) const

Minimum version of QR codes to be searched for.

This parameter value ranges from 1 to 40. Default value: 1.

◆ GetPerspectiveMode()

eVision::EQRCodePerspectiveMode eVision::EQRCodeReader::GetPerspectiveMode ( ) const

◆ GetScanPrecision()

eVision::EQRCodeScanPrecision eVision::EQRCodeReader::GetScanPrecision ( ) const

Precision of the EQRCodeReader::EQRCodeReader when scanning the search field.

Available values are defined by EQRCodeScanPrecision. The default value is EQRCodeScanPrecision_Automatic.

◆ GetSearchedModels()

std::vector< eVision::EQRCodeModel > eVision::EQRCodeReader::GetSearchedModels ( ) const

QR code models to be searched for.

By default, the QR code reader searches for EQRCodeModel::EQRCodeModel_Model1 and EQRCodeModel::EQRCodeModel_Model2.

◆ GetTimeOut()

uint64_t eVision::EQRCodeReader::GetTimeOut ( ) const

Time-out for the EQRCodeReader::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.

◆ Load() [1/2]

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

Load the configuration for this EQRCodeReader instance.

Parameters
pathThe path from which to load the configuration.

◆ Load() [2/2]

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

Load the configuration for this EQRCodeReader instance.

Parameters
serializerThe given ESerializer, it must have been created for reading.

◆ operator=()

eVision::EQRCodeReader & eVision::EQRCodeReader::operator= ( const eVision::EQRCodeReader & other)

Assignment operator.

Parameters
otherThe object that should be copied

◆ Read() [1/17]

std::vector< eVision::EQRCode > eVision::EQRCodeReader::Read ( ) const

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

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

Deprecated

Use the overload taking an EROIBW8 as parameter.

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

◆ Read() [2/17]

std::vector< eVision::EQRCode > eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi)

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.

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

◆ Read() [3/17]

std::vector< eVision::EQRCode > eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::EFrame & frame )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid class documentation for more information.

◆ Read() [4/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::EGrid & grid )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid class documentation for more information.

◆ Read() [5/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::EGrid & grid,
const eVision::EFrame & frame )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid class documentation for more information.

◆ Read() [6/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
const eVision::EQRCodeGrid & grid )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
const eVision::EQRCodeGrid & grid,
float extension )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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.0f means no extension and 0.1f means a 10% cell size extension.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
int32_t numCellsX,
int32_t numCellsY )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EFrame & frame,
int32_t numCellsX,
int32_t numCellsY,
float extension )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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.0f means no extension and 0.1f means a 10% cell size extension.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EQRCodeGrid & grid )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
const eVision::EQRCodeGrid & grid,
float extension )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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.0f means no extension and 0.1f means a 10% cell size extension.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
int32_t numCellsX,
int32_t numCellsY )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid 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/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERectangleRegion & area,
int32_t numCellsX,
int32_t numCellsY,
float extension )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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.0f means no extension and 0.1f means a 10% cell size extension.

The grid overload allows you to disable some cells of the grid if those cells are not supposed to contain QR Codes. See the EQRCodeGrid 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() [14/17]

std::vector< eVision::EQRCode > eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERegion & region )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
regionRegion into the ROI where the qr codes have to be found.

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

◆ Read() [15/17]

std::vector< eVision::EQRCode > eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
const eVision::ERegion & region,
const eVision::EFrame & frame )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
regionRegion into the ROI where the qr codes have to be found.
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 QR Codes. See the EQRCodeGrid class documentation for more information.

◆ Read() [16/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
int32_t numCellsX,
int32_t numCellsY )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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 QR Codes. See the EQRCodeGrid class documentation for more information.

◆ Read() [17/17]

eVision::EQRCodeGrid eVision::EQRCodeReader::Read ( const eVision::EROIBW8 & roi,
int32_t numCellsX,
int32_t numCellsY,
float extension )

Detects and decodes all the QR codes in the search field. Returns them as EQRCode objects.

Parameters
roiThe ROI in which the QR codes have to be found.
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.0f means no extension and 0.1f means a 10% cell size extension.

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

◆ Save() [1/2]

void eVision::EQRCodeReader::Save ( const std::string & path)

Save the configuration for this EQRCodeReader instance.

Parameters
pathThe path to which to save the configuration.

◆ Save() [2/2]

void eVision::EQRCodeReader::Save ( eVision::ESerializer * serializer)

Save the configuration for this EQRCodeReader instance.

Parameters
serializerThe given ESerializer, it must have been created for writing.

◆ SetAdaptiveThresholdHalfKernelSize()

void eVision::EQRCodeReader::SetAdaptiveThresholdHalfKernelSize ( uint32_t halfKernelSize)

Sets the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold.

Default: 50.

Prior to eVision 26.10, this setting was computed from the image size, to get previous behavior, set EQRCodeReader::SetComputeAdaptiveThresholdHalfKernelSizeFromImage to true.

◆ SetCellPolarityConfidenceThreshold()

void eVision::EQRCodeReader::SetCellPolarityConfidenceThreshold ( float threshold)

Sets the minimum cell polarity confidence threshold.

When the cell confidence is under the threshold, additional processing is attempted to improve its polarity detection. The cell polarity confidence reflects the confidence in the cell digitization result, on a scale from 0 to 1. Increasing the threshold can improve reading of overprinted or underprinted QR codes. Default: 0.2f.

Large values can affect the speed and will increase the probability of false positive changes.

◆ SetComputeAdaptiveThresholdHalfKernelSizeFromImage()

void eVision::EQRCodeReader::SetComputeAdaptiveThresholdHalfKernelSizeFromImage ( bool computeFromImage)

Sets whether the half kernel size used to compute the threshold in EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold is computed from image size or set by EQRCodeReader::SetAdaptiveThresholdHalfKernelSize.

Default: false.

Prior to eVision 26.10, EQRCodeReader::SetAdaptiveThresholdHalfKernelSize was computed from the image size, to get previous behavior, set this to true.

◆ SetComputeGrading()

void eVision::EQRCodeReader::SetComputeGrading ( bool computeGrading)

Allows to choose whether the grading properties of the EQRCode object will be computed by the EQRCodeReader::Read method. The default setting for this property is false.

This setting is not available for Micro QR code symbols.

◆ SetDetectionMethod()

void eVision::EQRCodeReader::SetDetectionMethod ( int method)

Sets the detection method for finding QR codes. The method can be any combination of the EQRDetectionMethod enums.

The default value is: 'EQRDetectionMethod::EQRDetectionMethod_Gradient | EQRDetectionMethod::EQRDetectionMethod_AdaptiveThreshold'.

◆ SetDetectionTradeOff()

void eVision::EQRCodeReader::SetDetectionTradeOff ( eVision::EQRDetectionTradeOff tradeOff)

This setting controls the trade-off between computation speed versus reliability of the algorithm and particularly of the detection methods.

Setting the trade-off will overwrite the current settings for EQRCodeScanPrecision and EQRDetectionMethod.

Available values are defined by EQRDetectionTradeOff. The default value is EQRDetectionTradeOff_Balanced.

◆ SetFilterOutUnreliablyDecodedQRCodes()

void eVision::EQRCodeReader::SetFilterOutUnreliablyDecodedQRCodes ( bool filter)

Activate or deactivate the filtering of unreliably decoded QR codes.

By default, the QR code reader does not return unreliably decoded QR codes.

◆ SetForegroundDetectionThreshold()

void eVision::EQRCodeReader::SetForegroundDetectionThreshold ( int threshold)

Foreground detection threshold. This parameter determines by how many grayscale-values a pixel should deviate from its local background to be considered part of the foreground.

In most cases, changing the value of this parameter is not required. A small threshold value may help to locate codes in low contrast images. If you think you might need to use this parameter, contact technical support for advice. The default value for this parameter is 10.

◆ SetMaximumVersion()

void eVision::EQRCodeReader::SetMaximumVersion ( unsigned int version)

Maximum version of QR codes to be searched for.

This parameter value ranges from 1 to 40. Default value: 40.

◆ SetMaxNumCodes()

void eVision::EQRCodeReader::SetMaxNumCodes ( uint32_t max)

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

By default, this parameter is set to 1.

◆ SetMinimumIsotropy()

void eVision::EQRCodeReader::SetMinimumIsotropy ( float isotropy)

QR code minimum isotropy.

The isotropy of a QR code is defined as its short side divided by its long side.

This parameter value ranges from 0 to 1. Default value: 0.75.

◆ SetMinimumScore()

void eVision::EQRCodeReader::SetMinimumScore ( float minScore)

Minimum pattern finder score that must be reached to consider that a finder pattern has been found.

The pattern finder score is based on a normalized correlation with a perfect finder pattern model.

A perfect match with the model would return a score of 1. This parameter value ranges from 0 to 1. Default value: 0.7.

◆ SetMinimumVersion()

void eVision::EQRCodeReader::SetMinimumVersion ( unsigned int version)

Minimum version of QR codes to be searched for.

This parameter value ranges from 1 to 40. Default value: 1.

◆ SetPerspectiveMode()

void eVision::EQRCodeReader::SetPerspectiveMode ( eVision::EQRCodePerspectiveMode mode)

◆ SetScanPrecision()

void eVision::EQRCodeReader::SetScanPrecision ( eVision::EQRCodeScanPrecision precision)

Precision of the EQRCodeReader::EQRCodeReader when scanning the search field.

Available values are defined by EQRCodeScanPrecision. The default value is EQRCodeScanPrecision_Automatic.

◆ SetSearchedModels()

void eVision::EQRCodeReader::SetSearchedModels ( const std::vector< eVision::EQRCodeModel > & models)

QR code models to be searched for.

By default, the QR code reader searches for EQRCodeModel::EQRCodeModel_Model1 and EQRCodeModel::EQRCodeModel_Model2.

◆ SetSearchField()

void eVision::EQRCodeReader::SetSearchField ( eVision::EROIBW8 & field)

Search field for the QR code reader.

Parameters
fieldThe search field.
Deprecated

Use the EQRCodeReader::Read method taking an EROIBW8 as parameter.

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

◆ SetTimeOut()

void eVision::EQRCodeReader::SetTimeOut ( uint64_t value)

Time-out for the EQRCodeReader::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.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EQRCodeReader::wrappedClass_