Two-dimensional code correction method, washing label verification method and washing label

By using the first and second type transformation matrices to segment and correct the QR code images in the QR code correction method, the problem of QR code recognition failure caused by shooting angle or deformation is solved, and efficient QR code correction and recognition is achieved.

CN119647500APending Publication Date: 2025-03-18ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411717548.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

During the QR code decoding and recognition process, the captured QR code cannot be recognized due to the shooting angle or the deformation of the QR code, and the existing technology is difficult to effectively solve this problem.

Method used

A QR code correction method is proposed. By determining the first type transformation matrix between the original QR code image and the standard QR code image, the QR code image is divided into multiple sub-images, and each sub-image is corrected using the second type transformation matrix, and finally the corrected sub-image is combined to obtain the corrected QR code image.

Benefits of technology

On the basis of ensuring the correction effect of QR codes, the correction speed is significantly improved, and the problem of QR code recognition failure caused by shooting angle or deformation can be effectively dealt with.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647500A_ABST
    Figure CN119647500A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a two-dimensional code correction method, a washing label verification method and a washing label. The two-dimensional code correction method comprises the following steps: determining a first type transformation matrix between an original two-dimensional code image and a standard two-dimensional code image; dividing the standard two-dimensional code image into a plurality of standard sub-images; for each standard sub-image, determining an original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first type transformation matrix; determining a second type transformation matrix between the standard sub-image and the corresponding original sub-image; for each original subimage, correcting the original subimage by adopting a second type transformation matrix between the original subimage and a corresponding standard subimage to obtain a corrected subimage corresponding to the original subimage; and combining the corrected sub-images corresponding to all the original sub-images to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of security technology, and in particular, to a two-dimensional code correction method, a washing label verification method, and a washing label. Background Art

[0002] Two-dimensional bar code is a popular encoding method. Compared with traditional barcodes, it can store more information, represent more data types, and can be widely used in various scenarios.

[0003] However, when decoding and identifying the QR code, the captured QR code may not be recognizable due to reasons such as the shooting angle and the deformation of the QR code. Summary of the invention

[0004] In view of this, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a two-dimensional code correction method is proposed, including:

[0006] Determine a first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image;

[0007] Dividing the standard two-dimensional code image into a plurality of standard sub-images;

[0008] For each standard sub-image, determining an original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first type transformation matrix;

[0009] determining a second type transformation matrix between the standard sub-image and the corresponding original sub-image;

[0010] For each original sub-image, correct the original sub-image by using a second type transformation matrix between the original sub-image and a corresponding standard sub-image to obtain a corrected sub-image corresponding to the original sub-image;

[0011] The corrected sub-images corresponding to all the original sub-images are combined to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.

[0012] According to a second aspect of one or more embodiments of this specification, a method for verifying a washing label is provided, wherein a QR code is displayed on the washing label, and the method comprises:

[0013] Acquire an unfilled-light QR code image and a filled-light QR code image obtained by performing image acquisition on the QR code displayed on the washing label, wherein the unfilled-light QR code image is acquired without being processed with fill light, and the filled-light QR code image is acquired after being processed with fill light;

[0014] Correcting the un-filled light two-dimensional code image using the aforementioned method to obtain a first two-dimensional code image;

[0015] Correcting the light-filled two-dimensional code image using the aforementioned method to obtain a second two-dimensional code image;

[0016] Performing anti-copying verification on the first two-dimensional code image;

[0017] Performing reflection verification based on the first two-dimensional code image and the second two-dimensional code image;

[0018] When the anti-copying verification is passed and the reflective verification is also passed, it is determined that the washing label has passed the verification.

[0019] According to a third aspect of one or more embodiments of this specification, a washing label is provided, comprising:

[0020] Basal layer;

[0021] A hot-melt reflective layer, which is located on the base layer and reflects light when exposed to light;

[0022] A carbon ribbon layer, the carbon ribbon layer is located on the hot-melt reflective layer, and ink is transferred to the hot-melt reflective layer by thermal transfer printing technology to form a two-dimensional code;

[0023] The washing label is verified by the aforementioned washing label verification method, and the area of ​​the carbon ribbon layer not covered by the hot-melt reflective layer will reflect light when exposed to light, so as to be used for the reflective verification in the washing label verification process.

[0024] According to a fourth aspect of one or more embodiments of the present specification, an electronic device is proposed, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the aforementioned method by running the executable instructions.

[0025] According to a fifth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the aforementioned method are implemented.

[0026] According to a sixth aspect of one or more embodiments of the present specification, a computer program product is proposed, comprising a computer program / instruction, which implements the steps of the aforementioned method when executed by a processor.

[0027] As can be seen from the above embodiments, when performing two-dimensional code correction, the present specification can first determine the first type of transformation matrix between the original two-dimensional code image and the standard two-dimensional code image. The first type of transformation matrix is ​​a transformation matrix with a better transformation effect. Then, for each standard sub-image in the standard two-dimensional code image, the corresponding original sub-image can be determined according to the first type of transformation matrix, and then the second type of transformation matrix between the standard sub-image and the corresponding original sub-image is determined. The second type of transformation matrix is ​​a transformation matrix with a faster transformation speed. Then, for each original sub-image, the second type of transformation matrix between the original sub-image and the corresponding standard sub-image is used to correct it, and the corresponding correction sub-image is obtained, thereby realizing the correction of the original two-dimensional code image and obtaining a corrected two-dimensional code image.

[0028] By adopting the above implementation method of this specification, when correcting the original two-dimensional code image, the two-dimensional code image can be divided into multiple sub-images, and the second type of transformation matrix between the standard sub-image and the original sub-image is first determined by using the first type of transformation matrix with better transformation effect, and then for each original sub-image, the second type of transformation matrix between the original sub-image and the corresponding standard sub-image is used to correct it, and the correction sub-image is obtained, thereby realizing the correction of the original two-dimensional code image. This scheme of correcting the original two-dimensional code image by using the first type of transformation matrix combined with the second type of transformation matrix can greatly improve the correction speed on the basis of ensuring the correction effect of the two-dimensional code. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic diagram of the architecture of a two-dimensional code correction service system provided by an exemplary embodiment.

[0030] Figure 2 It is a flowchart of a two-dimensional code correction method provided by an exemplary embodiment.

[0031] Figure 3 It is a flowchart of a method for determining a first type transformation matrix provided by an exemplary embodiment.

[0032] Figure 4 It is a flowchart of a method for calculating original reference point coordinates provided by an exemplary embodiment.

[0033] Figure 5 It is a schematic diagram of an original two-dimensional code image provided by an exemplary embodiment.

[0034] Figure 6 It is a flowchart of a method for determining a second type transformation matrix provided by an exemplary embodiment.

[0035] Figure 7 It is a schematic diagram of the cross-sectional structure of a water washing label provided by an exemplary embodiment.

[0036] Figure 8 The present invention is a schematic diagram of a water washing label provided by an exemplary embodiment.

[0037] Fig. 9 It is a flow chart of a method for verifying a washing label provided by an exemplary embodiment.

[0038] Fig.10 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0039] Fig.11 It is a block diagram of a two-dimensional code correction device provided by an exemplary embodiment.

[0040] Fig.12 It is a block diagram of a washing label verification device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0041] Two-dimensional bar code is a popular encoding method. Compared with traditional barcodes, it can store more information, represent more data types, and can be widely used in various scenarios.

[0042] However, when decoding and recognizing a QR code, the captured QR code may not be recognized due to shooting angle, deformation of the QR code, etc. At this time, it is often necessary to calibrate the captured QR code to a standard shape before recognition.

[0043] In related technologies, deep learning can be used to correct the QR code, thereby obtaining better correction effects. However, the deep learning method has problems such as high training difficulty and long reasoning time.

[0044] This specification provides a two-dimensional code correction solution, which can improve the correction speed while ensuring the correction effect.

[0045] Figure 1 FIG. 1 is a schematic diagram of the architecture of a two-dimensional code correction service system provided by an exemplary embodiment. Figure 1 As shown, the system may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, and the like.

[0046] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 may run a server-side program of a certain application to implement the relevant functions of the application. For example, when the server 11 runs a program of a QR code correction service, it may be implemented as a corresponding QR code correction service platform.

[0047] PC 13 and mobile phone 14 are only some types of electronic devices that users can use. In fact, users can obviously also use electronic devices such as the following types: tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification do not limit this. During operation, the electronic device can run a program on the client side of an application to implement the relevant functions of the application. The program on the client side can be a native application installed on the electronic device, or the program on the client side can be a small program, a quick application or other similar forms. Of course, when using web page technologies such as HTML5 or similar, the relevant functions can be implemented through the page displayed by the browser. The browser here can be an independent browser application or a browser module embedded in certain applications.

[0048] The client-side program can call the camera of the electronic device to capture the two-dimensional code image and send it to the server 11 for correction, recognition and other operations.

[0049] As for the network 12 for interaction between electronic devices such as PC 13 and mobile phone 14 and server 11, it is possible to select a wired or wireless network to achieve communication based on the communication mode supported by the corresponding electronic device, and this specification does not limit this. For example, PC 13 can support both wired and wireless communication, so it can use a wired or wireless network to achieve communication as needed, while mobile phone 14 usually only supports wireless communication, so it can use a wireless network to achieve communication.

[0050] Figure 2 It is a flowchart of a two-dimensional code correction method provided by an exemplary embodiment.

[0051] Please refer to Figure 2 The two-dimensional code correction method can be applied to the aforementioned Figure 1 The server 11 shown includes the following steps:

[0052] Step 202: determine a first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image.

[0053] In this embodiment, the original two-dimensional code image is a two-dimensional code image that needs to be corrected. Due to reasons such as the shooting angle or the material of the two-dimensional code attachment, the captured original two-dimensional code image may be deformed.

[0054] For example, if the QR code is attached to a cylindrical bottle or a flexible fabric, the original QR code image captured will be distorted. To ensure that the QR code can be accurately recognized, the original QR code image captured needs to be corrected.

[0055] In this embodiment, the standard two-dimensional code image is a two-dimensional code image without any deformation, which can be determined based on the version number of the two-dimensional code and the preset code element size. More commonly, the standard two-dimensional code image is a square.

[0056] In this embodiment, some reference points may be selected in the two-dimensional code image to determine the first type of transformation matrix. The reference points may be vertices and center points of the two-dimensional code image, vertices and center points of locators in the two-dimensional code image, and the like.

[0057] When determining the first type of transformation matrix, the position coordinates of these reference points in the original two-dimensional code image and the position coordinates of these reference points in the standard two-dimensional code image can be determined, and then the first type of transformation matrix can be calculated based on the difference in coordinates of the same reference points in the original two-dimensional code image and the standard two-dimensional code image.

[0058] The first type of transformation matrix usually has a good transformation effect, but takes a long time. For example, the first type of transformation matrix can be an elastic deformation algorithm matrix such as a TPS (Thin Plate Spline) transformation matrix, which can handle complex nonlinear transformations and has a good effect, but the TPS interpolation takes a long time, which will affect the image correction speed.

[0059] Step 204: divide the standard two-dimensional code image into a plurality of standard sub-images.

[0060] In this embodiment, the standard two-dimensional code image can be divided into a plurality of sub-images, referred to as standard sub-images. In a simpler way, the standard two-dimensional code image can be divided into N×N standard sub-images, where the value of N can be 3, 4, 5, 6, etc. Of course, in other examples, the standard two-dimensional code image can also be divided into N×M standard sub-images, and this specification does not impose any special restrictions on this.

[0061] Step 206: for each standard sub-image, determine an original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first type transformation matrix.

[0062] In this embodiment, each standard sub-image corresponds to a sub-image in the original two-dimensional code image, which is called an original sub-image. Assuming that the standard two-dimensional code image is divided into 3×3 standard sub-images, that is, 9 standard sub-images, the original two-dimensional code image also includes 9 original sub-images, and these 9 original sub-images correspond one-to-one with the 9 standard sub-images. For example, standard sub-image 1 corresponds to original sub-image 1, standard sub-image 2 corresponds to original sub-image 2, and so on.

[0063] In this embodiment, for each standard sub-image obtained by division, the original sub-image corresponding to the standard sub-image can be determined in the original two-dimensional code image according to the first type of transformation matrix. For example, the standard vertex coordinates of each vertex in the standard sub-image can be determined; then, the original vertex coordinates of each vertex in the original two-dimensional code image can be determined according to the first type of transformation matrix and the standard vertex coordinates, and then the original sub-image corresponding to the standard sub-image can be determined.

[0064] Step 208: Determine a second type transformation matrix between the standard sub-image and the corresponding original sub-image.

[0065] In this embodiment, for each standard sub-image, a second type transformation matrix between the standard sub-image and the corresponding original sub-image can be determined. Compared with the first type transformation matrix, the second type transformation matrix takes less time and has a faster transformation speed. For example, the second type transformation matrix can be a perspective transformation matrix, a radiation transformation matrix, etc.

[0066] When determining the second type transformation matrix, the second type transformation matrix between the standard sub-image and the corresponding original sub-image may be determined according to the difference between the standard vertex coordinates and the corresponding original vertex coordinates and the type of the second type transformation matrix.

