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.
Picture | Analyze |
---|---|
![]() | Positioning markings : Indicate the direction of the QR code. |
![]() | Alignment markings :If the QR code is large, these additional elements help with positioning. |
![]() | Timing pattern:Through these lines, the scanner can identify how large the matrix is. |
![]() | Version 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. |
![]() | Format information:Format patterns contain information about fault tolerance and data masking patterns and make scanning code easier. |
![]() | Data and error correction keys:These modes save actual data. |
![]() | Quiet zone: This area is very important for the scanner. Its function is to separate itself from the surroundings. |
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.
Source code path:~/dofbot_ws/src/dofbot_visual/simple_qrcode
Install
python3 -m pip install qrcode pyzbar
sudo apt-get install libzbar-dev
Code path:~/orbbec_ws/src/astra_visual/qrcode/QRcode_Create.py
xxxxxxxxxx
cd ~/orbbec_ws/src/astra_visual/qrcode
python 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
xxxxxxxxxx
cd ~/orbbec_ws/src/astra_visual/qrcode
python 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.