QR Code - Dynamsoft Barcode Reader SDK
What is a QR Code?
A QR code (abbreviated from Quick Response code) is a type of two-dimensional barcode. It consists of black squares arranged in a square grid on a white background, which can be read by a camera, scanner, or other imaging devices.
A common QR code looks like this:
Initially developed by Toyota subsidiary Denso in September 1994, it is currently defined by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) 18004.
A QR code is a type of matrix barcode that can encode a wide variety of data types including numeric, alphabetic, special characters, and binary data. QR codes rose in popularity with mobile devices.
The QR code was designed to allow high-speed component scanning. It has full (360 degrees) reading features. Each QR code has a finder pattern located in three of its corners.
Different Members of the QR Code
According to ISO/IEC 18004, there are four related members in the QR code family:
QR Code Model 1 - the original edition. Model 1 QR Code can encode 1,167 numeric, 468 bytes, or 707 alphanumeric characters. Model 1 is only recommended for closed system applications.
QR Code Model 2 - the basis of ISO/IEC 18004 standard. Model 2 is an enhanced edition of Model 1. It expands the Version from 14 (73 × 73 modules) to 40 (177 × 177 modules). Therefore, Model 2 can store more information.
Standard QR Code - the second edition of ISO/IEC 18004 standard. This edition is similar to Model 2 and it is the common symbol in the barcoding market now. By default, we are talking about the Standard QR code.
Micro QR Code - a variation of Standard QR code. Micro QR code was created by Denso Wave and used to identify small items.
Specifications and Imaging Geometry
- 1. Cell - square modules in a regular square array
- 2. Finder patterns - three identical shapes located in all corners except the bottom right corner
- 3. Timing patterns - black and white modules allowing a scanner to determine the width of a module
- 4. Alignment patterns - used to compensate for some image distortion
- 5. Quiet zone border - a required border used by scanner software to determine when a QR code physically begins and ends
Density and size
QR code is a high-density two-dimensional barcode. It ranges from Version 1 to Version 40. The Version Information represents the number of cells (per side) making up the code.
Each version has a different number of modules, commencing with Version 1 (21 × 21 modules) up to Version 40 (177 × 177 modules). Each higher version number comprises 4 additional modules per side.
The Version Information alone does not determine the final print-out size. The physical size also depends on hardware configurations such as the printing resolution.
QR code has 40 possible sizes. The minimum size for a smartphone to read is 2.5 cm² (1 inch).
Character Set and Capacity
QR code supports any ASCII character (value 0-127). It can encode 7,089 numeric, 1,817 Kanji (Chinese characters), 2,953 byte or 4,296 alphanumeric characters.
Error Detection and Correction
QR code uses the Reed-Solomon algorithm for error detection and correction. The higher the error correction level, the less storage capacity. Four selectable levels of error correction are available, which enables the barcode to be read even if up to 30% of the code is damaged.
How Dynamsoft Barcode Reader (DBR) Decodes a QR Code
- 1. Dynamsoft Barcode Reader SDK locates the QR code by finding the quiet zone around the boundary of the QR Code.
- 2. The SDK identifies the QR code via finder patterns. Finder patterns tell the reader where the edges of the QR code are.
- 3. DBR detects where the columns and rows of black and white dots are by scanning timing patterns.
- 4. The results are returned.
How DBR Overcomes Technical Decoding Hurdles
Read Damaged QR Codes: If you try to read a damaged QR code by using the DBR SDK, you can adjust some parameters to help with localization and detection. Learn more.
Restore Incomplete QR Codes: The DBR algorithm tries to complete any missing positioning information based on the finder pattern, the timing pattern, the quiet zone border, its size, etc. Learn more.
Optimize Decoding for Crumpled QR Codes: DBR uses pre-processing features to auto-deskew barcodes while maximizing their recognition accuracy. Learn more.
Where is a QR Code Used?
QR codes have become common in areas such as online or app payments, augmented reality, mobile operating systems, website login, loyalty programs, virtual stores, in marketing and advertising campaigns, and more.