Transform-aligned Shapes overlays
Builds '<layer> codes' preserving scale, rotation, shear and affine transforms: four-corner polygons for matrix codes and scan lines for 1D barcodes.
Pair interactive Shapes overlays with the Python scan_layer helper for reproducible imaging workflows.
Builds '<layer> codes' preserving scale, rotation, shear and affine transforms: four-corner polygons for matrix codes and scan lines for 1D barcodes.
Invoke scan_layer(layer, profile, budget_ms) from Python scripts or napari's console to inspect features['text'] and metadata['qrcode_barcode_scanner'].
Decodes 2D greyscale, RGB, RGBA and full-resolution multiscale layers using active contrast limits; split 3D stacks via Layers → Split Stack first.
Generate a known reference image, execute the scan and check the decoded output character by character.
Create a text QR code encoding https://qrcode-ai.com/ and save it as qr-reference.png.
from napari_qrcode_barcode_scanner import scan_layer
data, meta, kind = scan_layer(viewer.layers["qr-reference"], profile="full", budget_ms=0)
print([text for text in meta["features"]["text"]])napari draws the QR code boundary on a transform-aligned Shapes layer and returns the exact URL inside meta['features']['text'].
Sample result for qr-reference.png.
Setup routes, 2D layers vs 3D stacks, Shapes transforms, scan_layer scripting and licensing.
Execute python -m pip install napari-qrcode-barcode-scanner inside your napari environment (or append [all] to install napari and Qt together), or navigate to Plugins → Install/Uninstall Plugins in napari and search qrcode. Refer to napari hub and PyPI.
No. The plugin handles 2D greyscale, RGB and RGBA layers (plus multiscale images at full resolution). For 3D stacks or volumes, separate slices first via Layers → Split Stack or project the volume onto a 2D plane.
No. Pixels are read into memory through the layer's active contrast limits without altering the original image layer, and all detections are written to a separate '<layer> codes' Shapes layer.
Matrix symbols (including QR Code and Data Matrix) are outlined using their four corners, whereas 1D barcodes appear as the scanned line across the bars. Because the Shapes layer inherits the image's scale, translation, rotation, shear and affine transform, overlays stay accurately aligned.
Yes. Import scan_layer from napari_qrcode_barcode_scanner and pass your napari image layer alongside profile and budget_ms. The function returns (data, meta, kind), placing decoded strings inside meta['features']['text'] and the complete report inside meta['metadata']['qrcode_barcode_scanner'].
Images exceeding 10,000 pixels along either side, or 64 million total pixels, return a QRS- error code. Since scanning executes synchronously while the napari UI waits, configure a budget_ms cap whenever running full on very large images.
Yes. Both the plugin source code and the current PyPI engine wheel are open-source under the MIT licence and free to execute offline, independent of QR Code AI generation credits or paid plans.
Refer to the official package listing and README for installation notes, limits and supported symbologies.