Class for barcode decoding. More...
#include <decl_decoder.hpp>
Public Member Functions | |
std::vector< Result > | Execute (const ImagePlane &plane, Rect< int > aoi) |
Performs the barcode decoding. More... | |
std::vector< Result > | Execute (const ImagePlane &plane) |
Performs the barcode decoding. More... | |
template<Symbology SYM> | |
Config::Mapper< SYM >::Type & | Config () |
Retrieves the configuration object for a specific barcode symbology. More... | |
void | SetEnableBasicInkjetDPM (bool value) |
Enables or disables the reading of Basic Inkjet DPM (Direct Part Marking) codes. More... | |
bool | EnabledBasicInkjetDPM () const |
Checks whether the Basic Inkjet DPM mode is enabled. More... | |
Static Public Member Functions | |
static std::unique_ptr< Decoder > | Create () |
Creates and returns a new Decoder instance. More... | |
Class for barcode decoding.
This class provides the core functionality for detecting and decoding barcodes in images. Each barcode type can be configured using its corresponding configuration class.
To decode an image containing a supported barcode, 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 Barcode::Symbology template. All supported barcode types are enumerated in the enum class Barcode::Symbology.
After configuring the decoder, load an image containing the barcode(s) and execute the decoding process. The following code snippet demonstrates how to decode an image containing Data Matrix and QR codes:
|
inline |
Retrieves the configuration object for a specific barcode symbology.
Use this function to access the configuration settings for a particular barcode 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 barcode 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 |
Checks whether the Basic Inkjet DPM mode is enabled.
true
if the Basic Inkjet DPM mode is enabled, false
otherwise.
|
inline |
Performs the barcode decoding.
plane | The image plane containing the barcode(s) to decode. |
|
inline |
Performs the barcode decoding.
plane | The image plane containing the barcode(s) to decode. |
aoi | The area of interest within the image where the decoding operation will be performed. |
|
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. |