readBarcode
R2026bDetect and decode 1-D or 2-D barcode in image
Syntax
Description
specifies options using a name-value argument in addition to any combination of arguments
from previous syntaxes. For example, msg = readBarcode(___,Name=Value)GaussianSigma=1.0 applies a 2-D
Gaussian filter to the input image with a standard deviation set to
1.
[
additionally returns the format, msg,detectedFormat,loc] = readBarcode(___)detectedFormat, and location,
loc, of the detected barcode.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
The function detects only clearly visible barcodes.
Specifying a format can reduce the run time of the function by restricting the barcode search.
For noisy images with unclear barcodes, use image preprocessing functions, such as
imsharpen.The function detects only horizontally or vertically aligned barcodes. Use
imrotateto correct poorly aligned barcodes.
Extended Capabilities
Version History
Introduced in R2020aSee Also
Functions
imrotate|imsharpen|ocr|insertText|insertShape|insertMarker|readAprilTag



