What is the recognition principle of QR code? Can it be counterfeited (imitated)?

Two-dimensional barcode / two-dimensional code is a specific geometric figure according to certain laws in the plane (two-dimensional direction) distribution of black and white graphic record data symbols of information; in the code compilation clever use of the composition of the computer's internal logical basis of the "0", "1 "The concept of bitstream.

Using a number of geometric shapes corresponding to the binary to indicate the text numerical value information, through the image input equipment or photoelectric scanning equipment to automatically read to realize the automatic processing of information:

It has a number of bar code technology **** sex: each code system has its own specific set of characters; each character occupies a certain width; with a certain checksum function, etc.. At the same time, it also has the function of automatic identification of different lines of information, and the handling of graphic rotation changes and other characteristics. Two-dimensional barcode/two-dimensional code can express information in both horizontal and vertical directions at the same time, so it can express a large amount of information in a small area.

The production of QR code generator needs a QR code generation algorithm, or a QR code plug-in, and then use JAVA, C#, VB and other programming languages to write a call software can be made into a QR code generator.

The two-dimensional code can be forged, the general two-dimensional code has no anti-counterfeiting function; individuals will be able to download from the Internet two-dimensional code generator, two-dimensional code. There are even some unscrupulous individuals who have designed QR codes with viruses to steal personal information from other people's cell phones. Experts advise cell phone users to be security conscious and not to easily scan suspicious QR codes from unknown sources.

Expanded:

. strong>

Simply put, a QR code is a way to translate the information you want to express into small black and white squares, and then fill in that big square. It's a bit similar to our high school answer key, which translates our language into a machine-recognizable language. To put it bluntly, it translates information such as numbers, letters, and Chinese characters into binary 0s and 1s through a specific code, where a 0 is a small white square and a 1 is a small black square.

Of course, there are a lot of error-correcting codes, if you need to encode 100 code words of data, and want to half of them, that is, 50 code words for error correction, the calculation is as follows. Error correction requires symbols equal to twice the number of code words, so in this case the number is 50 x 2 = 100 code words.

Thus, the total number of code words is 200, of which 50 are used for error correction, which means that 25% of the information in this QR code is used for error correction, so this explains why the QR code can be recognized even if it is missing a bit or wrinkled.

Some of you may ask why there are three big black squares on every QR code. That brings us to the following: how cell phones recognize QR codes.

Because objects of different colors reflect visible light at different wavelengths, white objects reflect various wavelengths of visible light, while black objects absorb various wavelengths of visible light.

So when the camera scans the black and white two-dimensional code, the cell phone uses the threshold theory of point operation to change the captured image into a binary image, i.e., the image is binarized, and after obtaining the binarized image, it performs the expansion operation on it, and performs the edge detection on the expanded image to get the outline of the barcode area.

References:

Baidu Encyclopedia - QR Code