The Limits of QR Code Scanning Speed - How Many Times Can You Scan in One Second
Smartphone Scanning Speed - The Gap Between Perception and Measurement
When you scan a QR code with a smartphone, the result seems to appear almost instantly. Inside that "almost instantly," however, several processes are chained together at high speed. The camera captures a frame, the finder patterns are detected in the image, geometric correction is applied, the modules are sampled, and error correction is applied to decode the data. On a typical smartphone, this whole sequence finishes in a very short time.
In a 1993 book, the usability researcher Jakob Nielsen put the limit at which users perceive something as "instant" at about 0.1 seconds (100 milliseconds), and QR code processing on a typical smartphone feels even shorter than this limit. In other words, when we feel that a code was "read in an instant," an enormous number of calculations is actually being carried out inside the smartphone.
Where Is the Bottleneck
There are three main factors that limit QR code scanning speed.
1. Camera frame rate: A smartphone camera usually captures video at 30 fps (30 frames per second). This means an image of the QR code can be captured only once every 33 milliseconds or so, even at the fastest. A 60 fps camera shortens this to about 16 milliseconds, but a higher frame rate is meaningless if image processing cannot keep up.
2. Finder pattern detection: Finding the three finder patterns in an image requires scanning the whole image, so the amount of computation is large. The higher the image resolution, the longer the scan takes. Efficient algorithms commonly use a two-stage method that first shrinks the image and scans it, then detects the candidates precisely at the original resolution once they are found.
3. Error correction decoding: Decoding a Reed-Solomon code involves polynomial arithmetic over a finite field, so the computation time increases as the amount of data grows. For a high-capacity QR code at error correction level H, decoding can also take longer.
The World of Industrial High-Speed Scanners
On factory production lines, the QR codes on products moving quickly along a conveyor need to be scanned dozens of times per second. In this field, which demands speeds of a completely different order from smartphones, dedicated industrial scanners are used.
Some fixed industrial scanners can read 60 or more QR codes per second. To achieve this, dedicated image processing chips (FPGAs or ASICs) process finder pattern detection and decoding in parallel at the hardware level. Their architecture is fundamentally different from that of smartphones, which handle the processing in software on a general-purpose CPU.
Note that laser scanners are mainly for barcodes (one-dimensional codes), and QR codes are read with camera-based (image sensor) readers.
The Theoretical Speed Limit
The theoretical upper limit of QR code scanning speed is determined not by the speed of light but by the amount of computation in image processing. When a QR code of the smallest size, version 1 (21 by 21 modules), is processed with an optimized algorithm, the computation needed for one decode is estimated at about 100,000 operations. Considering the number of operations a typical CPU can process per second (several billion), tens of thousands of decodes per second are possible in theory.
In practice, however, there are bottlenecks other than computation, such as the camera frame rate, image transfer speed, and memory access speed, so the theoretical value is never reached. The realistic upper limit is thought to be around several hundred times per second, even with dedicated hardware.
This speed far exceeds the speed of human perception. There is a limit to how fast the human eye can distinguish individual frames, and several hundred scans per second is, for a human, the same as "scanning continuously."
The Trade-Off Between Speed and Accuracy
Pursuing scanning speed carries the risk of sacrificing accuracy. If you lower the resolution to shorten image processing time, the black-and-white judgment of small modules becomes ambiguous and the probability of misreading rises. If you simplify error correction processing, resistance to dirt and damage decreases.
The optimal balance in this trade-off between speed and accuracy differs depending on the use. On factory lines, a "redundant scanning" method is sometimes used, in which the same QR code is scanned several times and the correct result is decided by majority vote. Rather than raising the accuracy of a single scan from 99% to 99.9%, scanning three times and adopting the result that matches two or more times can be more advantageous for achieving both speed and accuracy.