The key class for reading barcodes.
More...
#include <cvb/barcode/reader.hpp>
The key class for reading barcodes.
◆ Decode() [1/2]
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] | configMap | The 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] | imagePlane | The 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] | aoi | This 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
-
◆ Decode() [2/2]
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] | configMap | The 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] | imagePlane | The 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] | aoi | This 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
-
◆ TeachDottedDataMatrix()
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] | configMap | The 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] | imagePlane | The 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] | aoi | This 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
-