[0067] Step 210: for each original sub-image, correct the original sub-image by using a second type transformation matrix between the original sub-image and a corresponding standard sub-image to obtain a corrected sub-image corresponding to the original sub-image.

[0068] Based on the aforementioned step 208, after determining the second type transformation matrix between each standard sub-image and the corresponding original sub-image, for each original sub-image, the second type transformation matrix between the original sub-image and its corresponding standard sub-image can be used to correct the original sub-image, thereby obtaining a corrected sub-image corresponding to the original sub-image, which is called a corrected sub-image.

[0069] Taking the second type transformation matrix being the perspective transformation matrix as an example, assuming that the second type transformation matrix of sub-image pair 1 is perspective transformation matrix 1, perspective transformation matrix 1 can be used to perform perspective transformation correction on original sub-image 1 to obtain corrected sub-image 1 corresponding to original sub-image 1.

[0070] Step 212: Combining the corrected sub-images corresponding to all the original sub-images to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.

[0071] Based on the aforementioned step 210, after obtaining the corrected sub-image corresponding to each original sub-image, these corrected sub-images may be combined to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.

[0072] It can be seen from the above description that when performing two-dimensional code correction, the present specification can first determine the first type of transformation matrix between the original two-dimensional code image and the standard two-dimensional code image. The first type of transformation matrix is ​​a transformation matrix with a better transformation effect. Then, for each standard sub-image in the standard two-dimensional code image, the corresponding original sub-image can be determined according to the first type of transformation matrix, and then the second type of transformation matrix between the standard sub-image and the corresponding original sub-image is determined. The second type of transformation matrix is ​​a transformation matrix with a faster transformation speed. Then, for each original sub-image, the second type of transformation matrix between the original sub-image and the corresponding standard sub-image is used to correct it, and the corresponding correction sub-image is obtained, thereby realizing the correction of the original two-dimensional code image and obtaining a corrected two-dimensional code image.

[0073] By adopting the above implementation method of this specification, when correcting the original two-dimensional code image, the two-dimensional code image can be divided into multiple sub-images, and the second type of transformation matrix between the standard sub-image and the original sub-image is first determined by using the first type of transformation matrix with better transformation effect, and then for each original sub-image, the second type of transformation matrix between the original sub-image and the corresponding standard sub-image is used to correct it, and the correction sub-image is obtained, thereby realizing the correction of the original two-dimensional code image. This scheme of correcting the original two-dimensional code image by using the first type of transformation matrix combined with the second type of transformation matrix can greatly improve the correction speed on the basis of ensuring the correction effect of the two-dimensional code.

[0074] The implementation process of the two-dimensional code correction solution of this specification is described in detail below from two aspects: determining the first type of transformation matrix and determining the second type of transformation matrix.

[0075] 1. Determination of the first type of transformation matrix

[0076] Figure 3 It is a flowchart of a method for determining a first type transformation matrix provided by an exemplary embodiment.

[0077] Please refer to Figure 3 , the method for determining the first type transformation matrix may include the following steps:

[0078] Step 302: determine the original reference point coordinates of a plurality of reference points in the original two-dimensional code image.

[0079] In this embodiment, the reference points may include the four vertices of the QR code image, the center point, the vertices of the four locators in the QR code image and the center point of the locator, etc. The developer can select them according to the actual situation. Generally speaking, the more reference points selected, the more accurate the first type of transformation matrix determined based on the reference points will be.

[0080] In one example, reference points such as the four vertices of the two-dimensional code image and the vertices of the four locators can be directly found from the original two-dimensional code image, and then their position coordinates in the original two-dimensional code image are used as the corresponding original reference point coordinates. For the center point, it can be calculated from the position coordinates of the vertices.

[0081] In another example, when detecting the area where the QR code is located in the captured original image, the detection algorithm usually has certain errors. If the position coordinates in the original QR code image are directly taken as the original reference point coordinates, errors may also occur and it is not accurate enough. In this example, more accurate original reference point coordinates of each reference point can be obtained by calculation.

[0082] Taking the four vertices of the original QR code image as an example, Figure 4 The steps shown are used to calculate the coordinates of the original reference point:

[0083] Step 3021, determining the four vertices of the minimum circumscribed quadrilateral of the original two-dimensional code image.

[0084] In this embodiment, the original two-dimensional code image may be a distorted rectangle, and its original straight edges may become curves after distortion. In this step, a minimum circumscribed quadrilateral may be generated for it, and then the four vertices of the minimum circumscribed quadrilateral are determined, which are recorded as P1, P2, P3 and P4.

[0085] Please refer to Figure 5 For example, taking the minimum bounding rectangle as an example, assuming that the four vertices of the original two-dimensional code image are points A, B, C and D, the minimum bounding rectangle P1P2P3P4 shown in the figure can be generated for it. The minimum bounding rectangle is Figure 5 It is represented by dotted lines, and its four vertices are P1, P2, P3 and P4 respectively.

[0086] Step 3022, determining the convex hull contour of the original two-dimensional code image.

[0087] In this embodiment, a convex hull contour may also be generated for the original two-dimensional code image. For example, a Jarvis stepping method, a Graham scanning method, or the like may be used to generate a convex hull contour for the original two-dimensional code image.

[0088] Please continue to refer to Figure 5 In the example of , the convex hull contour of the original two-dimensional code image is the contour formed by the edge of the two-dimensional code image in the figure.

[0089] It should be noted that if the shape of the original two-dimensional code image is relatively complex, this step may generate a plurality of convex hull contours for the original two-dimensional code image.

[0090] Step 3023: for each vertex of the minimum circumscribed quadrilateral, determine the contour point closest to the vertex of the minimum circumscribed quadrilateral on the convex hull contour to obtain four contour points.

[0091] In this embodiment, for the four minimum circumscribed quadrilateral vertices P1, P2, P3 and P4, the contour points closest to each minimum circumscribed quadrilateral vertex can be found in the convex hull contour determined in the aforementioned step 3022.

[0092] Assume that contour point P1' is found in the convex hull contour, P1' is closest to vertex P1, contour point P2' is closest to vertex P2, contour point P3' is closest to vertex P3, and contour point P4' is closest to vertex P4, so four contour points P1', P2', P3' and P4' can be found (not shown).

[0093] Step 3024, divide the two contour points corresponding to the adjacent minimum circumscribed quadrilateral vertices into a group, and fit the curve corresponding to the group of contour points according to the point set between the group of contour points, so as to obtain four groups of contour points corresponding to four curves.

[0094] Based on the above step 3023, after obtaining the four contour points corresponding to the vertices of the four minimum circumscribed quadrilaterals, the adjacent contour points can be divided into a group. Then, for each group of contour points, a curve fitting is performed according to the point set between the group of contour points on the convex hull contour to obtain a corresponding curve. For example, a cubic polynomial can be used for curve fitting to better describe the nonlinear trend in the point set.

