An extended capacity two-dimensional code, three-dimensional code decoding method, system, device and medium

By determining the QR code module and the size of the small code dots, calculating the hierarchy of the small code dot matrix, using the Dark Module to determine the data location, and converting it into a two-dimensional matrix for decoding, the problem of limited storage capacity of hidden information in QR codes and poor decoding compatibility is solved, and fast and accurate extended QR code decoding is achieved.

CN115511031BActive Publication Date: 2025-10-24CN3WM XIAMEN NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211217727.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-10-24
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In existing technologies, the storage capacity of hidden information in QR codes is limited, and the decoding algorithm has poor compatibility, making it difficult to be compatible with the original QR code decoding.

Method used

By determining the module size and dot size of the QR code, the hierarchy of the dot matrix is ​​calculated. The Dark Module is used to determine which dots in the module contain data, and the module is converted into a two-dimensional matrix. Finally, the existing QR code decoding algorithm is used for decoding.

Benefits of technology

It achieves fast and accurate decoding, is compatible with normal QR codes in non-fragmented forms, expands the storage capacity of hidden information, and improves the decoding recognition speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511031B_ABST
    Figure CN115511031B_ABST
Patent Text Reader

Abstract

The application relates to a decoding method of an expanded two-dimensional code, each module of the expanded two-dimensional code being composed of N*N small code point matrices, and the method comprises the following steps: acquiring an expanded two-dimensional code image; performing binaryzation processing on the expanded two-dimensional code image; determining the position information of each locator and corrector of the two-dimensional code and the module size of the two-dimensional code according to the binaryzation-processed image; scanning and acquiring the size of the small code point in the binaryzation-processed image, calculating the order of the small code point matrix according to the module size and the size of the small code point; determining the size of the two-dimensional code according to the positions of the adjacent locators, and performing perspective transformation to obtain a correction code image according to the positions of each locator and corrector and the size of the two-dimensional code; determining the small code point containing data in the module according to the order of the small code point matrix and the Dark Module position of the two-dimensional code; converting all the modules in the current expanded two-dimensional code into two-dimensional 01 matrices; and decoding all the two-dimensional 01 matrices according to the decoding algorithm of the two-dimensional code.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an extended capacity two-dimensional code decoding method, system, device and medium, and belongs to the technical field of decoding of coded symbols. BACKGROUND

[0002] The two-dimensional code is also called a two-dimensional bar code. A common two-dimensional code is a QR code. QR stands for Quick Response. The QR code is a coding mode that is very popular on mobile devices in recent years. The QR code can store more information and represent more data types than a traditional bar code. With the wide application of smart phones and the rapid development of the Internet, the two-dimensional code has been widely applied as an entry for quick response. People can obtain the information they want by using the "scan" function of the mobile phone. The mainstream code scanning software and code reading devices on the market generally have the functions of generating and decoding two-dimensional codes. However, due to the open source nature of the two-dimensional code, third parties can easily forge two-dimensional codes.

[0003] The prior art such as the patent CN110991591A discloses a coding and decoding method, device, coding equipment and decoding equipment for two-dimensional codes. Hidden information is added in the spare area after the end symbol, and some information that is not suitable to be disclosed is encoded into the two-dimensional code for transmission. The disadvantage is that the amount of hidden information that can be stored in the remaining blank area is small. The storage capacity of the hidden information is limited by the length of the plaintext information under the same version. If the storage capacity of the hidden information is to be expanded, the length of the plaintext information needs to be reduced or the version of the two-dimensional code needs to be expanded.

[0004] In order to solve the problems existing in the prior art, the applicant provides a method for generating an extended capacity two-dimensional code and three-dimensional code. The hidden information is embedded in the code points according to the rules of code point fission and superposition. The method can better prevent the leakage of personal privacy information and ensure the security of the privacy information. However, the disadvantage of this scheme is that the coding rules of the two-dimensional code are changed, and the decoding algorithm is also changed accordingly. It is difficult to be compatible with the original two-dimensional code decoding, and the compatibility is poor. SUMMARY

