Read barcode

Read barcode

Reads value of a barcode either along a line specified by start and end points, or from a bounding box specified by frame and size.

Inputs

image
Input image.
codeType
The type of the barcode to be recognized.
readingMode
If readingMode is 'SingleLine', the barcode is assumed to be between the points defined by startPoint and endPoint. If readingMode is 'Area', the barcode is assumed to be within the bounding box defined by frame and size.
startPoint
Start point of the reading line in world coordinates. Used only if readingMode == 'SingleLine'.
endPoint
End point of the reading line in world coordinates. Used only if readingMode == 'SingleLine'.
frame
A coordinate frame which defines orientation of the bounding box in which the barcode is assumed to be. Used only if readingMode == 'Area'.
size
The size (width, height) of the bounding box in which the barcode is assumed to be. If size is undefined (either width or height is NAN), the tool assumes that the barcode fills the image entirely. Used only if readingMode == 'Area'.

Outputs

code
The contents of the barcode as an N-by-1 integer array.
correlation
Correlation metric of the selected code. This entity can be used for detecting code words which may be wrong but have passed the check sum by chance.

Location method for the barcode.

Enumerator
SingleLine 

Use a single line defined by start and end points.

Area 

Use an area defined by frame and size.