Zivid C++ API 2.19.0+b5c53d0f-1
Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult Class Reference

Information about a decoded linear (1D) barcode. More...

#include <Zivid/Experimental/Toolbox/Barcode.h>

Public Member Functions

ZIVID_CORE_EXPORT std::string code () const
 Get the code encoded in the barcode.
ZIVID_CORE_EXPORT LinearBarcodeFormat codeFormat () const
 Get the format of the code.
ZIVID_CORE_EXPORT PointXY centerPosition () const
 Get the location of the barcode in the 2D image.
ZIVID_CORE_EXPORT BoundingBox boundingBox () const
 Get the bounding box of the barcode in the 2D image.
ZIVID_CORE_EXPORT VectorXY orientation () const
 Get the orientation of the barcode in the 2D image.
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of the object.

Detailed Description

Information about a decoded linear (1D) barcode.

Member Function Documentation

◆ boundingBox()

ZIVID_CORE_EXPORT BoundingBox Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::boundingBox ( ) const

Get the bounding box of the barcode in the 2D image.

Returns
Bounding box as a BoundingBox

◆ centerPosition()

ZIVID_CORE_EXPORT PointXY Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::centerPosition ( ) const

Get the location of the barcode in the 2D image.

Returns
2D coordinates as a PointXY

◆ code()

ZIVID_CORE_EXPORT std::string Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::code ( ) const

Get the code encoded in the barcode.

Returns
Code as a string

◆ codeFormat()

ZIVID_CORE_EXPORT LinearBarcodeFormat Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::codeFormat ( ) const

Get the format of the code.

Returns
Format as a LinearBarcodeFormat enum value

◆ orientation()

ZIVID_CORE_EXPORT VectorXY Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::orientation ( ) const

Get the orientation of the barcode in the 2D image.

The orientation is the barcode's read direction, from its first bar to its last. An upright barcode points along the positive x-axis, and the same barcode upside down points along the negative x-axis.

Image pixel coordinates have x pointing right and y pointing down. So VectorXY::angleInDegrees() on the result is 0 for a barcode pointing right, and increases clockwise as the image is displayed.

Returns
A unit vector (VectorXY) in image pixel coordinates pointing in the barcode's read direction

◆ toString()

ZIVID_CORE_EXPORT std::string Zivid::Experimental::Toolbox::LinearBarcodeDecodingResult::toString ( ) const

Get string representation of the object.

Returns
LinearBarcodeDecodingResult as a string

The documentation for this class was generated from the following file: