A method and system for quickly deblurring a blurred QR code

Through alternate iterative defuzzy frame and QR code images, combined with image search graph detection and decoding estimate, the problem of low fuzzy QR code recognition efficiency is solved, and efficient and accurate defuzzing processing is achieved.

CN114792292BActive Publication Date: 2025-08-05SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210366429.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2025-08-05
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

The prior art is inefficient when processing fuzzy QR codes, especially defocusing blur caused by jitter and motion, resulting in recognition failure and affecting system efficiency.

Method used

The alternating iterative defuzzing framework is adopted, combining the grayscale sparsity and gradient sparsity of QR code images, and through image search graphics detection and decoding estimates, iterative stops are used to avoid invalid defuzzing and quickly realize clear image output.

Benefits of technology

On the premise of ensuring the recognition rate, the efficiency of defuzzing the fuzzy QR code image is improved, and efficient and accurate defuzzing processing is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792292B_ABST
    Figure CN114792292B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for rapidly deblurring a fuzzy QR code, relating to the field of QR code deblurring. The method comprises: S1, preprocessing; S2, setting a maximum deblurring level (max_scale) and initializing a fuzzy kernel function; S3, constructing a first objective function and a second objective function; S4, estimating a clear image; S5, estimating a fuzzy kernel function; S6, if max_scale is reached, proceeding to S11; otherwise, proceeding to S7; S7, if three image-finding patterns are detected, proceeding to S8; otherwise, proceeding to S9; S8, determining whether decoding is currently possible; if so, proceeding to S11; otherwise, proceeding to S9; S9, determining whether the current deblurring level is max_scale–1; if so, proceeding to S10; otherwise, proceeding to S4; S10, obtaining an image clarity evaluation value Q and a threshold value T; if Q>T, proceeding to S4; if Q<T, proceeding to S11; and S11, outputting a deblurred QR code image. While ensuring the recognition rate of the deblurred QR code image, the method improves the efficiency of QR code image deblurring and effectively and accurately deblurs fuzzy QR codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of two-dimensional code deblurring, and more particularly to a method for quickly deblurring a blurred QR code. Background Art

[0002] With the development of IoT identification technology, QR code technology is increasingly being used in people's daily lives. QR code technology is a common QR code technology, widely used in logistics and transportation, manufacturing, mobile payments, mobile social networking, and other fields. As QR code application scenarios become increasingly complex, various issues have arisen in its application. Among them, the low recognition efficiency of fuzzy QR codes severely limits their reliability.

[0003] For example, in an intelligent cargo sorting system, when cargo arrives at the inspection area, a scanner in the inspection area scans the QR code image on the cargo to obtain cargo logistics information. Based on this information, the cargo is sorted into different processing bins. However, when the scanner scans the QR code image on the cargo, problems such as defocusing due to jitter or motion blur caused by cargo movement often occur. Ultimately, the QR code image cannot be recognized, resulting in a failure to obtain cargo information and reducing system efficiency.

[0004] Therefore, deblurring blurred QR code images has become a pressing problem. In the prior art, Pan et al. proposed a method for deblurring text images at the IEEE Conference on Computer Vision and Pattern Recognition. This method leverages the sparsity of text image intensity and gradients, and has been proven effective experimentally. However, when applied to deblurring blurred QR code images, it was found that the algorithm took a long time to process, reducing processing efficiency in practical applications. Similarly, many mainstream image deblurring algorithms suffer from high time complexity when applied to deblurring QR code images. Summary of the Invention

[0005] In order to overcome the above technical problems, the present invention provides a method and system for quickly deblurring fuzzy QR codes, which can deblur fuzzy QR codes and has low time complexity.

[0006] The technical solutions of the present invention are as follows:

[0007] A method for quickly deblurring a blurred QR code, comprising the steps of:

[0008] S1, obtaining a fuzzy QR code image and preprocessing the fuzzy QR code image;

[0009] S2. According to the blur degree of the blurred QR code image, set the maximum deblurring level max_scale and initialize the blur kernel function;

[0010] S3, constructing a first objective function for clear image estimation and a second objective function for blur kernel function estimation;

[0011] S4, obtaining an estimated clear image using the blurred QR code image, the current blur kernel function, and the first objective function;

[0012] S5, using the blurred QR code image and the estimated clear image, and the second objective function to obtain an estimated blur kernel function;

[0013] S6, determine whether the maximum deblurring level is reached; if the maximum deblurring level is reached, go to step S11; if the maximum deblurring level is not reached, go to step S7;

[0014] S7, performing image-finding pattern detection on the deblurred QR code image at the current level, and determining the number of image-finding patterns that can be detected; if the number of detected image-finding patterns is equal to 3, proceed to step S8; otherwise, proceed to step S9;

[0015] S8. Use the pre-decoding module to perform decoding judgment to determine whether the current level deblurred QR code image can be decoded; if it can be decoded, execute step S11; otherwise, execute step S9;

[0016] S9, determine whether the current deblurring level is max_scale-1; if yes, execute step S10 to determine; if no, return to and repeat step S4;

[0017] S10, obtaining the image clarity evaluation value Q of the current level clear image, and comparing it with the set threshold T, so as to quickly determine whether the clear image is an unprocessable image; if Q>T, returning to and repeating step S4; if Q<T, executing step S11;

[0018] S11: Output the final deblurred QR code image.

[0019] This technical solution proposes a method for fast deblurring of fuzzy QR codes. Based on the alternating iterative deblurring framework, the method realizes deblurring of fuzzy QR code images. Then, the strong correlation between the detection and decoding of the two-dimensional code image-finding pattern is used as the judgment criterion for the clear image after deblurring, and the image decoding pre-estimation is realized. Then, for the clear image of the QR code that meets the decoding pre-estimation in the previous step, a lightweight pre-decoding module is used to perform decoding judgment, so as to realize the precise stopping iteration in the deblurring process of the fuzzy QR code image. At the same time, for some fuzzy QR code images with excessive blur and which cannot be handled, a fast decoding prediction judgment is performed after deblurring at the max_scale-1 level, so as to avoid ineffective deblurring of large fuzzy images, thereby improving the efficiency of the algorithm. The deblurring method of this technical solution improves the efficiency of QR code image deblurring while ensuring the recognition rate of the deblurred QR code image, and realizes the deblurring of fuzzy QR codes efficiently and accurately.

[0020] Furthermore, the specific method of pre-processing in step S1 is:

[0021] S1.1. Read the collected color fuzzy QR code image, establish a spatial rectangular coordinate system with R, G, and B as axes, represent each pixel color of the fuzzy QR code image with a point in the spatial rectangular coordinate system, and obtain three-dimensional image data of the fuzzy QR code image;

[0022] S1.2. Gray-scale the three-dimensional image data into a two-dimensional pixel matrix Gimg through the mapping function f3, thereby preprocessing the blurred QR code image. The two-dimensional pixel matrix Gimg is the preprocessed blurred QR code image.

[0023] The calculation formula of the mapping function f3 is:

[0024] f3=0.2989R+0.5870G+0.1140B (1)

[0025] The expression of the two-dimensional pixel matrix Gimg is:

[0026]

[0027] Wherein, n represents the width of the preprocessed fuzzy QR code image data matrix, m represents the height of the preprocessed fuzzy QR code image data matrix, and a(x, y) represents the grayscale value of the image at the (x, y) position.

[0028] Furthermore, in step S3, the expression of the first objective function f1 is:

[0029]

[0030] Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized. The second term λσ||f||0 is a fuzzy kernel function estimation term constrained by the fuzzy kernel function regularization term. The fuzzy kernel function regularization term is:

[0031] The expression of the second objective function f2 is:

[0032]

[0033] in, Represents the gradient operator, and the meanings of other parameters are the same as those of the first objective function f1.

[0034] Furthermore, the method for obtaining the clear image I1 in step S4 is:

[0035] S4.1, obtain the blurred QR code image and the blur kernel function K of the current deblurring level input;

[0036] Among them, if the current defuzzification level is 1, the input fuzzy kernel function K is the initial fuzzy kernel function K0; otherwise, the input fuzzy kernel function K is the estimated fuzzy kernel function K1 obtained at the previous defuzzification level;

[0037] S4.2. Obtain an estimated clear image I1 using the blurred QR code image, the blur kernel function K, and the first objective function f1. The specific method is as follows:

[0038] By combining the image grayscale, horizontal and vertical gradients, two auxiliary variables u and t are introduced, and the expression of the first objective function f1 is changed to:

[0039]

[0040] Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized; β and μ are weight coefficients; u is an auxiliary variable introduced that is related to the image grayscale; t=(t h ,t v ) T is the variable introduced related to the image gradient; where t h Represents the horizontal gradient of the image, t vRepresents the vertical gradient of the image, T is the matrix transpose symbol; σ is the weight defined in the expression of the first objective function f1; the last three terms of the expression represent the sparse grayscale constraint of the image and the sparse gradient constraint in the horizontal and vertical directions respectively;

[0041] First, the initial f in expression (9) is set to the blurred image g, and u and t are calculated from it; the calculation results of u and t are respectively:

[0042]

[0043] Among them, the meanings of the parameters are the same as those in expression (9);

[0044] In each defuzzification level, the expression of the first objective function f1 becomes:

[0045]

[0046] The meanings of the parameters are the same as those in expression (9);

[0047] Expression (12) is an L2 norm expression. Expression (12) is transformed into a least squares model problem and solved using the Fourier transform method. The obtained clear QR code image estimation expression is:

[0048]

[0049] in, represents Fourier transform FFT, represents the inverse Fourier transform IFFT, represents the complex conjugate operator; and in and Describe the gradient operators in the horizontal and vertical directions respectively;

[0050] Next, substitute the result of expression (13) into expressions (10) and (11) to update u and t, and then substitute the updated u and t into expression (13) to obtain the next step of clear image estimation. Until the error limit is met, the final This is the clear image I1 of the current level after deblurring.

[0051] Furthermore, the method for obtaining the fuzzy kernel function K1 in step S5 is:

[0052] S5.1, obtaining the blurred QR code image and the clear image I1 obtained in step S4;

[0053] S5.2. Using the fuzzy QR code image and the clear image I1, and the fuzzy kernel function to estimate the target function f2, the fuzzy kernel function estimate K1 is obtained. The specific implementation method is:

[0054] Using expression (8) and the least squares model, we can solve it according to the Fourier transform method and get This is the fuzzy kernel function K1 of the current level.

[0055] Furthermore, the pre-decoding module in step S8 is a decode module based on the zxing decoder, or a decoding module of the WeChat QR code scanning interface.

[0056] Furthermore, the image clarity evaluation value Q in step S10 is obtained by evaluating the clear image I1 at the current deblurring level using the Tenengrad algorithm. The image clarity is defined as:

[0057] D(f)=∑ y ∑ x |G(x,y)| (G(x,y)>T0)

[0058] in, T0 is the given edge detection threshold, G x and G y are the horizontal and vertical gradient values at the pixel point (x, y), and the Sobel operator is used to extract the horizontal and vertical gradient values respectively.

[0059] A system for quickly deblurring a fuzzy QR code includes: a preprocessing unit, an initialization unit, an objective function construction unit, a clear image estimation unit, a fuzzy kernel function estimation unit, a first deblurring level judgment unit, an image-finding pattern judgment unit, a decoding judgment unit, a second deblurring level judgment unit, a clarity judgment unit, and an output unit;

[0060] The preprocessing unit obtains a blurred QR code image and preprocesses the blurred QR code image; the initialization unit sets a maximum deblurring level max_scale according to the blurring degree of the blurred QR code image and initializes the blur kernel function K0; the objective function construction unit constructs a first objective function f1 for clear image estimation and a second objective function f2 for blur kernel function estimation; the clear image estimation unit obtains an estimated clear image I1 using the blurred QR code image and the current blur kernel function K, as well as the first objective function f1; the blur kernel function estimation unit obtains an estimated blur kernel function K1 using the blurred QR code image and the estimated clear image I1, as well as the second objective function f2; the first deblurring level judgment unit judges whether the maximum deblurring level is reached; if the maximum deblurring level is reached, the clear image of the current level is output through the output unit; if the maximum deblurring level is not reached, the clear image of the current level is sent to the image-finding graphic judgment unit; the image-finding graphic judgment unit performs image-finding graphic detection on the deblurred QR code image of the current level and judges whether the image-finding graphic can be detected. number; if the number of detected image-seeking patterns is equal to 3, the clear image of the current level is sent to the decoding judgment unit; otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; the decoding judgment unit uses the pre-decoding module to perform decoding judgment to determine whether the deblurred QR code image of the current level can be decoded; if it can be decoded, the clear image of the current level is sent to the output unit; otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; the second deblurring level judgment unit determines whether the current deblurring level is max_scale-1; if so, the clear image of the current level is sent to the clarity judgment unit for judgment; if not, the clear image of the current level is sent to the clear image estimation unit; the clarity judgment unit obtains the image clarity evaluation value Q of the clear image of the current level, and compares it with the set threshold T, so as to quickly determine whether the clear image is an unprocessable image; if Q>T, the clear image of the current level is sent to the clear image estimation unit; if Q<T, the clear image of the current level is sent to the output unit; the output unit outputs the final deblurred QR code image.

[0061] Furthermore, the decoding judgment unit uses a pre-decoding module to perform decoding judgment, and the pre-decoding module is a decode module based on the zxing decoder, or a decoding module of the WeChat QR code scanning interface.

[0062] Furthermore, the clarity judgment unit uses the Tenengrad algorithm to evaluate the clear image I1 at the current deblurring level to obtain an image clarity evaluation value Q. The image clarity is defined as:

[0063] D(f)=∑ y ∑ x|G(x,y)| (G(x,y)>T0)

[0064] in, T0 is the given edge detection threshold, G x and G y are the horizontal and vertical gradient values at the pixel point (x, y), and the Sobel operator is used to extract the horizontal and vertical gradient values respectively.

[0065] This technical solution proposes a method and system for rapidly deblurring fuzzy QR codes. Compared with the prior art, the technical solution of the present invention has the following beneficial effects: a method for rapidly deblurring fuzzy QR codes, based on an alternating iterative deblurring framework and taking into account the grayscale sparsity and gradient sparsity of QR code images, achieves deblurring of fuzzy QR code images; then, based on the strong correlation between QR code image-finding pattern detection and decoding as the judgment criterion for the clear image after deblurring, image decoding pre-estimation is achieved; then, for the clear QR code images that meet the previous decoding pre-estimation, a lightweight pre-decoding module is used to perform decoding judgment, achieving precise terminating iterations during the deblurring process of the fuzzy QR code image; at the same time, for some fuzzy QR code images with excessive blur and that cannot be processed, a fast decoding prediction judgment is performed after deblurring at the max_scale-1 level, avoiding ineffective deblurring of large fuzzy images, thereby improving algorithm efficiency; the deblurring method of this technical solution improves the efficiency of QR code image deblurring while ensuring the recognition rate of the deblurred QR code image, and efficiently and accurately achieves deblurring of fuzzy QR codes. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 Schematic diagram of the method steps for rapid deblurring of the present invention;

[0067] Figure 2 Flowchart of the fast deblurring method;

[0068] Figure 3 Schematic diagram of a fuzzy QR code input in one embodiment;

[0069] Figure 4 Schematic diagram of a blur kernel function image after deblurring in one embodiment. DETAILED DESCRIPTION

[0070] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0071] Example 1

[0072] A method for quickly deblurring blurred QR codes Figure 1 As shown, the steps include:

[0073] S1, obtaining a fuzzy QR code image and preprocessing the fuzzy QR code image;

[0074] S2. According to the blur degree of the blurred QR code image, set the maximum deblurring level max_scale and initialize the blur kernel function;

[0075] S3, constructing a first objective function for clear image estimation and a second objective function for blur kernel function estimation;

[0076] S4, obtaining an estimated clear image using the blurred QR code image, the current blur kernel function, and the first objective function;

[0077] S5, using the blurred QR code image and the estimated clear image, and the second objective function to obtain an estimated blur kernel function;

[0078] S6, determine whether the maximum deblurring level is reached; if the maximum deblurring level is reached, go to step S11; if the maximum deblurring level is not reached, go to step S7;

[0079] S7, performing image-finding pattern detection on the deblurred QR code image at the current level, and determining the number of image-finding patterns that can be detected; if the number of detected image-finding patterns is equal to 3, proceed to step S8; otherwise, proceed to step S9;

[0080] S8. Use the pre-decoding module to perform decoding judgment to determine whether the current level deblurred QR code image can be decoded; if it can be decoded, execute step S11; otherwise, execute step S9;

[0081] S9, determine whether the current deblurring level is max_scale-1; if yes, execute step S10 to determine; if no, return to and repeat step S4;

[0082] S10, obtaining the image clarity evaluation value Q of the current level clear image, and comparing it with the set threshold T, so as to quickly determine whether the clear image is an unprocessable image; if Q>T, returning to and repeating step S4; if Q<T, executing step S11;

[0083] S11: Output the final deblurred QR code image.

[0084] In this embodiment, the initial defuzzification level is 1. When the process goes through S9 or S10 and then returns to S4 for repetition, the defuzzification level is incremented by 1.

[0085] The image blurring process can be mathematically described as convolving a sharp image with a blur kernel function, then superimposing random ambient noise. However, obtaining a sharp image and a blur kernel function from a blurred image is an ill-posed problem, meaning its solution is non-unique. This embodiment adopts a method for fast deblurring of fuzzy QR codes, which is based on an alternating iterative deblurring framework to achieve deblurring of fuzzy QR code images. Then, the strong correlation between the detection and decoding of the two-dimensional code image-finding pattern is used as the judgment standard for the clear image after deblurring to achieve image decoding pre-estimation. Next, for the clear image of the QR code that meets the decoding pre-estimation in the previous step, a lightweight pre-decoding module is used to perform decoding judgment, thereby achieving accurate stopping of iterations in the deblurring process of the fuzzy QR code image. At the same time, for some fuzzy QR code images with excessive blur and that cannot be handled, fast decoding prediction judgment is performed after deblurring at the max_scale-1 level to avoid ineffective deblurring of large fuzzy images, thereby improving algorithm efficiency. The deblurring method of this technical solution improves the efficiency of QR code image deblurring while ensuring the recognition rate of the deblurred QR code image, and achieves deblurring of fuzzy QR codes efficiently and accurately.

[0086] Example 2

[0087] This embodiment provides a method for quickly deblurring a fuzzy QR code. Based on Example 1, in this embodiment, the specific preprocessing method in step S1 is as follows:

[0088] S1.1. Read the collected color fuzzy QR code image, establish a spatial rectangular coordinate system with R, G, and B as axes, represent each pixel color of the fuzzy QR code image with a point in the spatial rectangular coordinate system, and obtain three-dimensional image data of the fuzzy QR code image;