[0095] Contour point group <![CDATA[P1'、P2']]> <![CDATA[P2'、P3']]> <![CDATA[P3'、P4']]> <![CDATA[P4'、P1']]> curve Q1 Q2 Q3 Q4

[0096] Table 1

[0097] Still taking the four contour points P1', P2', P3' and P4' as an example, please refer to the example in Table 1, P1' and P2' can be divided into one contour point group, P2' and P3' can be divided into one contour point group, P3' and P4' can be divided into one contour point group, and P4' and P1' can be divided into one contour point group. Among them, the point set between the contour point groups P1' and P2' is the set of all points between the points P1' and P2' on the convex hull contour, the point set between the contour point groups P2' and P3' is the set of all points between the points P2' and P3' on the convex hull contour, and so on.

[0098] Then, curve fitting can be performed on each point set to obtain the corresponding curve. For example, based on the point set between the contour point groups P1' and P2', curve Q1 can be fitted, based on the point set between the contour point groups P2' and P3', curve Q2 can be fitted, and so on, to obtain four fitted curves Q1, Q2, Q3 and Q4.

[0099] Step 3025: Calculate the coordinates of the intersection of every two adjacent curves among the four curves as the original reference point coordinates corresponding to the four vertices of the original two-dimensional code image.

[0100] In this embodiment, still taking Table 1 as an example, the intersection point I1 of the curves Q1 and Q2, the intersection point I2 of the curves Q2 and Q3, the intersection point I3 of the curves Q3 and Q4, and the intersection point I4 of the curves Q4 and Q1 can be calculated, and the intersection points I1, I2, I3 and I4 are used as the original reference point coordinates corresponding to the four vertices of the original two-dimensional code image, thereby obtaining more accurate original reference point coordinates.

[0101] In step 302, the four locators in the original two-dimensional code image include three locating marks and one correction mark of the two-dimensional code, wherein the three locating marks are respectively located at the upper left corner, lower left corner and upper right corner of the two-dimensional code, and the correction mark is located at the lower right corner of the two-dimensional code.

[0102] When calculating the original reference point coordinates of the vertices of the four locators in the original two-dimensional code image, the following method can also be used: Figure 4 The calculation is performed in the manner shown. A simpler method is to use Figure 4 In the first three steps of the method shown, for each locator, the contour points on the convex hull contour of the locator whose vertices are closest to the vertices of the locator's minimum circumscribed quadrilateral are calculated, that is, the contour points P1', P2', P3' and P4' corresponding to the locator are calculated as the coordinates of its original reference point.

[0103] In step 302, after calculating the original reference point coordinates corresponding to each vertex, the center point coordinates of the corresponding figure can be calculated based on the original reference point coordinates of the vertex, thereby obtaining the original reference point coordinates of each reference point in the original two-dimensional code image.

[0104] Step 304: determine the standard reference point coordinates of the plurality of reference points in the standard two-dimensional code image.

[0105] In this embodiment, the standard two-dimensional code image is a two-dimensional code image that has not undergone any deformation, and the coordinates of the aforementioned reference point in the standard two-dimensional code image can be used as the coordinates of the standard reference point.

[0106] The standard two-dimensional code image can be determined based on a two-dimensional code version number and a preset code element size, wherein the two-dimensional code version number can be read from the original two-dimensional code image.

[0107] Taking a QR code as an example, there are two areas in the QR code image that carry version number information. In this example, the version numbers can be read from the two areas in the original QR code image, for example, the first version number can be read from the first area, and the second version number can be read from the second area. Then, it can be determined whether the first version number and the second version number are the same.

[0108] If the first version number and the second version number are different, it means that the original QR code image captured is severely deformed. Even if it is corrected, it may not be decoded correctly after correction, and an error message may be returned, and the user may be guided to re-capture the QR code image.

[0109] If the first version number and the second version number are the same, the same version number can be determined as the QR code version number of the original QR code image, which is also the QR code version number of the standard QR code image, and then the standard QR code image is determined based on the version number and the preset code element size.

[0110] Step 306: Determine a first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image according to the original reference point coordinates and the standard reference point coordinates.

[0111] In this embodiment, assuming that the original reference point coordinates are marked as M and the standard reference point coordinates are marked as M', the TPS transformation matrix from M to M' can be calculated and recorded as K.

[0112] For example, assuming that 24 reference points are selected, namely the four vertices of the QR code image, the vertices of the four locators and the center point (the four vertices of each locator and its center point), the TPS transformation matrix K from the original QR code image to the standard QR code image can be calculated based on the 24 original reference point coordinates M and the 24 corresponding standard reference point coordinates M'.

[0113] Of course, in other examples, since the TPS matrix is ​​reversible, the TPS transformation matrix from the standard two-dimensional code image to the original two-dimensional code image can also be calculated, and this specification does not impose any special restrictions on this.

[0114] At this point, the first type of transformation matrix between the original two-dimensional code image and the standard two-dimensional code image is calculated.

[0115] 2. Determination of the Second Type Transformation Matrix

[0116] In this embodiment, after calculating the first type of transformation matrix, please refer to Figure 6 , the method for determining the second type transformation matrix may include the following steps:

[0117] Step 602: Divide the standard two-dimensional code image into a plurality of standard sub-images.

[0118] In this embodiment, the description is made by taking the example of dividing the standard two-dimensional code image into 3×3, 9 standard sub-images in total.

[0119] Step 604: for each standard sub-image, determine the standard vertex coordinates of each vertex in the standard sub-image.

[0120] Based on the aforementioned step 602, after the standard two-dimensional code image is divided into 9 standard sub-images, for each standard sub-image, vertex coordinates of 4 vertices in the standard sub-image may be determined, which are referred to as standard vertex coordinates.

[0121] Step 606: determine the original vertex coordinates of each vertex in the original two-dimensional code image according to the first type transformation matrix and the standard vertex coordinates, so as to obtain the original sub-image corresponding to the standard sub-image.

[0122] In this embodiment, taking the calculated first transformation matrix as the TPS transformation matrix K from the original two-dimensional code image to the standard two-dimensional code image as an example, for each standard sub-image, the coordinates of each vertex in the original two-dimensional code image can be calculated based on the TPS transformation matrix K and the four standard vertex coordinates of the standard sub-image, which are called the original vertex coordinates, and then the original sub-image corresponding to the standard sub-image in the original two-dimensional code image can be determined.

