Coding method and decoding method of multi-frame matrix type two-dimensional code
By introducing the superframe structure and hue color reference unit into the matrix QR code, combined with the polar code and fountain code, the problem of limited performance of the matrix QR code in transmitting multiple color information is solved, and efficient information is achieved. Transmission and error correction capabilities, suitable for a variety of communication scenarios.
Patent Information
- Application Number
- CN202410694562.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-05-31
AI Technical Summary
Existing matrix QR codes have limited performance when transmitting multiple color information, are difficult to meet high data rate requirements, and have insufficient error correction coding capabilities to effectively identify multi-frame structures.
Using a multi-frame matrix QR code encoding method, through the superframe structure and hue color reference unit, combined with polar codes and fountain codes for error correction coding, a matrix QR code with multiple hues and multiple light and dark levels is generated to ensure that the receiving equipment Accurately identify multiple color information and provide good error correction and decoding capabilities.
It significantly improves the information capacity and anti-pollution ability of images, and can achieve higher information transmission rates through ordinary optical equipment without the need for radio frequency equipment. It is suitable for point-to-point and broadcast communication scenarios.
Smart Images

Figure CN118761430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to data recognition technology, and in particular to an encoding method and a decoding method of a multi-frame matrix two-dimensional code. Background Art
[0002] A two-dimensional code, also known as a two-dimensional barcode or QR code, refers to a barcode that is readable in another dimension based on a one-dimensional barcode. A rectangular pattern can be used to represent binary data, and the information contained therein can be obtained after being scanned by a device. The width of a one-dimensional barcode records data, while its length does not. Both the length and width of a two-dimensional code record data. Compared with a one-dimensional code (barcode) that only has information in the horizontal direction, a matrix two-dimensional code has a higher information density per unit area. For the same amount of encoded data, the area of the two-dimensional code to be printed and displayed will be smaller. In addition, a two-dimensional code has "positioning points" and "error correction mechanisms" that a one-dimensional barcode does not have. The error correction mechanism means that the information on the barcode can be correctly restored even if the barcode is contaminated or partially damaged.
[0003] The common technical elements of QR codes are listed below:
[0004] QR code geometric representation;
[0005] QR code printing or display;
[0006] deformation, dirt removal and error correction;
[0007] Error correction and decoding technology for image processing and recovery of data information.
[0008] In rectangular coding, the data module representing the smallest unit of data is square in shape. By performing a coloring image transformation (including three-dimensional transformation) on the data element, the data information can be restored. If black and white data units are used, the maximum amount of information that can be accommodated for a data unit matrix of M rows and N columns is MN bits. With the rapid development of portable mobile devices equipped with high-resolution cameras, matrix QR codes have also become popular and widely used in various information transmission and automation control fields.
[0009] The medium of the matrix QR code is mainly a static picture, and its design purpose is mainly used for short message transmission. The data transmission capacity cannot meet the business requirements of higher data rates. Due to the popularity of modern dynamic color display and imaging equipment, the equipment can generally effectively use multiple image frames to transmit more data, while effectively and accurately identifying a variety of hues and color information. As an enhancement technology of the original matrix QR code, in the patent application with publication number CN102750564A and the literature on the design of a data transmission system based on a QR code published by Tao Sunjie et al. in 2018, it is proposed to use multiple QR code image frames in the time domain to increase the information capacity; Publication number CN109254955A discloses a one-way file ferrying method and system between isolated networks based on QR codes, and proposes the use of fountain codes as error correction codes for QR code file transmission systems. However, none of the above prior arts has designed a matrix QR code that can effectively and accurately identify a variety of color information in the overall frame structure, and the degree of improvement in its performance is limited. Summary of the invention
[0010] Purpose of the invention: In view of the above problems, the purpose of the present invention is to provide an encoding method and a decoding method for a multi-frame matrix two-dimensional code, to design an enhanced matrix two-dimensional code with multiple hues and multiple brightness levels with a super-frame structure, to use a hue color reference unit to ensure that the receiving device can effectively and accurately identify a variety of color information, and at the same time, to cascade fountain codes and polarization codes as error correction codes, to provide good error correction and decoding capabilities for two-dimensional codes of various sizes.
[0011] Technical solution: On one hand, the present invention provides a method for encoding a multi-frame matrix two-dimensional code, comprising:
[0012] Convert the data characters to be transmitted into a bit stream to form a data information message;
[0013] The data information message is bit interleaved, polar code is selected as the error correction coding method, and an error correction coding sequence is generated;
[0014] Packing the error correction coding sequence according to the capacity of the superframe and the data frame and distributing it to one or more data frames in the superframe; wherein the superframe is synthesized by multiple image frames in time sequence, each image frame is a reference frame or a data frame, the reference frame is used to provide reference information for automatic decoding, and the data frame is used to carry data information;
[0015] In the data frame, the error correction code sequence is allocated to the three hue channels of red, blue and green, and the error correction code sequence is mapped into colors of different brightness according to different color brightness, and then the primary colors of the three hue channels are mixed to form different colors, and then a multi-color graphic mask is added to generate a multi-color matrix two-dimensional code data information unit; the data information unit is multiplexed with the geometric reference unit, the time positioning unit and the local control information unit on the image frame to generate a data frame;
[0016] In the reference frame, the control information is converted into an overall control information unit through graphic mapping and graphic masking, and multiplexed with a geometric reference unit, a time positioning unit, and a hue and color reference unit on the image frame to generate a reference frame;
[0017] Generate multiple data frames and multiple reference frames until all data information messages are mapped to the data frames;
[0018] Multiple data frames and multiple reference frames are time-multiplexed to generate a superframe consisting of multiple two-dimensional code image frames.
[0019] Furthermore, the data information message is bit interleaved, polar code is selected as the error correction coding method, and the process of generating an error correction coding sequence includes:
[0020] Set the size to B File The data information message of bytes is converted into bits and divided into N FT source code blocks, each block is of size B FData bits; Indicates rounding up;
[0021] By performing block XOR operations on multiple randomly selected source code blocks, Luby code blocks are continuously generated. The size of each Luby code block is B. FData Bit;
[0022] Use Polar code as inner code and place N in each data frame. PENC Polar code blocks, the length of the code block is N Polar bits, the coding rate is η Polar , the information bits of each coding block are (B FData +L) bit, N PENC Luby coded blocks are added with L CRC check bits, and then Polar coded respectively to form a total length of N PENC N Polar A coded sequence of bits;
[0023] N PENC N Polar The bit coding sequence is bit interleaved and N Ctrl bit data frame control information, generating N PENC N Polar +N Ctrl The error correction coding sequence of bits is sent to the data area of the data frame.
[0024] Further, within the data frame and the reference frame, the geometric reference unit is used for geometric positioning and tilt correction of the QR code;
[0025] The time positioning unit is used to receive frame sequence information, and at the same time provide the interval information of the previous and next frames, the start and end marks of the superframe, and identify whether the frame is a reference frame or a data frame.
[0026] Furthermore, the overall control information unit is used to provide necessary control information related to the superframe, including the number of image frames contained in a superframe, the refresh time of the image frame, and the geometric size of the QR code;
[0027] The hue color reference unit is used to provide image reference hue information and reference color brightness;
[0028] The local control information unit is used to store the local control information in the data frame.
[0029] Another aspect of the present invention provides a method for decoding a multi-frame matrix two-dimensional code, comprising the following steps:
[0030] Step 1: at the receiving end, a received image of a superframe is stored in a buffer, a reference frame of the superframe is located and extracted from the buffer, the QR code is located using a geometric reference unit, and the control information is identified through an overall control information unit;
[0031] Step 2, extracting hue reference information and color brightness reference information using a hue color reference unit in the reference frame;
[0032] Step 3, locate and extract the data frame of the superframe from the buffer, use the geometric reference unit to locate and remove the mask, use the hue reference information to make a brightness level decision on each hue channel of each data information unit, and extract the data frame bit sequence after hard decision;
[0033] Step 4, using fountain code to perform error correction decoding according to the data frame bit sequence;
[0034] Step 5: If the data information message in the image superframe cannot be recovered, repeat the above steps 1 to 4 until the decoding is successful, or the maximum number of attempts is reached and the receiving end notifies the sending end of the reception success or failure.
[0035] Further, according to the data frame bit sequence, the process of using the fountain code to perform error correction decoding includes:
[0036] In the data frame multi-channel detection, N PENC N Polar +N Ctrl bits, obtain frame control information, and then pass through the deinterleaver to generate N PENC N Polar Polar coded blocks of bits;
[0037] Take the fountain code as the outer code, and PENC NPolar The Polar coded blocks of bits are decoded by CA-SCL respectively. If the CRC check fails, all bits of the current coded block are discarded as deleted bits. If the CRC check passes, the Luby coded block is deinterleaved and sent to the next level for fountain code decoding. The size of each Luby coded block is B. FData Bit;
[0038] The fountain decoder accumulates Luby coded blocks and attempts fountain code decoding until the decoding succeeds or the maximum number of attempts is reached.
[0039] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0040] The present invention defines a superframe structure based on matrix-type two-dimensional code transmission. The superframe structure can ensure the reliability of multiplexing multiple matrix-type two-dimensional codes in the time domain, and the information capacity is increased compared with the single-frame two-dimensional code. A reference frame is added to the superframe structure to provide geometry, hue and color reference for data reception, so as to ensure that the receiving device accurately restores the information on each hue channel, and can provide a higher information capacity. At the same time, based on the superframe structure, polarization codes are used as inner codes and fountain codes are used as outer codes for error correction coding, which further improves the image's anti-pollution and anti-damage capabilities compared to the Reed-Solomon code used in the QR code. By using the above multi-frame two-dimensional code structure, there is no need to deploy radio frequency equipment, and only ordinary optical color display and imaging equipment are used at the transmitting and receiving ends to achieve a certain information transmission rate. Therefore, due to its flexibility and simplicity, it can be widely used in point-to-point and broadcast communication scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of a method for encoding a multi-frame matrix two-dimensional code in an embodiment;
[0042] Figure 2 A schematic diagram of the structure of a superframe in an embodiment;
[0043] Figure 3 It is a flowchart of a decoding method of a multi-frame matrix two-dimensional code in an embodiment;
[0044] Figure 4 It is a flowchart of error correction code encoding and decoding in the embodiment. DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0049] Embodiment 1
[0050] The method for encoding a multi-frame matrix two-dimensional code described in this embodiment is as follows: Figure 1 As shown, including:
[0051] Convert the data characters to be transmitted into a bit stream, which as a whole constitutes a data information message;
[0052] The data information message is bit interleaved, polar code is selected as the error correction coding method, and an error correction coding sequence is generated;
[0053] Packing the error correction coding sequence according to the capacity of the superframe and the data frame and distributing it to one or more data frames in the superframe; wherein the superframe is synthesized by multiple image frames in time sequence, each image frame is a reference frame or a data frame, the reference frame is used to provide reference information for automatic decoding, and the data frame is used to carry data information;
[0054] In the data frame, the error correction code sequence is allocated to the three hue channels of red, blue and green, and the error correction code sequence is mapped into colors of different brightness according to different color brightness, and then the primary colors of the three hue channels are mixed to form different colors, and then a multi-color graphic mask is added to generate a multi-color matrix two-dimensional code data information unit; the data information unit is multiplexed with the geometric reference unit, the time positioning unit and the local control information unit on the image frame to generate a data frame;
[0055] In the reference frame, the control information is converted into an overall control information unit through graphic mapping and graphic masking, and multiplexed with a geometric reference unit, a time positioning unit, and a hue and color reference unit on the image frame to generate a reference frame;
[0056] Generate multiple data frames and multiple reference frames until all data information messages are mapped to the data frames;
[0057] Multiple data frames and multiple reference frames are time-multiplexed to generate a superframe consisting of multiple two-dimensional code image frames.
[0058] The present invention defines a superframe structure based on matrix-type two-dimensional code transmission. The superframe structure can ensure the reliability of multiplexing multiple matrix-type two-dimensional codes in the time domain, and increase the information capacity compared to the single-frame two-dimensional code. A reference frame is added to the superframe structure to provide geometry, hue and color reference for data reception, so as to ensure that the receiving device accurately restores the information on each hue channel, and can provide a higher information capacity. At the same time, based on the superframe structure, polarization code is used as an inner code for error correction coding, which further improves the image anti-pollution and anti-damage capabilities relative to the Reed-Solomon code used in the QR code. Finally, it should be pointed out that the above multi-frame two-dimensional code structure does not require the deployment of radio frequency equipment, and only ordinary optical color display and imaging equipment are used at the transmitting and receiving ends to achieve a certain information transmission rate. Therefore, due to its flexibility and simplicity, it can be widely used in point-to-point and broadcast communication scenarios. For example, using a color display device with a frame rate of 24 frames / second, a multi-hue multi-brightness level two-dimensional code superframe with a duration of 1 second can reach an information capacity of about 24*6=144 times that of a single-frame black and white two-dimensional code. It is known that the information capacity of version 40 QR code is about 3K bytes, so the maximum capacity of the QR code superframe proposed above is about 0.4M bytes / second, which can carry a high-definition video stream equivalent to 1080P, that is, 3500Kbps. If it is expanded into a multiple superframe in time and space, and the potential of the equipment is tapped, the information capacity can be further increased, and even multi-channel 4K high-definition image transmission can be carried out.
[0059] Furthermore, the data information message is bit interleaved, polar code is selected as the error correction coding method, and the process of generating an error correction coding sequence includes:
[0060] Set the size to B File The data information message of bytes is converted into bits and divided into N FT source code blocks, each block is of size B FData bits; Indicates rounding up;
[0061] By performing block XOR operations on multiple randomly selected source code blocks, Luby code blocks are continuously generated. The size of each Luby code block is B. FData Bit;
[0062] Use Polar code as inner code and place N in each data frame. PENC Polar code blocks, the length of the code block is N Polar bit, N PENC Each Luby coded block uses L-bit CRC check and then performs Polar coding, where the information bit of each coded block is (B FData + L) bits, the encoded length is N PENC NPolar The coding rate is η Polar =(B FData +L) / N Polar ;
[0063] N PENC N Polar The bit coding sequence is bit interleaved and N Ctrl bit data frame control information, generating N PENC N Polar +N Ctrl The error correction coding sequence of bits is sent to the data area of the data frame.
[0064] Furthermore, multiple matrix-type two-dimensional code image frames are combined into a superframe in time sequence, and the sending device continuously displays the image frames in the superframe within a certain time period, such as Figure 2 As shown, a superframe has N d Data frames (with Figure 2 The shaded rectangle with the "number" in the middle represents) and N r Reference frames (with Figure 2 The reference frame includes a geometric reference unit, a time positioning unit, an overall control information unit, and a hue and color reference unit. The data frame includes a geometric reference unit, a time positioning unit, a local control information unit, and a data information unit. In the data frame and the reference frame, the geometric reference unit is used for the geometric positioning and tilt correction of the QR code; the time positioning unit is used to receive the frame sequence information, and at the same time provide the interval information of the previous and next frames, the start and end marks of the superframe, and identify whether the frame is a reference frame or a data frame. The overall control information unit is used to provide the necessary control information related to the superframe, including the number of image frames contained in a superframe, the refresh time of the image frame, and the geometric size of the QR code; the hue and color reference unit is used to provide the image reference hue information and reference color brightness; the local control information unit is used to store the local control information in the data frame. The data information unit is used for this type of module to transmit information using image color brightness, and has three hue channels of red, blue, and green. The hue channels are independent of each other, and the three hue channels of red, blue, and green can be encoded with different color brightness to send and receive information. The receiving end can accurately estimate and judge the received color brightness level based on the hue color reference unit without worrying about imaging problems such as color shift. For example, if the red, blue, and green color brightness is divided into four levels (2 bits): dark, gradually dark, gradually bright, and bright, then for one matrix unit, 2*3=6 bits of information can be transmitted.
[0065] The present invention is improved and implemented on the basis of the national standard of QR code (National Information Technology Standardization Technical Committee. GB / T18284-2000 Quick Response Matrix Code [S]. Beijing: China Standards Press, 2001) and the international standard (International Organization for Standardization. ISO / IEC 18004:2015 Automatic identification International Organization for Standardization, 2015), wherein the functional modules related to positioning, geometric processing, and black and white processing still follow the design of the national standard and international standard of QR code, and the relevant functional graphics remain unchanged; at the same time, the mask function of the two-dimensional code also follows the national standard and international standard of QR code. The main modification of the present invention lies in the design of the reference frame and the design of the hue color reference unit in the data frame, which is partially realized by redesigning the coding area of the national standard and international standard of QR code. The following is an example of the QR code version 6 in the national standard of QR code, where each image frame contains 41×41 modules. In this embodiment, three hue channels of red, green and blue are used. Each hue channel carries 2 bits of information and is divided into four brightness levels: dark / fading / fading / bright. The RGB format is used to describe the color space, and the maximum brightness value of each hue channel is set to 255 and the minimum value is set to 0.
[0066] At the transmitting end, the image frame rate is 24 frames / second, and there are 4 superframes in 1 second, each superframe has 6 image frames. In this embodiment, the reference frame and the data frame are multiplexed at a ratio of 1:5, where the first frame is the reference frame and the other 5 frames are data frames. Since the device is relatively stationary during the code recognition period, the accuracy of the hue and color reference value can be guaranteed.
[0067] The realization image of the reference frame corresponds to the grayscale image of three different hue channels of red, green and blue. In the reference frame, the hue color reference unit is placed in the original coding area, and after multiplexing with the geometric reference unit and the time positioning unit, a reference frame is formed. According to the national standard of QR code and the international standard version 6QR code, there are 1383 hue color reference units.
[0068] In the original coding area of the reference frame, red / green / blue / white and red / green / blue / black color reference units are periodically placed. The brightness of each red, green and blue reference unit is (255,0,0), (0,255,0), (0,0,255) respectively. The black brightness value is (0,0,0) and the white brightness is (255,255,255). It can also be configured as other three complementary color channels (such as cyan, magenta and yellow) without affecting the performance.
[0069] A realization image of a data frame corresponds to a grayscale image of three different hue channels: red, green, and blue. The functional unit of the data frame remains in black and white. Each unit in the coding area uses three hue channels. Each hue channel has four brightness levels: dark / fading / fading / bright. Different brightness levels are displayed as different grayscale values. There are 64 color distinctions in the three channels. Each coding area module carries 6 bits of original information. According to the national and international standards of QR codes, the coding area can carry a total of 1383*6=8298 bits.
[0070] Embodiment 2
[0071] The decoding method of a multi-frame matrix two-dimensional code described in this embodiment is as follows: Figure 3 As shown, the following steps are included:
[0072] Step 1: at the receiving end, a received image of a superframe is stored in a buffer, a reference frame of the superframe is located and extracted from the buffer, the QR code is located using a geometric reference unit, and the control information is identified through an overall control information unit;
[0073] Step 2, extracting hue reference information and color brightness reference information using a hue color reference unit in the reference frame;
[0074] Step 3, locate and extract the data frame of the superframe from the buffer, use the geometric reference unit to locate and remove the mask, use the hue reference information to make a brightness level decision on each hue channel of each data information unit, and extract the data frame bit sequence after hard decision;
[0075] Step 4, using fountain code to perform error correction decoding according to the data frame bit sequence;
[0076] Step 5: If the data information message in the image superframe cannot be recovered, repeat the above steps 1 to 4 until the decoding is successful, or stop when the maximum number of attempts is reached, and the receiving end notifies the sending end of the success or failure of the reception.
[0077] The present invention uses fountain codes as outer codes for error correction decoding in the decoding stage, continuously receives data frames over a period of time, and accumulates the received information until the broadcast information can be finally restored, thereby providing good error correction decoding capabilities for two-dimensional codes of various sizes; the receiving device uses the hue color reference unit of the reference frame to accurately estimate and judge the received color brightness, and based on this information, it can eliminate the effects of color cast and the like, thereby providing conditions for the correct reception of multi-hue and multi-brightness data frames without worrying about imaging problems such as hue shift.
[0078] Furthermore, according to the data frame bit sequence, the process of using the fountain code to perform error correction decoding includes:
[0079] In the data frame multi-channel detection, N PENC N Polar +N Ctrl bits, obtain frame control information, and then pass through the deinterleaver to generate N PENC N Polar Polar coded blocks of bits;
[0080] Take the fountain code as the outer code, and PENC N Polar The Polar coded blocks of bits are decoded by CA-SCL respectively. If the CRC check fails, all bits of the current coded block are discarded as deleted bits. If the CRC check passes, the Luby coded block is deinterleaved and sent to the next level for fountain code decoding. The size of each Luby coded block is B. FData Bit;
[0081] The fountain decoder continuously accumulates Luby coded blocks and attempts fountain code decoding until the decoding is successful or the maximum number of attempts is reached and the decoding fails. Finally, the decoding result is notified to the sender.
[0082] In one example, in step 2, the hue reference information and color brightness reference information are extracted from the reference frame using the hue color reference unit, and the hue reference information is used to determine the brightness level of each hue channel of each data information unit. Taking the QR code national and international standard version 6 QR code as an example, there are 1383 hue color reference units. On the unit in the i-th row and j-th column, the decision thresholds of four brightness levels of dark / gradually dark / gradually bright / bright are determined for each hue channel. The decision threshold is determined based on the RGB values of the surrounding hue color reference units and remains unchanged within a super frame time.
[0083] Similarly, in step 3, the hue reference information is used to judge the brightness level of each hue channel of each data information unit. On the hue color reference unit in the i-th row and j-th column, a brightness detection judgment is performed on each hue channel. The judgment threshold is determined according to the RGB values of the surrounding hue color reference units and remains unchanged within a super frame time. Each data frame can recover 1383*6=8298 bits. Assuming that the implementation efficiency of error correction decoding is η, the theoretical information rate of the above scheme is: 8298×20×η≈176ηKps.
[0084] The following is an overall description of the specific implementation of error correction coding. In the specific implementation case, a cascade coding configuration method is used in which the inner code is a polar code and the outer code is a fountain code. Assume that the size of the file to be transmitted is 1024*768 bits. Figure 4 As shown, the process of error correction coding is as follows:
[0085] The file is divided into 1024 source blocks, each with a size of 768 bits. Luby coding blocks are continuously generated by performing XOR operations on multiple randomly selected source code blocks. The size of each Luby coding block is 768 bits. Polar code is used as the inner code, and 8 Polar code coding blocks are placed in a data frame. The block length is 1024 bits, the coding rate is about 3 / 4, and the information bit is 768 bits. Take out the 8 Luby coding blocks generated in the previous step, add 24 CRC check bits to each, and then perform Polar coding. After Polar coding is completed and 8*1024=8192 coding bits are formed, they are bit interleaved (interleaver length 8192 bits) and 106 bits of local control information (all set to 0 in this example) are added, totaling 8292 bits, which are sent to the data frame for image coding.
[0086] The process of error correction decoding is as follows:
[0087] The frame sequence information is obtained from the 8292 bits recovered by multi-channel detection of the data frame, and then passed through the deinterleaver (deinterleaver length 8192 bits) to form 8 1024-bit Polar coding blocks. CA-SCL decoding is performed on the 8 1024-bit Polar coding blocks. If the CRC check fails, all bits of the current coding block are discarded as deleted bits; if the CRC check passes, the recovered Luby coding block is sent to the next level fountain decoder. In this process, the block error rate is calculated as ∈. The fountain decoder gradually accumulates Luby coding blocks and continuously attempts to decode until the decoding is successful. According to theoretical analysis, about 1024 (1+∈) coding blocks are required to restore the original file. The receiving end notifies the sending end of successful reception, or if the maximum number of attempts is reached and the reception is still not correct, the sending end is notified of the failure of reception.
[0088] Assuming the block error rate ∈ = 0.05, the theoretical information rate is: Using a 41×41 QR code, it takes less than 15 seconds to transmit a data file of about 100Kbyte. From the above examples, it can be seen that despite using a small- to medium-sized version 6 QR matrix two-dimensional code, the encoding and decoding method of the present invention can still achieve a certain information transmission rate and can be used for the transmission of small and medium-sized files.
Claims
1. A method for encoding a multi-frame matrix two-dimensional code, characterized in that: include: Convert the data characters to be transmitted into a bit stream to form a data information message; The data information message is bit interleaved, polar code is selected as the error correction coding method, and an error correction coding sequence is generated; Packing the error correction code sequence according to the capacity of the superframe and the data frame and distributing it to one or more data frames in the superframe; The superframe is synthesized from multiple image frames in time sequence, and each image frame is a reference frame or a data frame. The reference frame is used to provide reference information for automatic decoding, and the data frame is used to carry data information. In the data frame, the error correction code sequence is allocated to the three hue channels of red, blue and green, and the error correction code sequence is mapped into colors of different brightness according to different color brightness, and then the primary colors of the three hue channels are mixed to form different colors, and then a multi-color graphic mask is added to generate a multi-color matrix two-dimensional code data information unit; the data information unit is multiplexed with the geometric reference unit, the time positioning unit and the local control information unit on the image frame to generate a data frame; In the reference frame, the control information is converted into an overall control information unit through graphic mapping and graphic masking, and multiplexed with a geometric reference unit, a time positioning unit, and a hue and color reference unit on the image frame to generate a reference frame; Generate multiple data frames and multiple reference frames until all data information messages are mapped to the data frames; Multiple data frames and multiple reference frames are time-multiplexed to generate a superframe consisting of multiple two-dimensional code image frames.
2. The method for encoding a multi-frame matrix two-dimensional code according to claim 1, characterized in that: The process of bit-interleaving the data information message and selecting the polar code as the error correction coding method to generate the error correction coding sequence includes: Set the size to B File The data information message of bytes is converted into bits and divided into N FT source code blocks, each block is of size B FData bits; Indicates rounding up; By performing block XOR operations on multiple randomly selected source code blocks, Luby code blocks are continuously generated. The size of each Luby code block is B. FData Bit; Use Polar code as inner code and place N in each data frame. PENC Polar code blocks, the length of the code block is N Polar bits, the coding rate is η Polar , the information bits of each coding block are (B FData +L) bit, N PENC Luby coded blocks are added with L CRC check bits, and then Polar coded respectively, forming a total length of N PENC N Polar A coded sequence of bits; N PENC N Polar The bit coding sequence is bit interleaved and N Ctrl bit data frame control information, generating N PENC N Polar +N Ctrl The error correction coding sequence of bits is sent to the data area of the data frame.
3. The encoding method of a multi-frame matrix two-dimensional code according to claim 1, characterized in that: In the data frame and reference frame, the geometric reference unit is used for the geometric positioning and tilt correction of the QR code; The time positioning unit is used to receive frame sequence information, and at the same time provide the interval information of the previous and next frames, the start and end marks of the superframe, and identify whether the frame is a reference frame or a data frame.
4. The method for encoding a multi-frame matrix two-dimensional code according to claim 1, characterized in that: The overall control information unit is used to provide necessary control information related to the superframe, including the number of image frames contained in a superframe, the refresh time of the image frame, and the geometric size of the QR code; The hue color reference unit is used to provide image reference hue information and reference color brightness; The local control information unit is used to store the local control information in the data frame.
5. A method for decoding a multi-frame matrix two-dimensional code, characterized in that: The following steps are involved: Step 1: at the receiving end, a received image of a superframe is stored in a buffer, a reference frame of the superframe is located and extracted from the buffer, the QR code is located using a geometric reference unit, and the control information is identified through an overall control information unit; Step 2, extracting hue reference information and color brightness reference information using a hue color reference unit in the reference frame; Step 3, locate and extract the data frame of the superframe from the buffer, use the geometric reference unit to locate and remove the mask, use the hue reference information to make a brightness level decision on each hue channel of each data information unit, and extract the data frame bit sequence after hard decision; Step 4, using fountain code to perform error correction decoding according to the data frame bit sequence; Step 5: If the data information message in the image superframe cannot be recovered, repeat the above steps 1 to 4 until the decoding is successful, or the maximum number of attempts is reached and the receiving end notifies the sending end of the reception success or failure.
6. A method for decoding a multi-frame matrix two-dimensional code according to claim 5, characterized in that: According to the data frame bit sequence, the process of error correction decoding using fountain code includes: In the data frame multi-channel detection, N PENC N Polar +N Ctrl bits, obtain frame control information, and then pass through the deinterleaver to generate N PENC N Polar Polar coded blocks of bits; Take the fountain code as the outer code, and PENC N Polar The polar coding blocks of bits are CA-SCL decoded respectively. If the CRC check fails, all bits of the current coding block are discarded as deleted bits. If the CRC check passes, the recovered Luby coded block is sent to the next level for fountain code decoding through deinterleaving; the size of each Luby coded block is B FData Bit; The fountain decoder accumulates Luby coded blocks and attempts fountain code decoding until the decoding succeeds or the maximum number of attempts is reached.
Citation Information
Patent Citations
Data reader, data reading method and data recorder
CN102142077A
Method of encoding / decoding color QR code
CN104899630A
Method and system for colour calibration using a barcode
CN112369020A
Code reading device and method for color image
JP2000322508A
Two-dimensional code, methods and apparatuses for generating, displaying and reading the same
US20040182930A1
Cited By
Manufacturing method and device for reliably transmitting high-density two-dimensional code by using camera
CN119402141A
Non-standard data standardized transmission method based on machine readable codes
CN120911505A
