CVB++ 15.0
Reader Class Reference

The key class for reading barcodes. More...

#include <cvb/barcode/reader.hpp>

Static Public Member Functions

template<class T >
static std::shared_ptr< T > Decode (ReaderConfigPtr configMap, const ImagePlane &imagePlane, Rect< int > aoi=Rect< int >())
 This function initiates the decoding of barcodes and dynamically casts the result. More...
 
static ReadResultPtr Decode (ReaderConfigPtr configMap, const ImagePlane &imagePlane, Rect< int > aoi=Rect< int >())
 This function initiates the decoding of barcodes. More...
 
static ReadResultDataMatrixPtr TeachDottedDataMatrix (ReaderConfigPtr configMap, const ImagePlane &imagePlane, Rect< int > aoi=Rect< int >())
 Teach a dotted data matrix code into a configuration. More...
 

Detailed Description

The key class for reading barcodes.

Member Function Documentation

◆ Decode() [1/2]

static std::shared_ptr< T > Decode ( ReaderConfigPtr  configMap,
const ImagePlane imagePlane,
Rect< int >  aoi = Rect<int>() 
)
inlinestatic

This function initiates the decoding of barcodes and dynamically casts the result.

This function is the key function for the decoding of barcodes. In general, you pass an image and a configuration to the function and the results will be returned. The template is used to dynamically cast the resulting object to the specified one.

Parameters
[in]configMapThe configMap parameter contains all active configurations. A configuration specifies all the conditions which need to be taken into consideration when acquiring barcodes. I.e., which barcodes are to be recognised and what restrictions apply.
[in]imagePlaneThe imagePlane parameter contains the image object in which barcodes are to be read. The plane must be 8 bits deep and unsigned. The maximum possible extension of the image object in the X and Y direction is 16384. If the image object is larger, the search area is automatically restricted to the maximum permitted area.
[in]aoiThis parameter specifies the area in the image in which the barcode is searched. It is used to restrict the barcode search to a rectangular area within the image object. In this way it is possible to read two or more different barcodes in an image by restricting the search to the area occupied by the barcode. If the entire image were to be specified, the search would terminate when the first barcode is found.
Returns
It stores information related to the encoded barcode. Only one barcode can be decoded at a time. Therefore the ReadResult contains the symbology and the location of the decoded barcode.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Decode() [2/2]

static ReadResultPtr Decode ( ReaderConfigPtr  configMap,
const ImagePlane imagePlane,
Rect< int >  aoi = Rect<int>() 
)
inlinestatic

This function initiates the decoding of barcodes.

This function is the key function for the decoding of barcodes. In general, you pass an image and a configuration to the function and the results will be returned.

Parameters
[in]configMapThe configMap parameter contains all active configurations. A configuration specifies all the conditions which need to be taken into consideration when acquiring barcodes. I.e., which barcodes are to be recognised and what restrictions apply.
[in]imagePlaneThe imagePlane parameter contains the image object in which barcodes are to be read. The plane must be 8 bits deep and unsigned. The maximum possible extension of the image object in the X and Y direction is 16384. If the image object is larger, the search area is automatically restricted to the maximum permitted area.
[in]aoiThis parameter specifies the area in the image in which the barcode is searched. It is used to restrict the barcode search to a rectangular area within the image object. In this way it is possible to read two or more different barcodes in an image by restricting the search to the area occupied by the barcode. If the entire image were to be specified, the search would terminate when the first barcode is found.
Returns
It stores information related to the encoded barcode. Only one barcode can be decoded at a time. Therefore the ReadResult contains the symbology and the location of the decoded barcode. Depending on the symbology the resulting shared pointer needs to be dynamically casted to the correct class to access all results.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ TeachDottedDataMatrix()

static ReadResultDataMatrixPtr TeachDottedDataMatrix ( ReaderConfigPtr  configMap,
const ImagePlane imagePlane,
Rect< int >  aoi = Rect<int>() 
)
inlinestatic

Teach a dotted data matrix code into a configuration.

In general, you pass an image and a configuration to the function and the results will be returned.

Parameters
[in]configMapThe configMap parameter contains all active configurations. A configuration specifies all the conditions which need to be taken into consideration when acquiring barcodes. I.e., which barcodes are to be recognised and what restrictions apply.
[in]imagePlaneThe imagePlane parameter contains the image object in which barcodes are to be read. The plane must be 8 bits deep and unsigned. The maximum possible extension of the image object in the X and Y direction is 16384. If the image object is larger, the search area is automatically restricted to the maximum permitted area.
[in]aoiThis parameter specifies the area in the image, in which the barcode is searched. It is used to restrict the barcode search to a rectangular area within the image object. In this way it is possible to read two or more different barcodes in an image by restricting the search to the area occupied by the barcode. If the entire image were to be specified, the search would terminate when the first barcode is found.
Returns
DataMatrix reading result
Exceptions
Anyexception derived from std::exception including CvbException.