[0089] S1.2. Gray-scale the three-dimensional image data into a two-dimensional pixel matrix Gimg through the mapping function f3, thereby preprocessing the blurred QR code image. The two-dimensional pixel matrix Gimg is the preprocessed blurred QR code image.

[0090] The calculation formula of the mapping function f3 is:

[0091] f3=0.2989R+0.5870G+0.1140B (1)

[0092] The expression of the two-dimensional pixel matrix Gimg is:

[0093]

[0094] Wherein, n represents the width of the preprocessed fuzzy QR code image data matrix, m represents the height of the preprocessed fuzzy QR code image data matrix, and a(x, y) represents the grayscale value of the image at the (x, y) position.

[0095] In this embodiment, the width and height of the two-dimensional pixel matrix Gimg are both 300 pixels, and the expression of the two-dimensional pixel matrix Gimg is:

[0096]

[0097] In step S3, the expression of the first objective function f1 is:

[0098]

[0099] Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized. The second term λσ||f||0 is a fuzzy kernel function estimation term constrained by the fuzzy kernel function regularization term. The fuzzy kernel function regularization term is:

[0100] The expression of the second objective function f2 is:

[0101]

[0102] in, Represents the gradient operator, and the meanings of other parameters are the same as those of the first objective function f1.

[0103] The method for obtaining the clear image I1 in step S4 is:

[0104] S4.1, obtain the blurred QR code image and the blur kernel function K of the current deblurring level input;

[0105] Among them, if the current defuzzification level is 1, the input fuzzy kernel function K is the initial fuzzy kernel function K0; otherwise, the input fuzzy kernel function K is the estimated fuzzy kernel function K1 obtained at the previous defuzzification level;

[0106] S4.2. Obtain an estimated clear image I1 using the blurred QR code image, the blur kernel function K, and the first objective function f1. The specific method is as follows:

[0107] By combining the image grayscale, horizontal and vertical gradients, two auxiliary variables u and t are introduced, and the expression of the first objective function f1 is changed to:

[0108]

[0109] Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized; β and μ are weight coefficients; u is an auxiliary variable introduced that is related to the image grayscale; t=(t h ,t v ) T is the variable introduced related to the image gradient; where t h Represents the horizontal gradient of the image, t v Represents the vertical gradient of the image, T is the matrix transpose symbol; σ is the weight defined in the expression of the first objective function f1; the last three terms of the expression represent the sparse grayscale constraint of the image and the sparse gradient constraint in the horizontal and vertical directions respectively;

[0110] First, the initial f in expression (9) is set to the blurred image g, and u and t are calculated from it; the calculation results of u and t are respectively:

[0111]

[0112] Among them, the meanings of the parameters are the same as those in expression (9);

[0113] In each defuzzification level, the expression of the first objective function f1 becomes:

[0114]

[0115] The meanings of the parameters are the same as those in expression (9);

[0116] Expression (12) is an L2 norm expression. Expression (12) is transformed into a least squares model problem and solved using the Fourier transform method. The obtained clear QR code image estimation expression is:

[0117]

[0118] in, represents Fourier transform FFT, represents the inverse Fourier transform IFFT, represents the complex conjugate operator; and in and Describe the gradient operators in the horizontal and vertical directions respectively;

[0119] Next, substitute the result of expression (13) into expressions (10) and (11) to update u and t, and then substitute the updated u and t into expression (13) to continue obtaining the next estimate of the clear image. Until the error limit is satisfied, the finally obtained is the clear image I1 deblurred at the current level.

[0120] The method for obtaining the blur kernel function K1 in step S5 is as follows:

[0121] S5.1. Obtain the blurred QR code image and the clear image I1 obtained in step S4;

[0122] S5.2. Use the blurred QR code image, the clear image I1, and the objective function f2 for blur kernel function estimation to obtain the estimated blur kernel function K1. The specific implementation method is as follows:

[0123] Using expression (8) and the least squares model, solve according to the Fourier transform method, and calculate to obtain which is the blur kernel function K1 at the current level.

[0124] The pre - decoding module described in step S8 is the decode module based on the zxing decoder or the decoding module of the WeChat QR code scanning interface.

[0125] The image sharpness evaluation value Q in step S10 is obtained by evaluating the clear image I1 at the current de - blurred level using the Tenengrad algorithm. The definition of image sharpness is:

[0126] D(f) = ∑ y ∑ x |G(x,y)| (G(x,y)>T0)

[0127] where T0 is the given edge detection threshold, and G x and G y are the gradient values in the horizontal and vertical directions at the pixel point (x,y) respectively. The Sobel operator is used to extract the gradient values in the horizontal and vertical directions respectively.

[0128] In this embodiment, if Q < T in S10, that is, the de - blurring effect of the current image is poor, and it is determined as an unprocessable image. The last - level de - blurring iteration is not performed, but the process goes to step S11 to output this image. The advantage of this approach is that for images that cannot be processed by this system, the iteration is quickly stopped and output, without entering the last long - time - consuming de - blurring level.

[0129] Embodiment 3

[0130] This embodiment provides a method for quickly deblurring a fuzzy QR code. The flow chart is as follows: Figure 2 As shown, the steps include:

[0131] S1: Obtain a blurred QR code image and preprocess the blurred QR code image.

[0132] Blur QR code image such as Figure 3 shown.

[0133] More specifically, the pre-processing method refers to Figure 3 The blurred QR code image shown is grayscaled. The blurred QR code image data is represented by a three-dimensional matrix. Specifically, for the collected color blurred QR code image, a spatial rectangular coordinate system is established with R, G, and B as axes. Then, the color of each pixel of the color blurred QR code image can be represented by a point in three-dimensional space.

[0134] The grayscale processing refers to converting the three-dimensional image data into a two-dimensional pixel matrix Gimg through the mapping function f3.

[0135] More specifically, the mapping function f3 is expressed as follows:

[0136] f3=0.2989R+0.5870G+0.1140B (1)

[0137] More specifically, the two-dimensional pixel matrix Gimg obtained after the grayscale processing is expressed as:

[0138]

[0139] The width and height of the fuzzy QR code image data matrix are both 300 pixels, and a(x, y) represents the grayscale value of the image at the (x, y) position.

[0140] S2: According to the blur degree of the blurred QR code image, set the maximum deblurring level and initialize the blur kernel function K0.

[0141] More specifically, the blurriness of the blurred QR code image is determined subjectively. Figure 3 As shown in the blurred QR code image, in this embodiment, the blur level is set to 6 and the size of the initial blur kernel function K0 is set to 31.

