Welcome to ROSMASTER M1 repository
1.QR code
QR code
1. Introduction to QR Codes
QR codes are a type of two-dimensional barcode. QR stands for "Quick Response," meaning quick response. Its creators hoped that QR codes would allow their content to be quickly decoded. QR codes not only offer large information capacity, high reliability, and low cost, but can also represent various textual information, including Chinese characters and images. They offer strong security and anti-counterfeiting features and are extremely convenient to use. Most importantly, QR code technology is open source.
2. Structure of QR Codes
| Image | Analysis |
|---|---|
![]() | Positioning markings indicate the orientation of the QR code. |
![]() | Alignment markings: These additional elements aid in positioning when the QR code is large. |
![]() | Timing pattern: These lines allow the scanner to identify the size of the matrix. |
![]() | Version information: This specifies the version of the QR code being used. Currently, there are 40 different versions of QR codes. Versions used in the point-of-sale industry are typically 1-7. |
![]() | Format information: The format pattern contains information about error tolerance and data masking patterns, making scanning the code easier. |
![]() | Data and error correction keys: These patterns store the actual data. |
![]() | Quiet zone: This area is crucial for the scanner; it serves to separate itself from its surroundings. |
2.1 QR Code Characteristics
QR code data values contain repeated information (redundant values). Therefore, even if up to 30% of the QR code structure is corrupted, the code's readability is not affected. QR codes have storage space of up to 7089 bits or 4296 characters, including punctuation and special characters, which can be encoded. In addition to numbers and characters, words and phrases (such as URLs) can also be encoded. As more data is added to the QR code, the code size increases and the code structure becomes more complex.
2.2 QR Code Creation and Recognition
For PI5/JETSON NANO controllers, you must first enter the Docker container; for RDKX5 and Orin boards, this is not necessary.
Source code path: ~/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_vision
Installation
python3 -m pip install qrcode pyzbarsudo apt-get install libzbar-dev
- create
Create a qrcode object
xxxxxxxxxx ''' 参数含义 \ Parameter meaning: version:值为1~40的整数,控制二维码的大小(最小值是1,是个12×12的矩阵)。 \ An integer between 1 and 40 that controls the size of the QR code (the minimum value is 1, which is a 12×12 matrix).





