QR code

1. Introduction to QR code

QR code is a type of two-dimensional barcode. QR comes from the abbreviation of "Quick Response" in English, which means quick response. It comes from the inventor's hope that the QR code can allow its content to be decoded quickly. QR code not only has large information capacity, high reliability and low cost, but can also represent various text information such as Chinese characters and images. It has strong confidentiality and anti-counterfeiting and is very convenient to use. What's more important is that the QR code technology is open source.

2.QR code structure

PictureAnalyze
imgPositioning markings : Indicate the direction of the QR code.
imgAlignment markings :If the QR code is large, these additional elements help with positioning.
imgTiming pattern:Through these lines, the scanner can identify how large the matrix is.
imgVersion information:Here specifies the version number of the QR code being used. Currently there are 40 different version numbers of QR codes. Version numbers used in the sales industry are usually 1-7.
imgFormat information:Format patterns contain information about fault tolerance and data masking patterns and make scanning code easier.
imgData and error correction keys:These modes save actual data.
imgQuiet zone: This area is very important for the scanner. Its function is to separate itself from the surroundings.

3.Features of QR code

The data values in the QR code contain repeated information (redundant values). Therefore, even if up to 30% of the QR code structure is destroyed, the readability of the QR code is not affected. The storage space of QR code is up to 7089 bits or 4296 characters, including punctuation marks and special characters, which can be written into QR code. In addition to numbers and characters, words and phrases (such as web addresses) can also be encoded. As more data is added to the QR code, the code size increases and the code structure becomes more complex.

4.QR code creation and recognition

Source code path:~/dofbot_ws/src/dofbot_visual/simple_qrcode

Install

Code path:~/orbbec_ws/src/astra_visual/qrcode/QRcode_Create.py

Input the content to be generated at the terminal and press the "Enter" key to confirm.

Code path: ~/orbbec_ws/src/astra_visual/qrcode/QRcode_Parsing.py

If the following situations occur, then unplug the camera and run it again.

After normal startup, place the QR code in front of the camera. After recognizing the QR code, the QR code will be framed and printed out.