[0005] In order to solve the problems existing in the prior art, the application provides a decoding method for an extended capacity two-dimensional code. The size of the module and the size of the small code point of the two-dimensional code are determined to obtain the order of the small code point matrix. Then, it is determined which small code points in the module contain data according to the DarkModule, so as to convert all modules into a two-dimensional matrix. Finally, the existing two-dimensional code decoding algorithm is used to decode the two-dimensional matrix.

[0006] The technical scheme of the application is as follows:

[0007] In one aspect, the application provides a decoding method of an expanded two-dimensional code, each module of the expanded two-dimensional code being composed of an N*N small code point matrix, comprising the following steps:

[0008] Obtaining an expanded two-dimensional code image;

[0009] Performing binaryzation processing on the expanded two-dimensional code image;

[0010] Determining the position information of each locator and corrector of the two-dimensional code and the module size data of the two-dimensional code according to the binaryzation-processed image;

[0011] Scanning the size data of the small code points in the binaryzation-processed image, and calculating the order of the small code point matrix according to the module size data and the size data of the small code points;

[0012] Determining the size of the two-dimensional code according to the position information of the adjacent locators, and performing perspective transformation to obtain a correction code image according to the position information of each locator and corrector and the size of the two-dimensional code;

[0013] Based on the correction code image, determining the position of the small code points containing data in the module of the current expanded two-dimensional code according to the order of the small code point matrix and the Dark Module module position of the two-dimensional code;

[0014] Converting all the modules in the current expanded two-dimensional code into a two-dimensional 01 matrix according to the position of the small code points containing data, and decoding all the two-dimensional 01 matrices according to the decoding algorithm of the two-dimensional code.

[0015] As a preferred embodiment, the method of performing binaryzation processing on the expanded two-dimensional code image is specifically:

[0016] Converting the expanded two-dimensional code image into a gray-scale image and performing local binaryzation processing to generate a black-and-white expanded three-dimensional code image.

[0017] As a preferred embodiment, the method of determining the position information of each locator and corrector of the two-dimensional code and the module size data of the two-dimensional code according to the binaryzation-processed image is specifically:

[0018] Including three locators and one corrector;

[0019] Identifying the part in which the proportion of black-and-white connected domain pixels in the horizontal and vertical directions is 1:1:3:1:1 as the position of the locator, and identifying the part in which the proportion of black-and-white connected domain pixels in the horizontal and vertical directions is 1:1:1:1:1 as the position of the locator, obtaining the center coordinates of each locator as the locator point coordinates, and obtaining the center coordinates of the corrector as the corrector point coordinates;

[0020] Determining the module side length of the two-dimensional code as m according to the number of pixels occupied by the black-and-white connected region.

[0021] As a preferred embodiment, the scanning obtains the size data of the small code points in the image after the binarization processing, and the method for calculating the order of the small code point matrix according to the size data of the module and the size data of the small code points is specifically:

[0022] The image after the binarization processing is scanned row by row, and the side length of the small code points in the image after the binarization processing is calculated as n;

[0023] The order of the small code point matrix is calculated according to the following formula:

[0024]

[0025] Wherein, N is the order of the small code point matrix, m is the side length of the two-dimensional code module, and n is the side length of the small code points.

[0026] As a preferred embodiment, the method for determining the size of the two-dimensional code according to the position information of the adjacent positioning symbols, and performing perspective transformation to obtain the correction code graph according to the position information of each positioning symbol and the correction symbol and the size of the two-dimensional code is:

[0027] The distance between the positioning points of the adjacent positioning symbols is determined;

[0028] The size of the version of the current expanded two-dimensional code is determined according to the distance between the positioning points;

[0029] The image after the binarization processing is subjected to perspective transformation according to the coordinates of the three positioning points and the coordinates of one correction point and the size of the version of the current expanded two-dimensional code, to obtain the correction code graph and the mapping relationship of the perspective transformation.

[0030] As a preferred embodiment, the method for determining the position of the small code points containing data in the module of the current expanded two-dimensional code according to the order of the small code point matrix and the Dark Module module position of the two-dimensional code based on the correction code graph is specifically:

[0031] The Dark Module in the correction code graph is obtained, and the Dark Module is divided into an N-order matrix with the same order as the small code point matrix;

