Barcode Reader
This function block reads barcodes and QR codes from image input and returns an annotated image plus decoded information. It works with common barcode types and is designed for quick integration into inspection or logging flows.
π₯ Inputs
Barcode Image Image that contains a barcode or QR code to be decoded. Can be color or grayscale.
π€ Outputs
Barcode Image Annotated image. When a code is detected, the result shows visual markers (boxes/labels) on the image.
Barcode Type Detected barcode type (for example QR, CODE128, etc.).
Barcode Data Decoded payload contained in the barcode or QR code (text or numeric content).
πΉοΈ Controls
This function block has no interactive controls. It runs automatically when an image is provided.
π¨ Features
Fast barcode and QR decoding on a single image input.
Visual feedback via annotated image to confirm detection location.
Returns both the decoded data and the detected code type for downstream processing.
π Usage Instructions
Provide an image to the
Barcode Imageinput from any image-producing block (for example a camera or image loader).Inspect the
Barcode Imageoutput to verify detection visually.Use the
Barcode TypeandBarcode Dataoutputs to trigger logic, logging, or storage.
π Evaluation
When the block receives an image, it analyzes the frame for barcode patterns. If a code is found, the block outputs an annotated image, the detected code type, and the decoded data. If nothing is found, the annotated image is returned unchanged and the data outputs will indicate no detection.
π‘ Tips and Tricks
Combine with
Image ROI Selectto crop the region around a label or package before feeding it to this block. Cropping reduces false detections and speeds up processing.If the barcode is small or low-contrast, try
Image Resizeto enlarge the area of interest before decoding.Use
Blursparingly to reduce noise before decoding when images are grainy; in some cases a mild blur improves detection.When barcodes are printed on complex backgrounds, apply
Image Thresholdto increase the contrast between code and background.Preview results with
Show Imageto confirm detection and bounding visuals in the UI.For automated logging of decoded values, send
Barcode DatatoCSV Exportor save frames withImage Loggerfor audit trails.For batch or file-based workflows, load images with
Load Image From Pathand process them through this block.
π οΈ Troubleshooting
No code detected
Ensure the barcode region is clearly visible and not heavily blurred, occluded or too small.
Try cropping the area with
Image ROI Selectand increasing the image size withImage Resize.Improve contrast using
Image Thresholdor adjust lighting in the capture step.
Incorrect or garbled data
Check image quality and alignment of the code. Rotation or perspective distortion can harm decoding β crop and align the region first.
If multiple codes overlap, isolate them using
Image ROI Selector preprocessing filters.
Too many false positives
Restrict the input area via
Image ROI Selector add simple filtering (thresholding, color filters) before decoding.
If you need to inspect image frames visually during setup, connect the output to Show Image to confirm how the block annotates detected codes.
Last updated
Was this helpful?