[0142] S3: Construct a first objective function f1 for clear image estimation and a second objective function f2 for blur kernel function estimation.

[0143] More specifically, in step S3, the first objective function f1 is used to obtain a clear image of the current level deblurring estimation. The second objective function f2 is used to obtain a blur kernel function of the current level deblurring estimation. The specific steps are:

[0144] S3.1: Construct the initial objective function f.

[0145] More specifically, the initial objective function expression is:

[0146]

[0147] Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, and g represents the blurred QR code image. The first item is the data fitting item, which means that in the current estimate and Under these conditions, the L2 norm of h*fg can be minimized. The second term is the image regularization term, representing the objective function for "clear image estimation," i.e., f1. The third term is the blur kernel regularization term, representing the objective function for "blur kernel estimation," f2. Here, λ and ρ represent the weight coefficients for the image regularization term and the blur kernel regularization term, respectively.

[0148] More specifically, in this embodiment, g represents Figure 3 The blurred QR code image shown above is set to 4e -3 , set ρ to 2.

[0149] S3.2: Construct a first objective function f1 for clear image estimation.

[0150] More specifically, since the ideal clear QR code image has grayscale sparseness and gradient sparseness, the specific expression of R(f) in (3) is:

[0151]

[0152] Where, f represents a clear QR code image, represents the gradient operator, and σ represents the weight coefficient.

[0153] This embodiment combines the characteristics of grayscale sparsity and gradient sparsity of QR code images to more accurately deblur the blurred QR code image.

[0154] More specifically, in this embodiment, σ is set to 1.

[0155] Therefore, the first objective function f1 for clear image estimation is expressed as:

[0156]

[0157] Wherein, f, h, *, g have the same meaning as in expression (3). In this embodiment, λ is set to 4e -3 , σ is set to 1.

[0158] S3.3: Construct a second objective function f2 for fuzzy kernel function estimation.

[0159] More specifically, the specific expression of R(h) in (3) is:

[0160]

[0161] Where h represents the fuzzy kernel function, and the fuzzy kernel function estimation term is expressed as the L2 norm estimation form of the fuzzy kernel function.

[0162] Therefore, the expression of the second objective function f2 for fuzzy kernel function estimation is:

[0163]

[0164] Wherein, f, h, *, and g have the same meanings as those in expression (3). In this embodiment, ρ is set to 2.

[0165] Since the grayscale value of a single pixel in an image is not accurate enough, equation (7) is transformed into a fuzzy kernel function estimation in the gradient space. Then the expression of f2 becomes:

[0166]

[0167] in, represents the gradient operator, and the other parameters have the same meanings as in equation (7). In this embodiment, ρ is set to 2.

[0168] S4: Using the known blurred QR code image, the currently estimated blur kernel function K, and the first objective function f1, an estimated clear image I1 is obtained.

[0169] More specifically, in step S4, the specific implementation method of estimating the clear image I1 is:

[0170] S4.1: Obtain the blurred QR code image and the blur kernel function K of the current deblurring level input.

[0171] More specifically, the blurred QR code image is Figure 3 Blurred QR code image shown.

[0172] More specifically, if the current defuzzification level is 1, the fuzzy kernel function K input to the current defuzzification level is the initial fuzzy kernel function K0 of size 31 set in step S2. Otherwise, the fuzzy kernel function K input to the current defuzzification level is the estimated fuzzy kernel function K1 obtained at the previous level.

[0173] S4.2: Using the blurred QR code image and the blur kernel function K, as well as the clear image estimation objective function f1, an estimated clear image I1 is obtained.

[0174] More specifically, by combining the image grayscale, horizontal and vertical gradients, two auxiliary variables u and t are introduced, and the expression of formula (5) is changed to:

[0175]

[0176] Where, f, h, *, g have the same meaning as in expression (3). β and μ are weight coefficients; u is an auxiliary variable introduced related to the image grayscale; t = (t h ,t v ) T Is the variable introduced that is related to the image gradient. h Represents the horizontal gradient of the image, t v represents the vertical gradient of the image, T is the matrix transpose symbol, and σ is the weight defined in expression (5).

[0177] More specifically, in this embodiment, β and μ are set to be close to ∞, and λ is set to 4e -3 , σ is set to 1.

[0178] First, set the initial f in expression (9) to Figure 3 The blurred QR code image g is shown, and u and t are calculated from it. The calculation results of u and t are:

[0179]

[0180] The meanings of the parameters are the same as those in expression (9).

[0181] Then in each defuzzification iteration, the expression of the first objective function f1 becomes:

[0182]

[0183] The meanings of the parameters are the same as those in expression (9).

[0184] More specifically, the solution of expression (12) is solved by the Fourier transform method of the least squares model. The obtained clear QR code image estimation expression is:

[0185]

[0186] in, represents Fourier transform FFT, represents the inverse Fourier transform IFFT, represents the complex conjugate operator. And in and Describe the gradient operators in the horizontal and vertical directions respectively.

[0187] More specifically, in this embodiment, the horizontal and vertical gradient algorithm expressions are:

[0188]

[0189] Next, substitute the result of expression (13) into expressions (10) and (11) to update u and t, and then substitute the updated u and t into expression (13) to obtain the next step of clear image estimation. until the error limit is met.

[0190] The final deblurring iteration of this level is This is the clear image I1 estimated by the deblurring iteration at this level.

[0191] More specifically, in this embodiment, the final deblurred clear image estimation is obtained by using the technical solution of the present invention.

[0192] S5: Using the known blurred QR code image, the estimated clear image I1, and the target function f2, an estimated blur kernel function K1 is obtained.

[0193] More specifically, in step S5, the specific implementation method of estimating the fuzzy kernel function K1 is:

[0194] S5.1: Get the blurred QR code image and the clear image estimate I1 of the current deblurring level input.

[0195] More specifically, blur the QR code image such as Figure 3 As shown, the clear image estimation I1 is I1 obtained in step S4.2.

[0196] S5.2: Use the fuzzy QR code image and the clear image to estimate I1, and the fuzzy kernel function to estimate the target function f2, and obtain the fuzzy kernel function estimate K1. The specific implementation method is:

[0197] Using expression (8) and the least squares model, and solving it according to the Fourier transform method, we can calculate

[0198] More specifically, the blur kernel function estimation after the last deblurring is obtained by the technical solution of the present invention. like Figure 4 shown.

[0199] S6: Determine whether the maximum number of deblurring iterations has been reached. If the current deblurring level has reached the maximum number of iterations, go to S11; if not, go to S7.