[0032] The center position coordinates of each rectangular block in the divided Dark Module are obtained, the corresponding positions of the center positions of each rectangular block in the image after the binarization processing are obtained according to the mapping relationship of the correction code graph and the image after the binarization processing, and the pixel values of the corresponding positions are determined;

[0033] If the pixel value of the corresponding position corresponds to black, the corresponding rectangular block contains data, and the small code point at the corresponding position in the module of the current expanded two-dimensional code contains data; if the pixel value of the corresponding position corresponds to white, the corresponding rectangular block does not contain data.

[0034] In another aspect, the application also provides a decoding method of the expanded three-dimensional code, comprising the following steps:

[0035] An image of the expanded three-dimensional code is obtained, wherein the image of the expanded three-dimensional code is fused with the expanded two-dimensional code and the background picture according to any embodiment of the application;

[0036] The decoding method of the expanded two-dimensional code according to any embodiment of the application is used to decode the expanded two-dimensional code.

[0037] In another aspect, the application also provides a decoding system of the expanded two-dimensional code, wherein each module of the expanded two-dimensional code is composed of N*N small code point matrixes, and the decoding system comprises:

[0038] An original data acquisition module is configured to acquire an image of the expanded two-dimensional code;

[0039] A preprocessing module is configured to perform a binarization process on the image of the expanded two-dimensional code;

[0040] A module size acquisition module is configured to determine position information of each locator and correct symbol of the two-dimensional code and module size data of the two-dimensional code according to the binarized image;

[0041] A small code point matrix order calculation module is configured to scan the size data of the small code points in the binarized image, and calculate the order of the small code point matrix according to the module size data and the size data of the small code points;

[0042] A correction module is configured to determine the size of the two-dimensional code according to the position information of the adjacent locators, and perform a perspective transformation to obtain a corrected code image according to the position information of each locator and correct symbol and the size of the two-dimensional code;

[0043] A data point determination module is configured to determine the position of the data-containing small code points in the module of the current expanded two-dimensional code according to the order of the small code point matrix and the DarkModule module position of the two-dimensional code based on the corrected code image;

[0044] A decoding module is configured to convert all the modules in the current expanded two-dimensional code into two-dimensional 01 matrixes according to the position of the data-containing small code points, and decode all the two-dimensional 01 matrixes according to the decoding algorithm of the two-dimensional code.

[0045] In another aspect, the application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a decoding method of the expanded two-dimensional code according to any embodiment of the application when executing the program.

[0046] In still another aspect, the application further provides a computer readable storage medium, which has stored thereon a computer program, the program being executed by a processor to implement a decoding method of a capacity expansion two-dimensional code according to any one of the embodiments of the application.

[0047] The application has the following advantages:

[0048] 1. The decoding method of the capacity expansion two-dimensional code is used for the capacity expansion two-dimensional code in the form of module fission segmentation, the size of the module and the size of the small code point are determined to obtain the order of the small code point matrix, then it is determined according to the Dark Module which small code points in the module contain data, so as to convert all the modules into a two-dimensional matrix, finally the existing two-dimensional code decoding algorithm is used to decode the two-dimensional matrix, the recognition speed is fast, the accuracy is high, and the decoding can be performed on any fission condition of the two-dimensional code module.

[0049] 2. The decoding method of the capacity expansion two-dimensional code is used for the decoding algorithm of the existing two-dimensional code, and can be compatible with the normal two-dimensional code in the form of non-fission segmentation, so the use scene is rich. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 The method flowchart of the first embodiment of the application;

[0051] Figure 2 The example diagram of the capacity expansion two-dimensional code in the embodiment of the application;

[0052] Figure 3 The example diagram of the scanning and acquisition of the small code point side length in the embodiment of the application;

[0053] Figure 4 The size comparison example diagram of the two-dimensional code module and the small code point in the embodiment of the application;

[0054] Figure 5 The position diagram of the Dark Module in the embodiment of the application;

[0055] Figure 6 The module example diagram corresponding to the Dark Module in the black and white capacity expansion two-dimensional code image in the embodiment of the application;

[0056] Figure 7 The method flowchart of the second embodiment of the application;

[0057] Figure 8 The example diagram of the capacity expansion three-dimensional code in the embodiment of the application. DETAILED DESCRIPTION

