Browse docsvision.qr
On this page
API method

vision.qr

Configures native QR detection and returns a qr value.

Syntax

Atlas Script
vision.qr(roi?, enabled?)

Parameters

roi Optional
Optional region of interest: a four-value [x, y, width, height] array. Pass null when the method accepts a full-frame scan.
enabled Optional
Optional boolean that turns this configured tool on or off. Use true to process it and false to keep its configuration without running it.

Return value

Returns qr.

Remarks

Configures native QR detection and returns a qr value. Read/set enabled, overlay, roi; read results, count, target.

Examples

Read QR and barcode text.atlas
qr qrCodes = vision.qr(null, true);
barcode barcodes = vision.barcode(null, true);

event on_frame() {
    target qrResult = qrCodes.target;
    target barcodeResult = barcodes.target;
    if (qrResult != null) {
        ui.status(string.format("QR: {}", qrResult.text));
    } else if (barcodeResult != null) {
        ui.status(string.format("Barcode: {}", barcodeResult.text));
    } else {
        ui.status("No code detected");
    }
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.