[0200] More specifically, the maximum number of deblurring iterations in step S6 is the maximum deblurring level set in step S2.

[0201] More specifically, in this example, the maximum number of deblurring iterations is 6.

[0202] More specifically, in this example, the current level in step S6 can be 1, 2, 3, 4, 5, or 6, specifically representing the number of deblurring operations currently being performed.

[0203] S7: Perform image-finding pattern detection on the deblurred QR code image at the current level and obtain the number of detected image-finding patterns. If the number of detected image-finding patterns is equal to 3, go to S8; otherwise, go to S9.

[0204] More specifically, the deblurred QR code image at the current level in step S7 is the clear image I1 obtained in step S4.2.

[0205] More specifically, in this example, the image-finding pattern detection method described in step S7 is to scan the QR code image data pixels in an interlaced manner to determine whether a width region that satisfies the ratio of 1:1:3:1:1 exists. A counter is set, and each time a width region that satisfies the ratio of 1:1:3:1:1 is found, the counter increments by 1, indicating that a image-finding pattern has been found.

[0206] More specifically, in this example, when the deblurring level is 1, 2, or 3, three image-finding patterns cannot be detected, and the process proceeds to step S9. When the deblurring level is 4 or 5, three image-finding patterns can be detected, and the process proceeds to step S8.

[0207] S8: Use the lightweight pre-decoding module to determine whether the current level deblurred QR code image can be decoded. If it can be decoded, go to S11; otherwise, go to S9.

[0208] More specifically, the deblurred QR code image at the current level in step S8 is the clear image I1 obtained in step S4.2, and this clear image has met the requirements of step S7, that is, three image-finding patterns can be detected.

[0209] More specifically, the lightweight pre-decoding module in step S8 is based on the decode module of the zxing decoder or the decoding module of the WeChat QR code scanning interface. If the lightweight pre-decoding module successfully decodes the current image, the deblurred image is considered to have met the set standard, and the process proceeds to step S11 to output the image. If the decoding fails, the deblurred image is considered to have failed to meet the set standard, and the process proceeds to step S9.

[0210] More specifically, in this example, when the deblur level is 1, 2, or 3, the three search patterns cannot be detected, and thus step S8 is not entered. When the deblur level is 4, the three search patterns can be detected, and thus the process proceeds to step S8 for lightweight pre-decoding, but decoding is unsuccessful, so the process proceeds to step S9. When the deblur level is 5, the three search patterns can be detected, and thus the process proceeds to step S8 for decoding, and decoding is successful, so the process proceeds to step S11.

[0211] S9: For the image that cannot be successfully decoded by the pre-decoding module in step S8, first determine the deblurring level it is in.

[0212] More specifically, if the current deblurring level has reached max_scale-1, the process proceeds to S10 to perform a fast decoding prediction module; otherwise, the process proceeds to S4 to perform a next-level deblurring.

[0213] More specifically, in this embodiment, the judgment level max_scale-1 is 5.

[0214] More specifically, in this embodiment, when the blur level is 4, decoding cannot be successful, and the process goes to step S9. However, since the deblur level is not 5 at this time, the process goes to step S4 and loops. When the blur level is 5, decoding can be successful, and the process goes to step S11.

[0215] S10: For a relatively blurry image, predict the possibility that the original blurry QR code can be successfully decoded.

[0216] More specifically, after the max_scale-1th level of deblurring is completed, if the current deblurred image still does not meet a set series of image judgment detection criteria, the possibility of the image being decodable after completing all levels of deblurring is estimated.

[0217] More specifically, the Tenengrad algorithm is used to calculate the current image clarity value Q, and the image clarity threshold T is set. If Q>T, the image is considered to be decodable; otherwise, it is considered that the image cannot be successfully decoded, and the deblurring process is stopped directly, and the image is output.

[0218] More specifically, the Tenengrad algorithm uses the Sobel operator to extract the gradient values in the horizontal and vertical directions respectively. Among them, the image clarity is defined as:

[0219] D(f)=∑ y ∑ x |G(x,y)| (G(x,y)>T0)

[0220] More specifically, G(x,y) is of the form:

[0221]

[0222] More specifically, T0 is a given edge detection threshold, G x and G y are the horizontal and vertical gradients at the pixel point (x, y), respectively.

[0223] More specifically, in this embodiment, the image clarity threshold T is obtained based on statistical experiments and is set at each deblurring level as follows: deblurring level 1 is 7453, deblurring level 2 is 11143, deblurring level 3 is 15293, deblurring level 4 is 33449, deblurring level 5 is 39755, and deblurring level 6 is 66257.

[0224] S11: Output the deblurred image.

[0225] More specifically, for the clear image obtained in step S4.2, if it meets the judgment conditions of steps S7 and S8, then this image is the final deblurred QR code image.

[0226] Experimental results and analysis

[0227] The proposed method was compared with several other currently known image deblurring methods. The test dataset consisted of 1,500 images, divided into five versions of QR codes, numbered 1 to 5. Each version contained 300 QR code images, each with a resolution of 300 x 300 pixels. The average deblurring time and the average recognition rate of the deblurred QR code images were compared using each method.

[0228] Table 1 Average deblurring time of the method of the present invention and other methods

[0229]

[0230] Table 2 Average recognition rates of deblurred QR codes obtained by the method of the present invention and other methods

[0231]

[0232]

[0233] Among them, method 1 adopts the text image deblurring method based on L0 norm intensity gradient prior proposed by Pan et al. (Pan J, Hu Z, Su Z, et al. L0-Regularized intensity and gradient prior for deblurring text images and beyond [J]. IEEE transactions on pattern analysis and machine intelligence, 2016, 39 (2): 342-355);