[0058] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0059] It should be understood that the step numbers used herein are only for the convenience of description, and are not limited to the execution sequence of the steps.

[0060] It should be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0061] The terms "comprise" and "include" indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0062] The term "and / or" means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0063] Embodiment one:

[0064] Referring to Figure 1 , the embodiment provides a decoding method for an expanded two-dimensional code, each module in the expanded two-dimensional code is subjected to fission segmentation processing to form an N*N small code point matrix, as shown in Figure 2 , the decoding method specifically includes the following steps:

[0065] S100, an expanded two-dimensional code image is acquired by scanning through a code scanning device.

[0066] S200, a black and white expanded two-dimensional code image is generated by performing a binaryzation processing on the expanded two-dimensional code image.

[0067] S300, the position information of each locator and corrector in the two-dimensional code and the module size data of the two-dimensional code are determined according to the black and white expanded two-dimensional code image after the binaryzation processing, three locators and one corrector are included in a normal two-dimensional code, and the position information of the locators and the corrector can be used to position and correct the two-dimensional code image;

[0068] S400, determining the size of the current used two-dimensional code according to the position information of the adjacent locators, and performing perspective transformation to obtain the correction code graph according to the position information of the locators and the correction symbol and the size of the two-dimensional code;

[0069] S500, scanning the correction code graph to obtain size data of the small code points in the correction code graph, and obtaining the size ratio relationship between the small code points and the modules according to the module size data and the size data of the small code points, so as to calculate the order of the small code point matrix;

[0070] S600, determining the position of the small code points containing data in the module of the current expanded two-dimensional code according to the order of the small code point matrix and the position of the Dark Module of the two-dimensional code;

[0071] S700, converting all modules in the current expanded two-dimensional code into a two-dimensional 01 matrix according to the position of the small code points containing data, assuming that a two-dimensional code module contains y small code points, then reading the data area and the function area according to the arrangement order of the two-dimensional code module to form y two-dimensional 01 matrices, wherein 1 represents black and 0 represents white; performing Reed-Solomon error correction processing and decoding on all two-dimensional 01 matrices according to the existing decoding algorithm of the two-dimensional code to obtain the content data contained in the current expanded two-dimensional code.

[0072] As a preferred embodiment of the present embodiment, in step S200, the method of binarizing the expanded two-dimensional code image is specifically:

[0073] The expanded two-dimensional code image is subjected to grayscale processing to convert it into a grayscale image;

[0074] The grayscale image is then subjected to local binarization processing to generate a black-and-white expanded three-dimensional code image; binarization processing is a method of converting a grayscale image into a black-and-white image, which is divided into global binarization processing and local binarization processing, and more accurately, local binarization is called adaptive threshold binarization, which is a prior art and can be customized according to the width of a picture, which can be 1 / 8 of the width of a picture, and the present embodiment specifically adopts local binarization processing to binarize part of the area where the two-dimensional code is located.

[0075] As a preferred embodiment of the present embodiment, in step S300, the method of determining the position information of the locators and the correction symbol of the two-dimensional code and the module size data of the two-dimensional code according to the binarized image is specifically:

[0076] In the present embodiment, the expanded two-dimensional code includes three locators and one correction symbol;

[0077] S301, identify the part of the black and white connected domain pixels in the horizontal and vertical direction as 1:1:3:1:1 as the locator position; identify the part of the black and white connected domain pixels in the horizontal and vertical direction as 1:1:1:1:1 as the locator position, obtain the center coordinates of each locator as the positioning point coordinates, and obtain the center coordinates of the correction symbol as the correction point coordinates;

[0078] S302, determine the module length of the two-dimensional code as m according to the number of pixels occupied by the black and white connected region.

[0079] As a preferred embodiment of the present embodiment, in step S400, the scanning obtains the size data of the small code point in the correction code graph, and the method for calculating the order of the small code point matrix according to the module size data and the size data of the small code point is specifically:

[0080] S501, the image after binaryzation is scanned row by row (or interlaced scanning), and the length of the small code point in the image after binaryzation is calculated as n, as shown in the figure, the width of the smallest code point black pixel is found out, that is, the length; Figure 3

