![]() |
Zivid C++ API 2.17.1+7516d437-1
|
Class for enabling the detection of barcodes. More...
#include <Zivid/Experimental/Toolbox/Barcode.h>
Public Member Functions | |
| ZIVID_CORE_EXPORT | BarcodeDetector () |
| Constructor. | |
| ZIVID_CORE_EXPORT Settings2D | suggestSettings (Camera &camera) const |
| Get 2D capture settings that are ideal for barcode reading with the given camera. | |
| ZIVID_CORE_EXPORT std::vector< LinearBarcodeDetectionResult > | readLinearCodes (const Frame2D &frame2d, const LinearBarcodeFormatFilter &formatFilter=LinearBarcodeFormatFilter::all()) const |
| Detect and decode linear (1D) barcodes based on the result of a 2D capture. | |
| ZIVID_CORE_EXPORT std::vector< MatrixBarcodeDetectionResult > | readMatrixCodes (const Frame2D &frame2d, const MatrixBarcodeFormatFilter &formatFilter=MatrixBarcodeFormatFilter::all()) const |
| Detect and decode matrix (2D) barcodes based on the result of a 2D capture. | |
| ZIVID_CORE_EXPORT std::string | toString () const |
| Get string representation of the object. | |
Class for enabling the detection of barcodes.
Constructing an instance of this class initializes the resources needed for efficient barcode detection. For repeated detection it is recommended to keep and re-use an instance of this class and not create a new one every time.
The recommended workflow for detecting barcodes with an instance of this class is:
| ZIVID_CORE_EXPORT Zivid::Experimental::Toolbox::BarcodeDetector::BarcodeDetector | ( | ) |
Constructor.
| ZIVID_CORE_EXPORT std::vector< LinearBarcodeDetectionResult > Zivid::Experimental::Toolbox::BarcodeDetector::readLinearCodes | ( | const Frame2D & | frame2d, |
| const LinearBarcodeFormatFilter & | formatFilter = LinearBarcodeFormatFilter::all() ) const |
Detect and decode linear (1D) barcodes based on the result of a 2D capture.
By default this function will attempt to detect and decode all supported barcode formats. Users can achieve increased detection speed and reliability by using the formatFilter argument to specify a subset of formats, for example LinearBarcodeFormat::ean13 | LinearBarcodeFormat::ean8.
| frame2d | A Frame2D instance from a 2D or 2D+3D capture |
| formatFilter | A filter defining which barcode formats to look for. |
| ZIVID_CORE_EXPORT std::vector< MatrixBarcodeDetectionResult > Zivid::Experimental::Toolbox::BarcodeDetector::readMatrixCodes | ( | const Frame2D & | frame2d, |
| const MatrixBarcodeFormatFilter & | formatFilter = MatrixBarcodeFormatFilter::all() ) const |
Detect and decode matrix (2D) barcodes based on the result of a 2D capture.
By default this function will attempt to detect and decode all supported barcode formats. Users can achieve increased detection speed and reliability by using the formatFilter argument to specify a subset of formats, for example MatrixBarcodeFormat::qrcode | MatrixBarcodeFormat::dataMatrix.
| frame2d | A Frame2D instance from a 2D or 2D+3D capture |
| formatFilter | A filter defining which barcode formats to look for. |
| ZIVID_CORE_EXPORT Settings2D Zivid::Experimental::Toolbox::BarcodeDetector::suggestSettings | ( | Camera & | camera | ) | const |
Get 2D capture settings that are ideal for barcode reading with the given camera.
| camera | The camera to find barcode settings for. |
| ZIVID_CORE_EXPORT std::string Zivid::Experimental::Toolbox::BarcodeDetector::toString | ( | ) | const |
Get string representation of the object.