Class for barcode decoding. More...
Inherits object.
Public Member Functions | |
Union[cvb.barcode.DataMatrix] | config (self, int symbology) |
Retrieves the configuration object for a specific barcode symbology. More... | |
cvb.barcode.Decoder | create () |
Creates and returns a new decoder object. More... | |
List[cvb.barcode.Result] | execute (self, cvb.ImagePlane plane) |
Performs the barcode decoding. More... | |
List[cvb.barcode.Result] | execute (self, cvb.ImagePlane plane, cvb.Rect aoi) |
Properties | |
is_basic_inkjet_dpm_enabled = property | |
bool: Gets or sets the status of the Basic Inkjet DPM (Direct Part Marking) code decoding feature. 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. 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:
Union[cvb.barcode.DataMatrix] config | ( | self, | |
int | symbology | ||
) |
Retrieves the configuration object for a specific 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:
symbology : int The barcode symbology for which the configuration is retrieved (see cvb.barcode.Symbology).
Union[cvb.barcode.DataMatrix] A reference to the configuration object corresponding to the specified symbology.
cvb.barcode.Decoder create | ( | ) |
List[cvb.barcode.Result] execute | ( | self, | |
cvb.ImagePlane | plane | ||
) |
Performs the barcode decoding.
plane : cvb.ImagePlane The image plane containing the barcode(s) to decode.
List[cvb.barcode.Result] A list of result objects containing the decoded barcode data.
List[cvb.barcode.Result] execute | ( | self, | |
cvb.ImagePlane | plane, | ||
cvb.Rect | aoi | ||
) |
plane : cvb.ImagePlane The image plane containing the barcode(s) to decode.
aoi : cvb.Rect The area of interest within the image where the decoding operation will be performed.
List[cvb.barcode.Result] A list of result objects containing the decoded barcode data.
|
static |
bool: Gets or sets the status of the Basic Inkjet DPM (Direct Part Marking) code decoding feature.
True if the decoding feature is enabled, False otherwise. This setting applies exclusively to DPM codes. Enabling Basic Inkjet DPM allows for the reading of low-quality inkjet images.