[0081] S502, then the order of the small code point matrix is calculated according to the following formula:

[0082]

[0083] Wherein, N is the order of the small code point matrix, m is the length of the two-dimensional code module, and n is the length of the small code point.

[0084] As shown in the figure, Figure 4 Figure 4 N=3, so the order of the current small code point matrix is 3, which is a 3*3 matrix, and the small code point matrix divides the module of the two-dimensional code into 3*3=9 parts; when m=n, it is a special case indicating that the two-dimensional code is not fission (normal two-dimensional code, not the expansion two-dimensional code described in the present embodiment), so the decoding method provided in the present embodiment is compatible with the decoding of normal two-dimensional code.

[0085] As a preferred embodiment of the present embodiment, in step S500, the method for determining the size of the two-dimensional code according to the position information of the adjacent locators, and performing perspective transformation to obtain the correction code graph according to the position information of each locator and the correction symbol and the size of the two-dimensional code is:

[0086] S501, determine the distance between the positioning points according to the positioning point coordinates of the adjacent locators;

[0087] S502, determine the size dimension of the current expansion two-dimensional code according to the distance between the positioning points and the size of the two-dimensional code module, wherein the relationship between the version and the size is the same as that of the normal two-dimensional code, that is:​​

[0088] dimension = 17 * version + 4;

[0089] S503, according to the coordinates of the three positioning points and the coordinates of a correction point, and the dimension of the current expanded two-dimensional code version N times and the positioning point and correction point coordinates of the standard dimension two-dimensional code, the perspective transformation is performed on the binary processed image to obtain a correction code graph, and a mapping relationship of the perspective transformation is obtained.

[0090] As a preferred embodiment of the present embodiment, in step S600, the method for determining the small code point position containing data in the module of the current expanded two-dimensional code according to the order of the small code point matrix and the Dark Module position of the two-dimensional code is specifically:

[0091] S601, obtaining the Dark Module, and dividing the Dark Module into an N-order matrix with the same order as the small code point matrix; as shown in the figure, according to the fact that the Dark Module of the two-dimensional code is a black module, it is determined which small code points contain data in the division fraction. Figure 5

[0092] S602, obtaining the center position coordinates of each rectangular block in the divided Dark Module, obtaining the corresponding position of each rectangular block in the black and white expanded two-dimensional code image according to the mapping relationship between the correction code graph and the binary processed image, and determining the pixel value of the corresponding position in the black and white expanded two-dimensional code image;

[0093] S603, referring to Figure 6 , if the pixel value of the corresponding position corresponds to black, the corresponding rectangular block contains data, and the small code point at the corresponding position in the module of the current expanded two-dimensional code contains data, that is, the small code point at the corresponding position in the small code point matrix contains data; if the pixel value of the corresponding position corresponds to white, the corresponding rectangular block does not contain data, and the small code point at the corresponding position in the module also does not contain data; as shown in the figure, Figure 6 Figure 6 , the upper left, middle and lower right positions of the Dark Module in the binary black and white expanded two-dimensional code image are black, and the upper left, middle and lower right small code points of all modules contain data.

[0094] Embodiment Two:

[0095] Referring to Figure 7 , the present embodiment provides a decoding method for an expanded three-dimensional code, comprising the following steps:

[0096] ​​A100, acquire the expanded three-dimensional code image, the expanded three-dimensional code image fuses the expanded two-dimensional code and the background picture as described in any embodiment of the present application, see Figure 8 ;

[0097] A200, decode the expanded two-dimensional code by using the decoding method of the expanded two-dimensional code described in embodiment one.

[0098] Embodiment three:

[0099] The embodiment provides a decoding system of the expanded two-dimensional code, each module of the expanded two-dimensional code is composed of N*N small code point matrix, comprising:

[0100] The original data acquisition module is used for acquiring the expanded two-dimensional code image; the module is used for realizing the function of step S100 in embodiment one, and details are not repeated here;

[0101] The preprocessing module is used for binarizing the expanded two-dimensional code image; the module is used for realizing the function of step S200 in embodiment one, and details are not repeated here;

