Qraft

What Happens Inside Your Phone the Moment You Scan

7 Processes in One Second

When you point your camera at a pattern, seven processes run at high speed: (1) capture frame, (2) detect candidate region, (3) locate finder patterns and calculate position/angle, (4) divide into grid and classify each cell, (5) convert binary to text, (6) error correction, (7) recognize URL and launch browser. Modern phones attempt detection 30-60 times per second.

Steps 1-2: Capture and Detection

The image is converted to black and white (binarization), then dense black pixel clusters are identified as candidates. Good contrast makes detection instant; poor lighting causes failures. That's why 'scan in bright light' advice exists.

Steps 3-4: Position and Grid

Three finder patterns determine exact position, size, and tilt. Tilt correction enables angled scanning. The grid uses relative brightness comparison between neighboring cells, working even under uneven lighting.

Steps 5-6: Decode and Error Correction

The binary sequence is decoded according to format specifications. Reed-Solomon error correction simultaneously repairs damaged data, recovering up to 30% corruption.

Step 7: URL Recognition

If the decoded string is a URL, the OS launches the browser. Other data types (phone, email, Wi-Fi) trigger their respective apps. iPhone shows a yellow banner; Android typically auto-launches. All seven steps complete within one second.