[0123] This embodiment uses Z to represent the standard vertex coordinates of the standard sub-image vertices, and Z can be subjected to an inverse TPS transformation with respect to K to obtain the coordinates of the standard sub-image vertices in the original two-dimensional code image, that is, the original vertex coordinates of the original sub-image vertices, which are recorded as Z'.

[0124] In this step, for each standard vertex coordinate of a standard sub-image, the original vertex coordinate of the corresponding original sub-image can be obtained.

[0125] Step 608: Determine a second type transformation matrix between the standard sub-image and the original sub-image according to the standard vertex coordinates and the original vertex coordinates, and obtain a plurality of second type transformation matrices.

[0126] In this embodiment, the standard sub-image may be used as a unit, and the perspective transformation matrix from the original sub-image to the standard sub-image may be calculated according to its standard vertex coordinates and the corresponding original vertex coordinates as the second type transformation matrix, and the perspective transformation matrix may be denoted as U.

[0127] Standard sub-image Original sub-image Perspective transformation matrix Standard sub-image 1 Original sub-image 1 Perspective transformation matrix U1 Standard sub-image 2 Original sub-image 2 Perspective transformation matrix U2 … … … Standard sub-image 9 Original sub-image 9 Perspective transformation matrix U9

[0128] Table 2

[0129] Please refer to the example in Table 2. Assuming that the standard sub-images are standard sub-image 1-standard sub-image 9, the corresponding original sub-images are original sub-image 1-original sub-image 9. In this step, the perspective transformation matrix U1 from original sub-image 1 to standard sub-image 1, the perspective transformation matrix U2 from original sub-image 2 to standard sub-image 2, and so on, a total of 9 perspective transformation matrices can be calculated.

[0130] In this embodiment, after calculating the aforementioned second type transformation matrix, for each original sub-image, the second type transformation matrix between the original sub-image and the corresponding standard sub-image may be used to correct the original sub-image to obtain the corresponding corrected sub-image. Still taking Table 2 as an example, the perspective transformation matrix U1 may be used to correct the original sub-image 1, and the image obtained after correction may be referred to as the corrected sub-image 1. Similarly, the perspective transformation matrix U2 may be used to correct the original sub-image 2 to obtain the corrected sub-image 2. By analogy, corrected sub-images 1-9 corresponding to the original sub-images 1-9 may be obtained.

[0131] In this embodiment, all correction sub-images, that is, correction sub-images 1-9 may be combined to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image, so as to complete the two-dimensional code correction.

[0132] This specification also provides a washing label and a washing label verification solution, wherein a QR code is displayed on the washing label, which has the advantages of strong anti-counterfeiting ability and high recognition efficiency.

[0133] The following is a detailed description from two aspects: water washing label structure and water washing label verification.

[0134] 3. Washing label structure

[0135] A washing label, also known as a care mark, is a durable label that is mainly used in the clothing industry, home textile industry, luggage industry, etc. It can be used to provide important information about fabric composition, washing methods, drying methods, etc.

[0136] In this embodiment, the wash label may include a base layer, a hot-melt reflective layer and a carbon ribbon layer.

[0137] The base layer is usually the most basic material for the washing label, and can be made of durable fiber materials, such as nylon, polyester, etc., which provides the main structure and strength for the washing label. More commonly, a white base layer can be used.

[0138] The hot-melt reflective layer is located on the base layer and can be implemented by hot-melt reflective cloth. The hot-melt reflective cloth is a special material that combines the characteristics of hot-melt technology and reflective materials. Its upper surface has a reflective function, which can be implemented by reflective units of the type of microprisms, glass beads, lattices, etc., and light reflection will occur when exposed to light. The lower surface is a hot-melt part, which can be fixed to the base layer by ironing. The color of the hot-melt reflective layer can be consistent with or similar to the color of the base layer (for example, the hue difference between the color of the hot-melt reflective layer and the color of the base layer is less than 5 degrees, the brightness difference is less than 10%, etc.). For example, the color of the hot-melt reflective layer is white, light gray, etc.

[0139] The carbon ribbon layer is located on the hot-melt reflective layer, and the ink on the carbon ribbon can be transferred to the hot-melt reflective layer by thermal transfer printing technology to form a two-dimensional code image. The carbon ribbon layer can be a layer of colored carbon ribbon. The carbon ribbon layer can also include two layers of single-color carbon ribbons of different colors, for example, a layer of white carbon ribbon and a layer of black carbon ribbon, to form a two-dimensional code image, etc.

[0140] The area where the carbon ribbon layer fails to cover the hot-melt reflective layer will reflect light when exposed to light, and can be used for reflective verification in a subsequent washing label verification process.

[0141] Figure 7 It is a schematic diagram of the cross-sectional structure of a water washing label provided by an exemplary embodiment.

[0142] Please refer to Figure 7 In this embodiment, the washable label includes a 5-layer structure, which is a base layer, a hot-melt reflective layer, a first carbon ribbon layer, a second carbon ribbon layer and a waterproof layer from bottom to top.

[0143] The base layer may be white. The hot-melt reflective layer may be light grey. The first carbon ribbon layer may be a white carbon ribbon to form white code elements on the two-dimensional code image. The second carbon ribbon layer may be a black carbon ribbon to form black code elements on the two-dimensional code image. The waterproof layer may have a waterproof effect to protect the underlying carbon ribbon layer.

[0144] Of course, in other examples, the second carbon ribbon layer may also use other colors that are significantly different from the base layer (eg, a hue difference greater than or equal to 30 degrees, a brightness difference greater than or equal to 50%, etc.), and this specification does not impose any special restrictions on this.

[0145] In this embodiment, after the first carbon ribbon layer and the second carbon ribbon layer are respectively printed on the hot melt reflective layer, there are still some areas on the hot melt reflective layer that are not covered by the carbon ribbon. These uncovered areas will reflect light after being exposed to light and can be used for reflective verification in the water washing label verification process.

[0146] Optionally, in other embodiments, a tiny graphic of the same color as the hot-melt reflective layer may be embedded in the black second carbon ribbon layer for anti-copying verification in the washing label verification process.

[0147] Figure 8 The present invention is a schematic diagram of a water washing label provided by an exemplary embodiment.

[0148] Please refer to Figure 8 The washing label includes a white base layer, and the upper part of the base layer displays basic information of the washing label, such as clothing material, washing method, etc. The lower part of the base layer displays a QR code image. Specifically, the lower part of the base layer has a gray hot-melt reflective layer, and the hot-melt reflective layer is printed with a QR code image.

[0149] The two-dimensional code image forms white code elements through a white carbon ribbon layer and black code elements through a black carbon ribbon layer, and light grey tiny graphics are embedded on the black code elements, which can be used for anti-copying verification of washing labels.