[0102] The module size acquisition module is used for determining the position information of the positioning symbol and the correction symbol of the two-dimensional code and the module size data of the two-dimensional code according to the binarized image; the module is used for realizing the function of step S300 in embodiment one, and details are not repeated here;

[0103] The correction module is used for determining the size of the two-dimensional code according to the position information of the adjacent positioning symbol, and performing perspective transformation to obtain the corrected code image according to the position information of the positioning symbol and the correction symbol and the size of the two-dimensional code; the module is used for realizing the function of step S400 in embodiment one, and details are not repeated here;

[0104] The small code point matrix order calculation module is used for scanning and acquiring the size data of the small code point in the corrected code image, and calculating the order of the small code point matrix according to the module size data and the size data of the small code point; the module is used for realizing the function of step S500 in embodiment one, and details are not repeated here;

[0105] The data point determination module is used for determining the position of the small code point containing data in the current expanded two-dimensional code module according to the order of the small code point matrix and the position of the Dark Module module of the two-dimensional code; the module is used for realizing the function of step S600 in embodiment one, and details are not repeated here;

[0106] The decoding module is used for converting all the modules in the current expanded two-dimensional code into two-dimensional 01 matrix according to the position of the small code point containing data; and decoding all the two-dimensional 01 matrix according to the decoding algorithm of the two-dimensional code; the module is used for realizing the function of step S700 in embodiment one, and details are not repeated here.

[0107] Embodiment four:

[0108] The embodiment provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements a decoding method of a capacity-extended two-dimensional code or a decoding method of a capacity-extended three-dimensional code when executing the program.

[0109] Embodiment five:

[0110] The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executable on a processor to implement a decoding method of a capacity-extended two-dimensional code or a decoding method of a capacity-extended three-dimensional code.

[0111] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents that the front and rear associated objects are in an "or" relationship. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b, and c can be single or multiple.

[0112] Those skilled in the art can realize that the units and algorithm steps described in the embodiments disclosed in the present application can be realized by electronic hardware, computer software and combination of electronic hardware and computer software. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0114] In several embodiments provided in the present application, any function, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0115] The above description is only some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, based on the content of the specification and drawings of the present application, are also included in the patent protection scope of the present application.

Claims

1. A decoding method of a capacity-extended two-dimensional code, each module of the capacity-extended two-dimensional code being composed of an N*N small code point matrix, characterized in that, The method comprises the following steps: acquiring an expanded two-dimensional code image; performing binarization processing on the expanded two-dimensional code image; determining position information of each locator and corrector of the two-dimensional code and module size data of the two-dimensional code according to the binarization-processed image; scanning and acquiring size data of small code points in the binarization-processed image, and calculating the order of a small code point matrix according to the module size data and the size data of the small code points; determining the size of the two-dimensional code according to the position information of adjacent locators, and performing perspective transformation to obtain a correction code image according to the position information of each locator and corrector and the size of the two-dimensional code; based on the correction code image, determining the position of a small code point containing data in a module of the current expanded two-dimensional code according to the order of the small code point matrix and the Dark Module position of the two-dimensional code; converting all modules in the current expanded two-dimensional code into a two-dimensional 01 matrix according to the position of the small code point containing data, and decoding all two-dimensional 01 matrices according to a decoding algorithm of the two-dimensional code.

2. The decoding method of the capacity-extended two-dimensional code according to claim 1, wherein The method for performing binarization processing on the expanded two-dimensional code image is specifically: convert the expanded two-dimensional code image into a grayscale image and perform local binarization processing to generate a black-and-white expanded three-dimensional code image.

3. The decoding method of the capacity-extended two-dimensional code according to claim 2, wherein The method for determining the position information of each locator and corrector of the two-dimensional code and the module size data of the two-dimensional code according to the binarization-processed image is specifically: including three locators and one corrector; recognizing, in the horizontal and vertical directions, that a part with a black-and-white connected domain pixel proportion of 1:1:3:1:1 is a locator position; recognizing, in the horizontal and vertical directions, that a part with a black-and-white connected domain pixel proportion of 1:1:1:1:1 is a locator position, obtaining the center coordinates of each locator as locator point coordinates, and obtaining the center coordinates of the corrector as corrector point coordinates; determining the module side length of the two-dimensional code as m according to the number of pixels occupied by the black-and-white connected region.

