Class for decoding. More...
#include <decl_decoder.hpp>
Public Member Functions | |
std::vector< Result > | Execute (const ImagePlane &plane, const Rect< int > &aoi) |
Performs the decoding. | |
std::vector< Result > | Execute (const ImagePlane &plane) |
Performs the decoding. | |
template<Symbology SYM> | |
Config::Mapper< SYM >::Type & | Config () |
Retrieves the configuration object for a specific symbology. | |
void | SetBasicInkjetDPMEnabled (bool value) |
Enables or disables the reading of Basic Inkjet DPM (Direct Part Marking) codes. | |
bool | IsBasicInkjetDPMEnabled () const |
Checks whether the Basic Inkjet DPM mode is enabled. | |
void | SetAllCommon1DCodesEnabled (bool value) |
Enables all common 1D codes. | |
bool | AllCommon1DCodesEnabled () const |
Checks whether all common 1D codes are enabled. | |
void | SetAll2DCodesEnabled (bool value) |
Enables all 2D codes. | |
bool | All2DCodesEnabled () const |
Checks whether all 2D codes are enabled. | |
void | SetCustomPerformance (CustomPerformance value) |
Sets the custom image processing method used to optimize decoding robustness and performance. | |
CodeReader::CustomPerformance | CustomPerformance () const |
Retrieves the custom image processing method used to optimize decoding robustness and performance. | |
void | SetDetectorDensity (int value) |
Sets the detector density to control the search aggressiveness for small codes. | |
int | DetectorDensity () const |
Retrieves the detector density to control the search aggressiveness for small codes. | |
Static Public Member Functions | |
static std::unique_ptr< Decoder > | Create () |
Creates and returns a new Decoder instance. | |
Class for decoding.
This class provides the core functionality for detecting and decoding codes in images. Each codes type can be configured using its corresponding configuration class.
To decode an image containing a supported codes, start by creating a decoder. You can configure your decoder using the member function Decoder::Config(), which returns a reference to the desired configuration class. The configuration class is specified by the CodeReader::Symbology template. All supported codes types are enumerated in the enum class CodeReader::Symbology.
After configuring the decoder, load an image containing the codes(s) and execute the decoding process. The following code snippet demonstrates how to decode an image containing Data Matrix and QR codes:
|
inline |
Checks whether all 2D codes are enabled.
true
if all 2D codes are enabled, false
otherwise.
|
inline |
Checks whether all common 1D codes are enabled.
true
if all common 1D codes are enabled, false
otherwise.
|
inline |
Retrieves the configuration object for a specific symbology.
Use this function to access the configuration settings for a particular symbology. After creating a decoder, you can obtain the desired configuration object as shown below:
Alternatively, you can utilize the fluent interface pattern for seamless configuration:
SYM | The symbology for which the configuration is retrieved. |
|
inlinestatic |
Creates and returns a new Decoder instance.
std::unique_ptr
pointing to the newly created Decoder object.
|
inline |
Retrieves the custom image processing method used to optimize decoding robustness and performance.
|
inline |
Retrieves the detector density to control the search aggressiveness for small codes.
For detals refer to SetDetectorDensity
.
|
inline |
Performs the decoding.
Up to 256 codes can be detected using this function.
plane | The image plane containing the code(s) to be decoded. |
|
inline |
Performs the decoding.
For further details see function Execute(const ImagePlane &).
plane | The image plane containing the code(s) to be decoded. |
aoi | The area of interest within the image where the decoding operation will be performed. |
|
inline |
Checks whether the Basic Inkjet DPM mode is enabled.
true
if the Basic Inkjet DPM mode is enabled, false
otherwise.
|
inline |
Enables all 2D codes.
value | Set to true to enable all 2D codes. |
|
inline |
Enables all common 1D codes.
Enables Code128, Code39, UPCA, UPCE, EAN8, EAN13, Interleaved2of5, Code93, GS1DataBar codes.
value | Set to true to enable all common 1D codes. |
|
inline |
Enables or disables the reading of Basic Inkjet DPM (Direct Part Marking) codes.
This setting applies exclusively to DPM codes. Enabling Basic Inkjet DPM allows for the reading of low-quality inkjet images.
value | Set to true to enable Basic Inkjet DPM, false otherwise. |
|
inline |
Sets the custom image processing method used to optimize decoding robustness and performance.
The default setting is CustomPerformance::None.
value | Value for image processing method. |
|
inline |
Sets the detector density to control the search aggressiveness for small codes.
Lower values increase the robustness when decoding small or poorly printed 2D codes, but may result in longer decoding times. Higher values reduce decoding time, but may decrease robustness for small codes. The default value is 3.
value | Detector density value between 1 and 4 (inclusive). |
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.