[0150] Please continue to refer to Figure 8 In the QR code image displayed on the base layer, there are light gray areas that are not covered by white code elements or black code elements. These light gray areas are hot-melt reflective layers, which will reflect light when exposed to light and can be used for reflective verification of wash labels.

[0151] 4. Washing label verification

[0152] Fig. 9 It is a flow chart of a method for verifying a washing label provided by an exemplary embodiment.

[0153] Please refer to Fig. 9 The washing label verification method may include the following steps:

[0154] Step 902, obtaining an unfilled-light QR code image and a filled-light QR code image obtained by performing image acquisition on the QR code displayed on the washing label, wherein the unfilled-light QR code image is acquired without fill-light processing, and the filled-light QR code image is acquired after fill-light processing.

[0155] In this embodiment, when verifying the washing label provided in this specification, two images of the QR code on the washing label can be collected, one of which is collected under fill light and the other is collected without fill light. In this embodiment, the QR code image collected without fill light processing is called the non-fill light QR code image, and the QR code image collected after fill light processing is called the fill light QR code image.

[0156] In actual implementation, the QR code image can be collected through an APP or mini-program on an electronic device that has a washing label verification function. After the collection is triggered, the unfilled light QR code image can be collected without turning on the flash, and the filled light QR code image can be collected with the flash turned on.

[0157] Step 904: Correct the un-filled-light two-dimensional code image to obtain a first two-dimensional code image, and correct the filled-light two-dimensional code image to obtain a second two-dimensional code image.

[0158] In this embodiment, after obtaining the above-mentioned unfilled light two-dimensional code image and the above-mentioned filled light two-dimensional code image, the above-mentioned two-dimensional code correction scheme provided in this specification can be used to correct them to obtain a first two-dimensional code image and a second two-dimensional code image. The first two-dimensional code image is obtained by correcting the unfilled light two-dimensional code image, and the second two-dimensional code image is obtained by correcting the filled light two-dimensional code image.

[0159] Step 906: Perform anti-copying verification on the first two-dimensional code image.

[0160] Based on the aforementioned step 902, after obtaining the first two-dimensional code image, the first two-dimensional code image can be decoded to obtain its code value, and then the corresponding two-dimensional code base image can be obtained according to the code value. The two-dimensional code base image refers to the basic two-dimensional code image used to generate the two-dimensional code on the washing label. After the two-dimensional code base image is generated, the mapping relationship between it and the corresponding code value can be saved for subsequent verification. Optionally, after generating the two-dimensional code on the washing label, the two-dimensional code base image can also be used to shoot and save the two-dimensional code on the washing label using a high-definition camera, and this manual does not impose any special restrictions on this.

[0161] In this embodiment, the anti-copying verification can be performed by comparing the first two-dimensional code image and the corresponding two-dimensional code base image. In a simpler way, the similarity of the two images can be calculated. If the similarity is greater than or equal to a threshold, it means that the first two-dimensional code image and the two-dimensional code base image are very similar, and it can be determined that the first two-dimensional code image has passed the anti-copying verification; if the similarity is less than the threshold, it means that the first two-dimensional code image and the two-dimensional code base image are quite different, and the two-dimensional code image on the washing label to be verified may be obtained by copying a legal washing label, and then it can be determined that the first two-dimensional code image has not passed the anti-copying verification, or it can be directly determined that the washing label has not passed the verification.

[0162] In other examples, to improve the reliability of anti-copy verification, refer to Figure 8 , tiny graphics can be embedded in the black code element of the washing label QR code. Since these graphics are very small, there will be errors in the accuracy of the second printing after theft, which will cause the tiny graphics on the QR code image printed after theft to be different from the tiny graphics on the QR code base. Even if the QR code is regenerated, it is impossible to generate completely identical tiny graphics, which can better prevent copying verification.

[0163] When performing anti-copy verification, the aforementioned method of calculating image similarity can be used for verification, or an image comparison model can be used for verification. The image comparison model can adopt a deep learning model of any structure such as ResNet (Residual Neural Network), VGG (Visual Geometry Group, a deep convolutional neural network), ViT (Vision Transformer, a deep learning model in the visual field based on the Transformer architecture), and this manual does not impose any special restrictions on this.

[0164] Specifically, when the image comparison model is used for verification, the first two-dimensional code image and the two-dimensional code base map can be input into the image comparison model to obtain the similarity of each two-dimensional code element output by the image comparison model, and then the code element with a similarity less than the code element similarity threshold can be determined as a dissimilar code element. For example, the code element with a similarity less than 50% can be determined as a dissimilar code element. Then, it can be determined whether the area proportion of the dissimilar code element in the two-dimensional code image is greater than or equal to the proportion threshold. If it is greater than or equal to the proportion threshold, it means that the proportion of dissimilar code elements is high, and the two-dimensional code image on the washing label to be verified may be obtained by copying a legal washing label. It can be determined that the first two-dimensional code image has not passed the anti-copying verification; if the area proportion is less than the proportion threshold, it means that the proportion of dissimilar code elements is not high, and it can be determined that the first two-dimensional code image has passed the anti-copying verification.

[0165] Step 908: Perform reflection verification based on the first two-dimensional code image and the second two-dimensional code image.

[0166] In this embodiment, since the area of ​​the hot-melt reflective layer of the washing label that is not covered by the carbon tape will reflect light when exposed to light, this characteristic can be used to perform reflection verification on the washing label.

[0167] When performing reflective verification, on the one hand, the corresponding reflective base image can be obtained according to the code value of the first two-dimensional code image. The reflective base image is generated based on the area not covered by the carbon ribbon when the two-dimensional code image of the water-washing label is generated. In other words, the reflective base image is an image formed by the reflective area after the two-dimensional code image on the water-washing label is illuminated.

[0168] On the other hand, the first two-dimensional code image and the second two-dimensional code image can be compared to identify the reflective area, that is, to obtain a reflective image. Specifically, the first two-dimensional code image is an image obtained without fill light processing, and no reflection will appear on it, while the second two-dimensional code image is an image obtained after fill light processing, and the uncovered hot-melt reflective layer on it will reflect light after fill light. By comparing the first two-dimensional code image and the second two-dimensional code image, the area where the uncovered hot-melt reflective layer is located can be identified, which is called a reflective image.

[0169] Next, it can be determined whether the reflective image matches the reflective base map. If the reflective image matches the reflective base map, it can be said that the second two-dimensional code image reflects normally, and it can be determined that it has passed the reflective verification. If the reflective image does not match the reflective base map, it can be said that the second two-dimensional code image does not reflect normally, and it is very likely to be a copied and forged two-dimensional code (the copy of the two-dimensional code on the washing label cannot copy the reflective effect of the hot-melt reflective layer), and it can be determined that it has not passed the reflective verification, and then it can be determined that the washing label has not passed the verification.