4. The decoding method of the capacity-extended two-dimensional code according to claim 3, wherein The method for scanning and acquiring the size data of small code points in the binarization-processed image, and calculating the order of the small code point matrix according to the module size data and the size data of the small code points is specifically: performing line-by-line scanning on the binarization-processed image, and calculating the side length of the small code points in the binarization-processed image as n; calculating the order of the small code point matrix according to the following formula: wherein N is the order of the small code point matrix, m is the side length of the two-dimensional code module, and n is the side length of the small code points.

5. The decoding method of the capacity-extended two-dimensional code according to claim 4, wherein, The method for determining the size of the two-dimensional code according to the position information of adjacent locators, and performing perspective transformation to obtain a correction code image according to the position information of each locator and corrector and the size of the two-dimensional code is: determining the distance between the locator points according to the locator point coordinates of adjacent locators; determining the size of the version of the current expanded two-dimensional code according to the distance between the locator points; performing perspective transformation on the binarization-processed image according to the coordinates of the three locator points and the coordinate of the corrector point and the size of the version of the current expanded two-dimensional code, obtaining a correction code image, and obtaining a mapping relationship of the perspective transformation.

6. The decoding method of the capacity-extended two-dimensional code according to claim 5, wherein The method for determining the position of a small code point containing data in a module of the current expanded two-dimensional code according to the order of the small code point matrix and the Dark Module position of the two-dimensional code based on the correction code image is specifically: Dark Module in the correction code map is obtained, the Dark Module is divided into N order matrixes with the same order as the small code point matrix; center position coordinates of each rectangular block in the divided Dark Module are obtained, corresponding positions of the center positions in the binary processed image are obtained according to the mapping relationship between the correction code map and the binary processed image, and pixel values of the corresponding positions are determined; if the pixel value of the corresponding position corresponds to black, the corresponding rectangular block contains data, and the small code point at the corresponding position in the current expanded two-dimensional code module contains data; if the pixel value of the corresponding position corresponds to white, the corresponding rectangular block does not contain data.

7. A decoding method of a capacity-extended three-dimensional code, characterized by, The method comprises the following steps: an expanded three-dimensional code image is obtained, and the expanded three-dimensional code image is fused with the expanded two-dimensional code and a background picture; the expanded two-dimensional code is decoded by using the decoding method of the expanded two-dimensional code according to any one of claims 1-6.

8. A decoding system of a capacity-extended two-dimensional code, each module of the capacity-extended two-dimensional code being composed of an N*N small code point matrix, characterized in that, The method comprises the following steps: an original data acquisition module is configured to obtain an expanded two-dimensional code image; a preprocessing module is configured to perform binary processing on the expanded two-dimensional code image; a module size acquisition module is configured to determine position information of each locator and correction symbol of the two-dimensional code and module size data of the two-dimensional code according to the binary processed image; a small code point matrix order calculation module is configured to scan and obtain size data of small code points in the binary processed image, and calculate an order of a small code point matrix according to the module size data and the size data of the small code points; a correction module is configured to determine a size of the two-dimensional code according to position information of adjacent locators, and perform perspective transformation to obtain a correction code map according to the position information of each locator and correction symbol and the size of the two-dimensional code; a data point determination module is configured to determine positions of small code points containing data in a module of the current expanded two-dimensional code based on the correction code map, the order of the small code point matrix, and a position of a DarkModule module of the two-dimensional code; a decoding module is configured to convert all modules in the current expanded two-dimensional code into two-dimensional 01 matrices according to the positions of the small code points containing data, and decode all two-dimensional 01 matrices according to a decoding algorithm of the two-dimensional code.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the decoding method of the expanded two-dimensional code according to any one of claims 1-6.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the decoding method of the expanded two-dimensional code according to any one of claims 1-6.

Citation Information

Patent Citations

  • Two-dimensional code encoding and decoding method, device, encoding equipment and decoding equipment

    CN110991591A

  • Capacity expansion two-dimensional code and three-dimensional code generation method and device

    CN114239782A

  • Method and device for identifying two-dimensional code

    CN109977718A

  • Encrypted three-dimensional code generation and identification method and system

    CN114154605A