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

  1. Provide an image to the Barcode Image input from any image-producing block (for example a camera or image loader).

  2. Inspect the Barcode Image output to verify detection visually.

  3. Use the Barcode Type and Barcode Data outputs 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 Select to 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 Resize to enlarge the area of interest before decoding.

  • Use Blur sparingly 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 Threshold to increase the contrast between code and background.

  • Preview results with Show Image to confirm detection and bounding visuals in the UI.

  • For automated logging of decoded values, send Barcode Data to CSV Export or save frames with Image Logger for audit trails.

  • For batch or file-based workflows, load images with Load Image From Path and 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 Select and increasing the image size with Image Resize.

    • Improve contrast using Image Threshold or 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 Select or preprocessing filters.

  • Too many false positives

    • Restrict the input area via Image ROI Select or 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?