[0170] It should be noted that this embodiment does not limit the execution order of step 904 and step 906. In other examples, step 906 may be executed first, or step 904 and step 906 may be executed in parallel.

[0171] Step 910: When the anti-copying verification passes and the reflective verification also passes, it is determined that the washing label passes the verification.

[0172] Based on the verification results of the aforementioned steps 906 and 908, if the anti-copy verification passes and the reflective verification also passes, it can be determined that the water washing label passes the verification. If the anti-copy verification fails or the reflective verification fails, it can be determined that the water washing label fails the verification.

[0173] From the above description, it can be seen that the washing label structure provided in this manual can effectively prevent counterfeiting methods such as copying and reprinting washing labels, and achieve a good anti-counterfeiting effect. At the same time, the washing label verification solution provided in this manual can be verified using the camera and flash of an electronic device, without the need for additional equipment or expert experience. It has the advantage of being easy to identify and can be widely used by ordinary users.

[0174] It should be noted that the aforementioned water washing label verification method provided in this specification can be applied to Figure 1 In the server shown, the electronic device can send the captured QR code image to the server, and the server performs QR code correction and washing label verification. Optionally, the aforementioned washing label verification method can also be applied to electronic devices, and this specification does not impose any special restrictions on this.

[0175] Fig.10 is a schematic structural diagram of a device provided by an exemplary embodiment. Fig.10 At the hardware level, the device includes a processor 1002, an internal bus 1004, a network interface 1006, a memory 1008, and a non-volatile memory 1010, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 1002 reading the corresponding computer program from the non-volatile memory 1010 into the memory 1008 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0176] Please refer to Fig.11 The two-dimensional code correction device 1100 can be applied to Fig.10 The device shown in the figure is used to implement the technical solution of this specification. The two-dimensional code correction device 1100 may include:

[0177] A first matrix determination module 1101 determines a first type of transformation matrix between an original two-dimensional code image and a standard two-dimensional code image;

[0178] A sub-image division module 1102 divides the standard two-dimensional code image into a plurality of standard sub-images;

[0179] The sub-image determination module 1103 determines, for each standard sub-image, an original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first-type transformation matrix; the second matrix determination module 1104 determines a second-type transformation matrix between the standard sub-image and the corresponding original sub-image;

[0180] The sub-image correction module 1105 corrects each original sub-image by using a second type transformation matrix between the original sub-image and a corresponding standard sub-image to obtain a corrected sub-image corresponding to the original sub-image;

[0181] The sub-image combining module 1106 combines the corrected sub-images corresponding to all the original sub-images to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.

[0182] Optionally, the process of the sub-image determination module 1103 determining the second type transformation matrix between the standard sub-image and the corresponding original sub-image in the original two-dimensional code image according to the first type transformation matrix includes:

[0183] Determining standard vertex coordinates of each vertex in the standard sub-image;

[0184] Determine the original vertex coordinates of each vertex in the original two-dimensional code image according to the first type transformation matrix and the standard vertex coordinates, so as to obtain an original sub-image corresponding to the standard sub-image;

[0185] The process of the second matrix determination module 1104 determining the second type transformation matrix between the standard sub-image and the corresponding original sub-image includes:

[0186] A second type transformation matrix between the standard sub-image and the corresponding original sub-image is determined according to the standard vertex coordinates and the original vertex coordinates.

[0187] Optionally, the process of determining the first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image by the first matrix determination module 1101 includes:

[0188] Determine the original reference point coordinates of several reference points in the original two-dimensional code image;

[0189] Determine standard reference point coordinates of the plurality of reference points in the standard two-dimensional code image;

[0190] A first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image is determined according to the original reference point coordinates and the standard reference point coordinates.

[0191] Optionally, the reference points include four vertices of the two-dimensional code image, and the process of determining the original reference point coordinates of the plurality of reference points in the original two-dimensional code image includes:

[0192] Determine four vertices of the minimum circumscribed quadrilateral of the original two-dimensional code image;

[0193] Determine the convex hull contour of the original two-dimensional code image;

[0194] For each vertex of the minimum circumscribed quadrilateral, determine the contour point closest to the vertex of the minimum circumscribed quadrilateral on the convex hull contour to obtain four contour points;

[0195] The two contour points corresponding to the adjacent minimum circumscribed quadrilateral vertices are divided into a group, and the curve corresponding to the group of contour points is fitted according to the point set between the group of contour points, so that four groups of contour points correspond to four curves;

[0196] The coordinates of the intersection of every two adjacent curves among the four curves are calculated as the coordinates of the original reference points corresponding to the four vertices of the original two-dimensional code image.

[0197] Optionally, the reference points include vertices and a center point of four locators in the two-dimensional code image.

[0198] Optionally, the two-dimensional code correction device 1100 further includes:

[0199] The standard image determination module 1107 extracts the version number of the QR code from the original QR code image before determining the first type transformation matrix between the original QR code image and the standard QR code image; and determines the standard QR code image according to the version number and a preset code element size.

[0200] Optionally, the process of extracting the version number of the QR code from the original QR code image includes:

[0201] Extracting a first version number from a first area of ​​the original two-dimensional code image;

[0202] Extracting a second version number from a second area of ​​the original two-dimensional code image;

[0203] Determine whether the first version number is the same as the second version number;

[0204] If the first version number is the same as the second version number, the same version number is determined as the version number of the QR code.

[0205] Please refer to Fig.12 The washing label verification device 1200 can also be applied to Fig.10 In the device shown, a QR code is displayed on the washing label to implement the technical solution of this specification. The washing label verification device 1200 may include:

[0206] An image acquisition module 1201 acquires an unfilled light QR code image and a filled light QR code image obtained by performing image acquisition on the QR code displayed on the washing label, wherein the unfilled light QR code image is acquired without being processed with fill light, and the filled light QR code image is acquired after being processed with fill light;

[0207] The image correction module 1202 corrects the un-filled-light two-dimensional code image to obtain a first two-dimensional code image, and corrects the filled-light two-dimensional code image to obtain a second two-dimensional code image.

[0208] The anti-copy verification module 1203 performs anti-copy verification on the first two-dimensional code image;

[0209] A reflective verification module 1204, performing reflective verification based on the first two-dimensional code image and the second two-dimensional code image;

[0210] The washing label verification module 1205 determines that the washing label has passed the verification if the anti-copying verification has passed and the reflective verification has also passed.

[0211] Optionally, the process of the anti-copying verification module 1203 performing anti-copying verification on the first two-dimensional code image includes:

[0212] Decoding the first two-dimensional code image, and acquiring a corresponding two-dimensional code base image according to the decoding result;