[0234] Method 2 uses the blind image deblurring method based on local minimum gradient prior proposed by Wen et al. (Wen F, Ying R, Liu Y, et al. A simple local minimal intensity prior and an improved algorithm for blind image deblurring[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2020);

[0235] Method 3 adopts the fast QR code blind deblurring method based on adaptive scale proposed by Chen et al. (Chen R, Zheng Z, Pan J, et al. Fast Blind Deblurring of QR Code Images Based on AdaptiveScale Control[J]. Mobile Networks and Applications, 2021: 1-16.).

[0236] It can be seen from Table 1 that the method proposed in the technical solution of the present invention greatly reduces the deblurring time compared with other methods, and is more suitable for the deblurring problem of fuzzy QR codes in practical applications in IoT scenarios.

[0237] It can be seen from Table 2 that the method proposed in the technical solution of the present invention can not only greatly improve the efficiency of image deblurring, but also ensure the recognition rate of the QR code image after image deblurring, which further verifies the reliability of the technical method of the present invention.

[0238] The fuzzy QR code fast deblurring method proposed in this embodiment greatly improves the efficiency of image deblurring and reduces the time complexity while ensuring the success rate of QR code image decoding after deblurring. It can effectively improve the processing efficiency of fuzzy QR codes in automatic cargo sorting systems, such as those for improving system throughput.

[0239] Example 4

[0240] A system for quickly deblurring a fuzzy QR code includes: a preprocessing unit, an initialization unit, an objective function construction unit, a clear image estimation unit, a fuzzy kernel function estimation unit, a first deblurring level judgment unit, an image-finding pattern judgment unit, a decoding judgment unit, a second deblurring level judgment unit, a clarity judgment unit, and an output unit;

[0241] The preprocessing unit obtains a blurred QR code image and preprocesses the blurred QR code image; the initialization unit sets a maximum deblurring level max_scale according to the blurring degree of the blurred QR code image and initializes the blur kernel function K0; the objective function construction unit constructs a first objective function f1 for clear image estimation and a second objective function f2 for blur kernel function estimation; the clear image estimation unit obtains an estimated clear image I1 using the blurred QR code image and the current blur kernel function K, as well as the first objective function f1; the blur kernel function estimation unit obtains an estimated blur kernel function K1 using the blurred QR code image and the estimated clear image I1, as well as the second objective function f2; the first deblurring level judgment unit judges whether the maximum deblurring level is reached; if the maximum deblurring level is reached, the clear image of the current level is output through the output unit; if the maximum deblurring level is not reached, the clear image of the current level is sent to the image-finding graphic judgment unit; the image-finding graphic judgment unit performs image-finding graphic detection on the deblurred QR code image of the current level and judges whether the image-finding graphic can be detected. number; if the number of detected image-seeking patterns is equal to 3, the clear image of the current level is sent to the decoding judgment unit; otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; the decoding judgment unit uses the pre-decoding module to perform decoding judgment to determine whether the deblurred QR code image of the current level can be decoded; if it can be decoded, the clear image of the current level is sent to the output unit; otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; the second deblurring level judgment unit determines whether the current deblurring level is max_scale-1; if so, the clear image of the current level is sent to the clarity judgment unit for judgment; if not, the clear image of the current level is sent to the clear image estimation unit; the clarity judgment unit obtains the image clarity evaluation value Q of the clear image of the current level, and compares it with the set threshold T, so as to quickly determine whether the clear image is an unprocessable image; if Q>T, the clear image of the current level is sent to the clear image estimation unit; if Q<T, the clear image of the current level is sent to the output unit; the output unit outputs the final deblurred QR code image.

[0242] The decoding judgment unit uses a pre-decoding module to perform decoding judgment, and the pre-decoding module is a decode module based on the zxing decoder, or a decoding module of the WeChat QR code scanning interface.

[0243] The clarity judgment unit uses the Tenengrad algorithm to evaluate the clear image I1 at the current deblurring level to obtain an image clarity evaluation value Q. The image clarity is defined as:

[0244] D(f)=∑ y ∑ x|G(x,y)| (G(x,y)>T0)

[0245] in, T0 is the given edge detection threshold, G x and G y are the horizontal and vertical gradient values at the pixel point (x, y), and the Sobel operator is used to extract the horizontal and vertical gradient values respectively.

Claims

1. A method for quickly deblurring a fuzzy QR code, characterized in that: Including steps: S1, obtaining a fuzzy QR code image and preprocessing the fuzzy QR code image; S2. According to the blur degree of the blurred QR code image, set the maximum deblurring level max_scale and initialize the blur kernel function; S3. Construct a first objective function for clear image estimation and a second objective function for blur kernel function estimation; the expression of the first objective function f1 is: Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized. The second term λσ||f||0 is a fuzzy kernel function estimation term constrained by the fuzzy kernel function regularization term. The fuzzy kernel function regularization term is: The expression of the second objective function f2 is: in, Represents the gradient operator, and the meanings of other parameters are the same as those of the first objective function f1; S4. Obtain an estimated clear image using the blurred QR code image, the current blur kernel function, and the first objective function; wherein: S4.1, obtain the blurred QR code image and the blur kernel function K of the current deblurring level input; Among them, if the current defuzzification level is 1, the input fuzzy kernel function K is the initial fuzzy kernel function K0; otherwise, the input fuzzy kernel function K is the estimated fuzzy kernel function K1 obtained at the previous defuzzification level; S4.

2. Obtain an estimated clear image using the blurred QR code image, the blur kernel function K, and the first objective function f1. The specific method is as follows: By combining the image grayscale, horizontal and vertical gradients, two auxiliary variables u and t are introduced, and the expression of the first objective function f1 is changed to: Among them, f represents the clear QR code image, h represents the blur kernel function, * represents the convolution operator, g represents the blurred QR code image, and the first term is the data fitting term, which means that Under these conditions, the L2 norm of h*fg can be minimized; β and μ are weight coefficients; u is an auxiliary variable introduced that is related to the image grayscale; t=(t h ,i v ) T is the variable introduced related to the image gradient; where t h Represents the horizontal gradient of the image, t v Represents the vertical gradient of the image, T is the matrix transpose symbol; σ is the weight defined in the expression of the first objective function f1; the last three terms of the expression represent the sparse grayscale constraint of the image and the sparse gradient constraint in the horizontal and vertical directions respectively; First, the initial f in expression (9) is set to the blurred image g, and u and t are calculated from it; the calculation results of u and t are respectively: Among them, the meanings of the parameters are the same as those in expression (9); In each defuzzification level, the expression of the first objective function f1 becomes: The meanings of the parameters are the same as those in expression (9); Expression (12) is an L2 norm expression. Expression (12) is transformed into a least squares model problem and solved using the Fourier transform method. The obtained clear QR code image estimation expression is: in, represents Fourier transform FFT, represents the inverse Fourier transform IFFT, represents the complex conjugate operator; and in and Describe the gradient operators in the horizontal and vertical directions respectively; Next, substitute the result of expression (13) into expressions (10) and (11) to update u and t, and then substitute the updated u and t into expression (13) to obtain the next step of clear image estimation. Until the error limit is met, the final This is the clear image of the current level deblurred S5. Obtain an estimated blur kernel function using the blurred QR code image, the estimated clear image, and the second objective function; wherein: S5.

1. Obtain the blurred QR code image and the clear image obtained in step S4; S5.

2. Use the fuzzy QR code image and the clear image, as well as the fuzzy kernel function to estimate the target function f2, and obtain the fuzzy kernel function estimate K1. The specific implementation method is: Using expression (8) and the least squares model, we can solve it according to the Fourier transform method and get That is the fuzzy kernel function K1 of the current level; S6, determine whether the maximum deblurring level is reached; if the maximum deblurring level is reached, go to step S11; if the maximum deblurring level is not reached, go to step S7; S7, performing image-finding pattern detection on the deblurred QR code image at the current level, and determining the number of image-finding patterns that can be detected; if the number of detected image-finding patterns is equal to 3, proceed to step S8; otherwise, proceed to step S9; S8. Use the pre-decoding module to perform decoding judgment to determine whether the current level deblurred QR code image can be decoded; if it can be decoded, execute step S11; otherwise, execute step S9; S9, determine whether the current deblurring level is max_scale-1; if yes, execute step S10 to determine; if no, return to and repeat step S4; S10, using the Tenengrad algorithm to evaluate the clear image of the current deblurred level to obtain an image clarity evaluation value Q of the clear image of the current level, and compare it with the set threshold T to quickly determine whether the clear image is an unprocessable image; if Q>T, return to and repeat step S4; if Q<T, execute step S11; S11: Output the final deblurred QR code image.

2. The method for quickly deblurring a fuzzy QR code according to claim 1, wherein: The specific method of pre-processing in step S1 is: S1.

1. Read the collected color fuzzy QR code image, establish a spatial rectangular coordinate system with R, G, and B as axes, represent each pixel color of the fuzzy QR code image with a point in the spatial rectangular coordinate system, and obtain three-dimensional image data of the fuzzy QR code image; S1.

2. Gray-scale the three-dimensional image data into a two-dimensional pixel matrix Gimg through the mapping function f3, thereby preprocessing the blurred QR code image. The two-dimensional pixel matrix Gimg is the preprocessed blurred QR code image. The calculation formula of the mapping function f3 is: f3 = 0.2989R + 0.5870G + 0.1140B (1) The expression of the two-dimensional pixel matrix Gimg is: Wherein, n represents the width of the preprocessed fuzzy QR code image data matrix, m represents the height of the preprocessed fuzzy QR code image data matrix, and a(x, y) represents the grayscale value of the image at the (x, y) position.

3. The method for quickly deblurring a fuzzy QR code according to claim 1, wherein: The pre-decoding module in step S8 is a decode module based on the zxing decoder, or a decoding module of the WeChat QR code scanning interface.

4. The method for quickly deblurring a fuzzy QR code according to claim 1, wherein: The image clarity evaluation value Q in step S10 is obtained by evaluating the clear image at the current deblurring level using the Tenengrad algorithm. The image clarity is defined as: D(f)=∑ y ∑ x |G(x,y)| in, And G(x,y)>T0, T0 is the given edge detection threshold, G x and G y are the horizontal and vertical gradient values at the pixel point (x, y), and the Sobel operator is used to extract the horizontal and vertical gradient values respectively.

5. A system for quickly deblurring a fuzzy QR code, used to execute the method for quickly deblurring a fuzzy QR code according to any one of claims 1 to 4, characterized in that: include: A preprocessing unit, an initialization unit, an objective function construction unit, a clear image estimation unit, a blur kernel function estimation unit, a first deblurring level judgment unit, an image search pattern judgment unit, a decoding judgment unit, a second deblurring level judgment unit, a clarity judgment unit, and an output unit; The preprocessing unit obtains a blurred QR code image and preprocesses the blurred QR code image; the initialization unit sets a maximum deblurring level max_scale according to the blur degree of the blurred QR code image and initializes the blur kernel function K0; the objective function construction unit constructs a first objective function for clear image estimation and a second objective function for blur kernel function estimation; the clear image estimation unit obtains an estimated clear image using the blurred QR code image, the current blur kernel function K, and the first objective function; The fuzzy kernel function estimation unit obtains an estimated fuzzy kernel function using the fuzzy QR code image, the estimated clear image, and the second objective function; The first deblurring level determination unit determines whether the maximum deblurring level is reached; If the maximum deblurring level is reached, the clear image of the current level is output through the output unit; if the maximum deblurring level is not reached, the clear image of the current level is sent to the image-finding pattern judgment unit; the image-finding pattern judgment unit performs image-finding pattern detection on the deblurred QR code image of the current level and determines the number of image-finding patterns that can be detected; if the number of detected image-finding patterns is equal to 3, the clear image of the current level is sent to the decoding judgment unit; Otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; the decoding judgment unit uses the pre-decoding module to perform decoding judgment to determine whether the deblurred QR code image of the current level can be decoded; if it can be decoded, the clear image of the current level is sent to the output unit; Otherwise, the clear image of the current level is sent to the second deblurring level judgment unit; The second deblur level determination unit determines whether the current deblur level is max_scale-1; If yes, the clear image of the current level is sent to the clarity judgment unit for judgment; if no, the clear image of the current level is sent to the clear image estimation unit; The clarity judgment unit obtains the image clarity evaluation value Q of the clear image at the current level and compares it with the set threshold T to quickly determine whether the clear image is an unprocessable image; if Q>T, the clear image at the current level is sent to the clear image estimation unit; if Q<T, the clear image at the current level is sent to the output unit; The output unit outputs the final deblurred QR code image.

6. The system for rapidly deblurring a fuzzy QR code according to claim 5, characterized in that: The decoding judgment unit uses a pre-decoding module to perform decoding judgment, and the pre-decoding module is a decode module based on the zxing decoder, or a decoding module of the WeChat QR code scanning interface.

7. The system for rapidly deblurring a fuzzy QR code according to claim 5, wherein: The clarity judgment unit uses the Tenengrad algorithm to evaluate the clear image of the current deblurring level to obtain an image clarity evaluation value Q. The image clarity is defined as: D(f)=∑ y ∑ x |G(x,y)| in, And G(x,y)>T0, T0 is the given edge detection threshold, G x and G y are the horizontal and vertical gradient values at the pixel point (x, y), and the Sobel operator is used to extract the horizontal and vertical gradient values respectively.