Find barcode

Find barcode

Finds locations of barcodes in the specified region-of-interest of the input image.

Inputs

image
Input image.
maxDetections
The maximum number of bar codes to detect.
quietZoneWidth
Width of the quiet zone at both ends of the barcode. If the value is zero, the quiet zone width will be estimated automatically.
size
The size of the rectangle in which bar codes are searched. If size is undefined (either width or height is NAN), barcodes are searched in the whole image. Otherwise the region of interest is determined by size and frame.
frame
The location of a region-of-interest for the detector. A coordinate frame in world coordinates.
threshold
Threshold for separating the bars of barcodes from the background. A possible method to set the threshold is to use the histogram tool to calculate a grayscale histogram and pass the histogram to the threshold finding tool.
orientation
A-priori information about the orientation of the barcode. Setting this parameter improves the probability of correct detection if the information is available. If orientation is Horizontal, only bars with orientation [-45..+45] and [135..225] degrees are searched. If orientation is Vertical, only bars with orientation [-45..-135] and [+45..+135] degrees are searched. The default value is Unknown.
preferredAngle
A-priori information about the orientation of the barcode. Setting this parameter favors barcodes which have orientation near the given angle. This improves the probability of correct detection if the information is available. The default value is NAN, which means no preference.

Outputs

frame
A coordinate frame for each detected bar code. Each frame is a 4-by-4 matrix totaling in a 4N-by-4 matrix.
size
The size (width, height) of each detected bar code in the corresponding frame. An N-by-2 matrix.