[0213] Inputting the two-dimensional code base image and the first two-dimensional code image into an image comparison model to obtain a code element similarity of each code element output by the image comparison model;

[0214] Determine the codewords whose codeword similarity is less than the similarity threshold as dissimilar codewords;

[0215] Calculate the area ratio of dissimilar code elements in the image;

[0216] When the area proportion is less than the proportion threshold, it is determined that the first two-dimensional code image passes the anti-copying verification.

[0217] Optionally, the process of the reflective verification module 1204 performing reflective verification based on the first two-dimensional code image and the second two-dimensional code image includes:

[0218] Decoding the first two-dimensional code image, and acquiring a corresponding reflective background image according to the decoding result;

[0219] Comparing the first two-dimensional code image with the second two-dimensional code image to obtain a reflective image;

[0220] Determining whether the reflective image matches the reflective base map;

[0221] When the reflective image matches the reflective base map, it is determined that the reflective verification is passed.

[0222] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.

[0223] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0224] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

Claims

1. A two-dimensional code correction method, comprising: Determine a first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image; Dividing the standard two-dimensional code image into a plurality of standard sub-images; For each standard sub-image, determining an original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first type transformation matrix; determining a second type transformation matrix between the standard sub-image and the corresponding original sub-image; For each original sub-image, correct the original sub-image by using a second type transformation matrix between the original sub-image and a corresponding standard sub-image to obtain a corrected sub-image corresponding to the original sub-image; The corrected sub-images corresponding to all the original sub-images are combined to obtain a corrected two-dimensional code image corresponding to the original two-dimensional code image.

2. According to the method of claim 1, the process of determining the original sub-image corresponding to the standard sub-image in the original two-dimensional code image according to the first type transformation matrix comprises: Determining standard vertex coordinates of each vertex in the standard sub-image; Determine the original vertex coordinates of each vertex in the original two-dimensional code image according to the first type transformation matrix and the standard vertex coordinates, so as to obtain an original sub-image corresponding to the standard sub-image; The process of determining a second type transformation matrix between the standard sub-image and the corresponding original sub-image comprises: A second type transformation matrix between the standard sub-image and the corresponding original sub-image is determined according to the standard vertex coordinates and the original vertex coordinates.

3. According to the method of claim 1, the process of determining the first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image comprises: Determine the original reference point coordinates of several reference points in the original two-dimensional code image; Determine standard reference point coordinates of the plurality of reference points in the standard two-dimensional code image; A first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image is determined according to the original reference point coordinates and the standard reference point coordinates.

4. The method according to claim 3, wherein the reference points include four vertices of the two-dimensional code image, and the process of determining the original reference point coordinates of the plurality of reference points in the original two-dimensional code image comprises: Determine four vertices of the minimum circumscribed quadrilateral of the original two-dimensional code image; Determine the convex hull contour of the original two-dimensional code image; For each vertex of the minimum circumscribed quadrilateral, determine the contour point closest to the vertex of the minimum circumscribed quadrilateral on the convex hull contour to obtain four contour points; The two contour points corresponding to the adjacent minimum circumscribed quadrilateral vertices are divided into a group, and the curve corresponding to the group of contour points is fitted according to the point set between the group of contour points, so that four groups of contour points correspond to four curves; The coordinates of the intersection of every two adjacent curves among the four curves are calculated as the coordinates of the original reference points corresponding to the four vertices of the original two-dimensional code image.

5. The method according to claim 3, wherein the reference points include vertices and a center point of four locators in the two-dimensional code image.

6. The method according to claim 1, before determining the first type transformation matrix between the original two-dimensional code image and the standard two-dimensional code image, the method further comprises: Extracting a version number of the QR code from the original QR code image; A standard two-dimensional code image is determined according to the version number and a preset code element size.

7. According to the method of claim 6, the process of extracting the version number of the two-dimensional code from the original two-dimensional code image comprises: Extracting a first version number from a first area of ​​the original two-dimensional code image; Extracting a second version number from a second area of ​​the original two-dimensional code image; Determine whether the first version number is the same as the second version number; If the first version number is the same as the second version number, the same version number is determined as the version number of the QR code.

8. A method for verifying a washing label, wherein a QR code is displayed on the washing label, the method comprising: Acquire an unfilled-light QR code image and a filled-light QR code image obtained by performing image acquisition on the QR code displayed on the washing label, wherein the unfilled-light QR code image is acquired without being processed with fill light, and the filled-light QR code image is acquired after being processed with fill light; Correcting the un-filled light two-dimensional code image using the method described in any one of claims 1 to 7 to obtain a first two-dimensional code image; Correcting the light-filled two-dimensional code image using the method described in any one of claims 1 to 7 to obtain a second two-dimensional code image; Performing anti-copying verification on the first two-dimensional code image; Performing reflection verification based on the first two-dimensional code image and the second two-dimensional code image; When the anti-copying verification is passed and the reflective verification is also passed, it is determined that the washing label has passed the verification.

9. The method according to claim 8, wherein the process of performing anti-copying verification on the first two-dimensional code image comprises: Decoding the first two-dimensional code image, and acquiring a corresponding two-dimensional code base image according to the decoding result; Inputting the two-dimensional code base image and the first two-dimensional code image into an image comparison model to obtain a code element similarity of each code element output by the image comparison model; Determine the codewords whose codeword similarity is less than the similarity threshold as dissimilar codewords; Calculate the area ratio of dissimilar code elements in the image; When the area proportion is less than the proportion threshold, it is determined that the first two-dimensional code image passes the anti-copying verification.

10. The method according to claim 8, wherein the process of performing reflective verification based on the first two-dimensional code image and the second two-dimensional code image comprises: Decoding the first two-dimensional code image, and acquiring a corresponding reflective base map according to the decoding result; Comparing the first two-dimensional code image with the second two-dimensional code image to obtain a reflective image; Determining whether the reflective image matches the reflective base map; When the reflective image matches the reflective base map, it is determined that the reflective verification is passed.

11. A washing label, comprising: Basal layer; A hot-melt reflective layer, which is located on the base layer and reflects light when exposed to light; A carbon ribbon layer, the carbon ribbon layer is located on the hot-melt reflective layer, and ink is transferred to the hot-melt reflective layer by thermal transfer printing technology to form a two-dimensional code; Wherein, the washing label is verified by the method described in any one of claims 8 to 10, and the area of ​​the carbon ribbon layer not covered by the hot-melt reflective layer will reflect light when exposed to light, so as to be used for the reflective verification in the washing label verification process.

12. The washing label according to claim 11, The carbon ribbon layer is embedded with graphics for use in the anti-copying verification during the washing label verification process.

13. An electronic device comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 10 by executing the executable instructions.

14. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.

15. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.