The pandemic has opened up new uses for QR codes, such as mobility pass scanners for certain activities. They are also used for air travel, buses, and even food menus. It\'s an intuitive mechanism that we\'ve already normalized.
But what\'s behind QR codes? How do they work?
To begin, the first elements to consider are the corner squares, which serve as the code\'s skeleton. When you scan a QR code with your phone, a program on the device starts looking for patterns in the image. Its main guides are the top corners and, at the bottom, the left corner.
Depending on the number of dots and squares, it will contain more or less information. More technically, bytes, or 8-bit blocks, are represented in the QR code as blocks of 8 white or black dots. For each bit I want to \"draw,\" I\'ll use a white square if the bit is 0 or a black square if it\'s 1.
The dot density of a QR code represents the amount of information it contains. Some images are configured to store the address of a web page, which only requires a few pixels, but the more text stored, the more dots and spaces there are within the code. Furthermore, the fact that they are black and white makes it easier for cameras to capture them quickly.
Although QR codes can be customized in color and shape, the generic choice of black and white is not accidental. The contrast helps cameras identify the codes even in low light. Additionally, the codes are surrounded by an empty frame, the so-called \"still zone,\" which helps isolate it from the rest of the environment, making it more recognizable to our cameras.
The smaller squares, called alignment squares, help the device correct the position and orientation of the code in the image, so that it can be read even if the photo is taken upside down.
Back to blog
Comments
0Be the first to comment