Skip to content

QR code detection

Locate QR structures, rectify the code and decode its payload.

Try it on your image ↓

VISUAL WALKTHROUGHDetection
REFERENCE INPUTA code seen in perspective

The illustrative module grid is a schematic, not a valid encoded marker.

RESULTValidate and decode

A candidate must pass the dictionary or code validity checks before it yields a payload. The schematic grid above is not decoded.

STEP 03 / 03

Decode codewords and apply error correction.

Illustrative example. The stages explain the method; they are not a live OpenCV execution.

Try it on an image

YOUR IMAGE · REAL OPENCV

Experiment at pixel level

Open full lab ↗

Detect and decode a QR code in your image. An empty result means no readable code was found.

The engine loads on your first run. Your images stay in this browser.

Input448 × 320
OutputWaiting for a result

Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.

Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Hover to inspect. Click to pin a pixel.
Input
Select a pixel

Output
Select a pixel

Sample models and licenses

When to use it

Read QR labels in images or browser camera frames.

How it works

  1. 01Locate candidate finder-pattern arrangements.
  2. 02Estimate code geometry and sample its module grid.
  3. 03Decode codewords and apply error correction.

finder patterns → module grid → decoded bytes

What to tune

Choose single or multi-code methods. Preserve adequate module resolution and inspect both returned geometry and decoded data.

Where it breaks down

Some detector variants require application-supplied models. A detected quadrilateral can still fail to decode.

TypeScript API

Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.

All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.