Object identifier image, decoding method and electronic equipment
By setting horizontally and vertically arranged code point regions and perspective transformation matrix correction in the object identifier image, the problems of low decoding efficiency and high error rate are solved, and efficient and accurate decoding effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN HUIJIETONG TECH CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies have low decoding efficiency and high error rate for object identifiers, making it difficult to accurately identify location points and data points in distorted environments.
Design an object identifier image that uses horizontally and vertically arranged code point regions. Each code point region contains m columns and n rows of code point units. Each unit has one data point and multiple positioning points. The size of the positioning points is different from that of the data points. m and n are positive integers greater than or equal to 4. The image is corrected by optical reading and perspective transformation matrix.
It increases information density, enabling rapid and accurate identification of positioning points and segmentation code point regions, and enhances image correction capabilities, thereby improving decoding efficiency and accuracy.
Smart Images

Figure CN121920402A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of object identifier technology, and in particular to an object identifier image, decoding method, and electronic device. Background Technology
[0002] Object identifiers (OIDs) are typically used to carry and transmit data information. They can be printed on the surface of goods, packaging, and printed materials. They are usually identified by close-up photography using scanning or point-and-read devices equipped with macro lenses, which extract information such as the item's serial number to facilitate information transmission.
[0003] However, in related technologies, due to issues such as the decoding environment, object identifiers suffer from low decoding efficiency and high error rate.
[0004] Therefore, how to design an object identifier image that can improve decoding efficiency and accuracy has become an urgent problem to be solved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an object identifier image, a decoding method, and an electronic device that can improve decoding efficiency and accuracy.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: An object identifier image, comprising at least one code point region arranged horizontally and vertically; Each of the code point regions is provided with m columns and n rows of code point units; Each code point unit has one data point, and each code point region has multiple positioning points; The positioning points are used to locate and correct the data points, and the data points are used to characterize the data. The size of the positioning point is different from the size of the data point; The m and n are positive integers greater than or equal to 4.
[0007] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A method for decoding an object identifier image, comprising: Optical reading of the object identifier image is used to obtain an image containing the object identifier image, thereby extracting data corresponding to the object identifier image.
[0008] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for decoding an object identifier image.
[0009] The beneficial effects of this invention are as follows: In each code point region, there are m columns and n rows of code point units, each code point unit has one data point, and each code point region has multiple positioning points. The size of the positioning points is different from the size of the data points, where m and n are positive integers greater than or equal to 4. By having m columns and n rows of code point units in each code point region, each code point unit has one data point, and each code point region has multiple positioning points, the information density is higher. Furthermore, since the size of the positioning points is different from the size of the data points, the positioning points can be identified more quickly, allowing for more accurate segmentation of each code point region in subsequent decoding, and facilitating accurate image correction, thereby improving decoding efficiency and accuracy. Attached Figure Description
[0010] Figure 1 This is a preset object identifier principle image in an object identifier image according to an embodiment of the present invention; Figure 2 This is an object identifier image after encoding, as shown in an embodiment of the present invention. Figure 3 This refers to a distorted object identifier image in a decoding method for an object identifier image according to an embodiment of the present invention. Figure 4 This refers to the corrected object identifier image in a decoding method for an object identifier image according to an embodiment of the present invention. Figure 5 This is a flowchart illustrating the decoding process of an object identifier image decoding method according to an embodiment of the present invention. Figure 6 This is a flowchart illustrating the correction process in a decoding method for an object identifier image according to an embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention; Label Explanation: 1. Code dot area; 11. Code dot unit; 12. Data point; 13. Positioning point. Detailed Implementation
[0011] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0012] Because the code dots in an object identifier image are very small and dense, when printed as a block of code dots, they appear as a gray shadow image, having little impact on the product's appearance. Sometimes, they can be used as a background layer for packaging, offering advantages such as strong security and privacy, and wide applicability.
[0013] In related technologies, object identifiers suffer from low decoding efficiency and high error rates due to issues such as the decoding environment. Specifically, decoding efficiency and accuracy must be prioritized for object identifier images. During the decoding process, it is usually necessary to first find positioning points to help determine the encoding region before further decoding data points. Therefore, accurate positioning of these points is crucial to ensuring decoding accuracy. However, in practical applications, cameras are often not perpendicular to the object identifier image, and may even be at a significant tilt angle. This causes distortion in the position of the code points captured by the camera. In distorted images, the relative displacement, spacing, and perpendicularity of positioning points also change, making it difficult to directly determine the positioning points, affecting the success rate of decoding, and easily leading to errors.
[0014] To solve the above problems, please refer to Figure 1 This application discloses an object identifier image, including at least one code point region arranged horizontally and vertically; Each code point region contains m columns and n rows of code point units; Each code point unit has one data point, and each code point area has multiple positioning points; Locating points are used to locate and correct data points, while data points are used to represent data. The dimensions of the positioning points are different from the dimensions of the data points; m and n are positive integers greater than or equal to 4.
[0015] As can be seen from the above description, the beneficial effects of the present invention are as follows: In each code point region, there are m columns and n rows of code point units, each code point unit has one data point, and each code point region has multiple positioning points. The size of the positioning points is different from the size of the data points, where m and n are positive integers greater than or equal to 4. By having m columns and n rows of code point units in each code point region, each code point unit has one data point, and each code point region has multiple positioning points, the information density is higher. Furthermore, since the size of the positioning points is different from the size of the data points, the positioning points can be identified more quickly, and each code point region can be segmented more accurately in subsequent decoding. This also facilitates accurate image correction, thereby improving decoding efficiency and accuracy.
[0016] In one embodiment of this application, the plurality of positioning points includes a first positioning point, a second positioning point, and a third positioning point; There are multiple first positioning points, each located in one of the m code point units in the first row, and the multiple first positioning points are connected in a straight line; There is at least one second positioning point, located in one of the m code point units in the second row; There is at least one third positioning point, located in the m code point units of the (n-1)th row.
[0017] As described above, multiple first positioning points are connected in a straight line, at least one second positioning point is located in the m code point units of the second row, and at least one third positioning point is located in the m code point units of the (n-1)th row. The setting of the first, second, and third positioning points can facilitate the rapid segmentation of different code point regions and improve decoding efficiency.
[0018] In one embodiment of this application, the first positioning point is located at the center of the m code point units in the first row, the second positioning point is located at the center of the m code point units in the second row, and the third positioning point is located at the center of the m code point units in the (n-1)th row.
[0019] As can be seen from the above description, the positioning point is located at the center of the code dot unit, which is more conducive to distinguishing the positive direction of the code dot region.
[0020] In one embodiment of this application, the first positioning points are respectively located in the code point units of the first row and the first three columns; The second positioning point is located in the code point unit of the second row and first column; The third positioning point is located in the code point cell of the (n-1)th row and the mth column.
[0021] As described above, the first positioning point is located in the code point unit of the first row and the first three columns, the second positioning point is located in the code point unit of the first column of the second row, and the third positioning point is located in the code point unit of the (n-1)th row and the mth column. The quadrilateral formed by these five positioning points can more effectively perform image correction during subsequent decoding, thereby improving the decoding accuracy.
[0022] In one embodiment of this application, the area of the positioning point is four times the area of the data point.
[0023] As described above, the area of the positioning point is four times the area of the data point, which ensures that the positioning point has stronger anti-interference ability and is not easily lost due to poor imaging quality, further improving the efficiency of positioning point recognition, thereby improving decoding efficiency.
[0024] Another embodiment of the present invention provides a method for decoding an object identifier image, comprising: The object identifier image is optically read to obtain an image containing the object identifier image, and the data corresponding to the object identifier image is extracted.
[0025] As described above, the information density in the object identifier image is higher, and the setting of the positioning points can facilitate the segmentation of each code point region and accurately determine the positive direction of the code point region, thereby improving the decoding efficiency when reading the image optically.
[0026] In one embodiment of this application, retrieving data from the image corresponding to the object identifier includes: Calculate the area of all code points in the object identifier image and determine the coordinates of all code points; According to the preset data point and positioning point size rules, the positioning points and data points are determined from all code points based on the area; Based on the coordinates of all positioning points, the first positioning line is determined from all positioning points according to the collinearity theorem, and the positioning points on the first positioning line are determined as the first positioning points. The positioning point adjacent to the first positioning point is determined as the second positioning point; All positioning points other than the first and second positioning points are designated as the third positioning point. The coordinates of all code points are corrected based on the first positioning point, the second positioning point, and the third positioning point to obtain the corrected coordinates of all code points. Based on the coordinates of all corrected code points and the principle image of the preset object identifier, determine all code point regions and all code point units in each code point region. A virtual coordinate system is established with the center of each code point unit as the origin; The data represented by each data point is determined based on the position of the data point in the corresponding virtual coordinate system. The positive direction of the code point region is determined based on the positioning point, and the data represented by the data points are sorted according to the positive direction to obtain the complete data of the code point region.
[0027] As described above, the positioning points and data points are first determined from all code points according to the area based on the preset data point and positioning point size rules. Even if the image is distorted, the distinction between positioning points and data points is achieved more simply and efficiently. The coordinates of all code points are corrected based on the first, second, and third positioning points. After correction, data recognition is performed. Even when the image is distorted, decoding can be completed quickly and accurately, thereby improving the efficiency and accuracy of decoding.
[0028] In one embodiment of this application, calculating the area of all code points in the object identifier image and determining the coordinates of all code points includes: Binarize the object identifier image to obtain a binary image; Calculate the area of all code points in the binarized image and determine the coordinates of all code points.
[0029] As described above, binarizing the object identifier image can reduce the amount of data, enhance contrast, and remove noise from the image, which helps improve the accuracy of decoding.
[0030] In one embodiment of this application, the coordinates of all code points are corrected based on the first positioning point, the second positioning point, and the third positioning point, resulting in the corrected coordinates of all code points, including: The coordinates of the first positioning point, the second positioning point, and the third positioning point are used as the reference coordinates, and the coordinates of the first positioning point, the second positioning point, and the third positioning point in the preset object identifier principle image are used as the target coordinates. Solve for the perspective transformation matrix based on the reference coordinates and the target coordinates; The coordinates of all code points are transformed using a perspective transformation matrix to obtain the corrected coordinates of all code points.
[0031] As described above, the perspective transformation matrix is solved based on the preset object identifier principle image and the first, second, and third positioning points. The perspective transformation matrix is then used to perform perspective transformation on the coordinates of all code points, achieving more reliable and effective code point position correction and ensuring the accuracy of decoding.
[0032] As shown in the figure, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements each step of the above-described method for decoding object identifier images.
[0033] The object identifier image, decoding method, and electronic device described above are applicable to OID code application scenarios, and are illustrated below through specific embodiments: Please refer to Figure 1 and Figure 2 Embodiment 1 of the present invention is as follows: An object identifier image includes at least one code point region 1 arranged horizontally and vertically; each code point region 1 has code point units 11 arranged in m columns and n rows; each code point unit 11 has one data point 12, and each code point region 1 has multiple positioning points 13; the positioning points 13 are used to find and correct data points, and the data points 12 are used to represent data; the size of the positioning points 13 is different from the size of the data points 12; m and n are positive integers greater than or equal to 4, such as... Figure 1 As shown.
[0034] In one optional implementation, the plurality of positioning points 13 include a first positioning point, a second positioning point, and a third positioning point; there are multiple first positioning points, which are respectively located in the m code point units 11 of the first row, and the plurality of first positioning points are connected in a straight line; there is at least one second positioning point, which is located in the m code point units 11 of the second row; there is at least one third positioning point, which is located in the m code point units 11 of the (n-1)th row.
[0035] Specifically, the first positioning point is located at the center of the m code point units 11 in the first row, the second positioning point is located at the center of the m code point units 11 in the second row, and the third positioning point is located at the center of the m code point units 11 in the (n-1)th row, as follows. Figure 1 As shown.
[0036] In one alternative implementation, such as Figure 1 As shown, the first positioning point is located in the code point unit 11 of the first row and the first three columns; the second positioning point is located in the code point unit 11 of the second row and the first column; and the third positioning point is located in the code point unit 11 of the (n-1)th row and the mth column. That is, the number of the first positioning point is 3, the number of the second positioning point is 1, and the number of the third positioning point is 1, for a total of 5 positioning points, forming a convex quadrilateral. In subsequent decoding, this can efficiently correct distorted object identifier images and improve the accuracy and efficiency of decoding.
[0037] In this application, m and n are positive integers greater than or equal to 4 primarily to facilitate the differentiation of positioning point directions. In this application, there are three first positioning points, so m must be at least three. Furthermore, to facilitate the segmentation of the upper right corner of the code point region, the fourth point in the first row of the code point region is left empty. This makes it easier to locate the upper right corner, especially in cases of image rotation or tilt. Following the first positioning line (composed of three first positioning points), when an empty space is detected, the next first positioning point of the code point region is detected, allowing for rapid positioning of the upper right corner. Therefore, m needs to be greater than or equal to 4. The first positioning line occupies one row, the second positioning point occupies one row, and the third positioning point occupies one row. At least one more empty row is needed to ensure that there is at least one row's distance between the third positioning point and the first positioning line of the next code point unit, guaranteeing accurate positioning of the third positioning point. Therefore, n also needs to be greater than or equal to 4. Thus, by setting m and n to be greater than or equal to 4 and correspondingly setting the first, second, and third positioning points, this application can better locate relevant positions during decoding, improving decoding accuracy and efficiency.
[0038] In one optional implementation, m is 5 and n is 4; when m is 4 and n is 4, the information density of the image can be increased, thereby improving the coding efficiency, and the larger m and n are, the higher the coding efficiency.
[0039] In one alternative implementation, such as Figure 1 As shown, the area of location point 13 is four times the area of data point 12.
[0040] In one alternative implementation, such as Figure 1 As shown, data point 12 is located at the center of code point unit 11, either above, directly above, above, directly right, below, directly below, below left, or directly left. Each data point contains 3 bits of information, which can effectively represent the data and facilitate accurate identification during subsequent decoding.
[0041] It is important to note that Figure 1 The document provides all possible locations of the data points. In practical applications, such as... Figure 2 As shown, a code point unit includes only one data point, and data points at different positions represent different data. Figure 2 The arrangement of data points is given when representing the data.
[0042] In practical applications, data points at different locations represent different data values. During encoding, the location of the data point can be determined based on the required data representation, and during decoding, the data representing the data can be determined based on the location of the data point. For example, Figure 1 As shown, the data point located to the upper left of the center of code point unit 11 is used to represent data 0, the data point directly above it is used to represent data 1, the data point to the upper right is used to represent data 2, the data point directly to the right is used to represent data 3, the data point to the lower right is used to represent data 4, the data point directly below it is used to represent data 5, the data point to the lower left is used to represent data 6, and the data point directly to the left is used to represent data 7. If the encoded object identifier image is as follows... Figure 2 As shown, the code point unit in the first row and first column represents the data 01201345346306701201, the code point unit in the first row and second column represents the data 20120534530670620120, and so on.
[0043] The coding efficiency metric is defined as: Information Density = Codeword Information (bits) / Number of Code Points, where the number of code points = number of data points + number of positioning points. Higher information density results in higher coding efficiency, which is more beneficial for printing costs and increases printing space utilization. When the number of positioning points is 5 and the information content of each data point is 3 bits, the information density is 3*m*n / (m*n+5). Since m and n in this invention are positive integers greater than or equal to 4, even in the smallest code point area (where m and n are both 4), the information density of this invention is 2.286 bits / code, far exceeding that of object identifier images in existing technologies. Therefore, it effectively improves coding efficiency.
[0044] Please refer to Figure 1 , Figures 3-6 Embodiment two of the present invention is as follows: A method for decoding an object identifier image, comprising: Optical reading is performed on the object identifier image as described in Embodiment 1 to obtain an image containing the object identifier image, thereby extracting data corresponding to the object identifier image.
[0045] During optical reading, the acquired image containing the object identifier is often distorted, such as... Figure 3 As shown, therefore, in the process of extracting data from the corresponding object identifier image, the image needs to be corrected to obtain the corrected image, such as... Figure 4 As shown.
[0046] Specifically, to extract data from the image corresponding to the object identifier, such as Figure 5 As shown, the steps (1) to (10) are as follows: (1) Calculate the area of all code points in the object identifier image and determine the coordinates of all code points, specifically including (1-1) to (1-2): (1-1) Binarize the object identifier image to obtain a binarized image. The object identifier image is a grayscale image with a pixel width of 8 bits.
[0047] (1-2) Calculate the area of all code points in the binarized image and determine the coordinates of all code points. These coordinates refer to pixel coordinates. For example, if the resolution of the image is 640*480, then there are 640*480 pixels. The coordinates of any point are (x, y), with x ranging from 0 to 639 and y ranging from 0 to 479.
[0048] (2) Determine the positioning point and data point from all code points according to the area based on the preset data point and positioning point size rules.
[0049] The preset data point and positioning point size rules can be determined during the encoding stage, including whether the data point size is larger than the positioning point size or vice versa.
[0050] Assuming the preset rule for the size of data points and positioning points is that the size of positioning points is greater than the size of data points, then according to this rule, each code point can be traversed based on its area. Points with an area greater than the area of adjacent code points are identified as positioning points, and points with an area less than the area of adjacent code points are identified as data points.
[0051] (3) Based on the coordinates of all the positioning points, determine the first positioning line from all the positioning points according to the collinearity theorem, and determine the positioning points on the first positioning line as the first positioning point.
[0052] (4) The positioning point adjacent to the first positioning point is determined as the second positioning point.
[0053] (5) Determine the third positioning point as the positioning point other than the first and second positioning points among all positioning points.
[0054] (6) Based on the first positioning point, the second positioning point, and the third positioning point, the coordinates of all code points are corrected to obtain the corrected coordinates of all code points, such as Figure 6 As shown, specifically including (6-1) to (6-3): (6-1) Take the coordinates of the first positioning point, the second positioning point and the third positioning point as the reference coordinates S, and take the coordinates of the first positioning point, the second positioning point and the third positioning point in the preset object identifier principle image as the target coordinates D.
[0055] The principle diagram of the preset object identifier can be as follows: Figure 1 The image shown. During encoding, the spacing between positioning points can be specified as 50 pixels. Therefore, the coordinates of the three first positioning points in the default object identifier principle image are (xoffset+0, yoffset+0), (xoffset+50, yoffset+0), and (xoffset+100, yoffset+0), the second positioning point coordinates are (xoffset+0, yoffset+50), and the third positioning point coordinates are (xoffset+(m-1)*50, yoffset+(n-2)*50). The values of xoffset and yoffset can be arbitrary. Since segmentation and decoding rely on relative positional relationships, the values of xoffset and yoffset are not limited.
[0056] (6-2) Solve for the perspective transformation matrix T based on the reference coordinates S and the target coordinates D.
[0057] (6-3) Use the perspective transformation matrix T to perform perspective transformation on the coordinates of all code points to obtain the corrected coordinates X′ of all code points.
[0058] The resolution of the preset object identifier principle image is assumed to be 640*480. The positions of the positioning points can be known based on prior knowledge; for example, the positions of the three first positioning points in the preset object identifier principle image should be (50,0), (100,0), and (150,0). Once the location of the obtained positioning point (101,201) in the distorted image is calculated, a transformation equation can be obtained. If the correspondence between the five positioning points in two images is found, there will be five transformation equations. Solving the system of equations yields the perspective transformation matrix (generally, perspective transformation can be solved with only four equations, but the more equations, the higher the accuracy). Therefore, the coordinates of all data points can be transformed using this perspective transformation matrix. Subsequently, the data representing the data points can be easily obtained in the preset object identifier principle image based on their relative positions during encoding.
[0059] (7) Determine all code point regions and all code point units in each code point region based on the coordinates of all corrected code points and the principle image of the preset object identifier.
[0060] (8) Establish virtual coordinate systems with the center of each code point unit as the origin.
[0061] (9) Determine the data represented by the data point based on the position of the data point in the corresponding virtual coordinate system in each code point unit.
[0062] (10) Determine the positive direction of the code point area based on the positioning point, and sort the data represented by the data points according to the positive direction to obtain the complete data of the code point area.
[0063] Besides segmenting code point regions, positioning points are also used for image correction. Image correction is more important than code point region segmentation during decoding, ensuring accuracy and efficiency. Image correction uses perspective transformation, which requires a quadrilateral. The goal is to determine the vertex positions of the quadrilateral from both tilted and vertical perspectives (i.e., from the pre-defined object identifier principle image). Furthermore, the correspondence between each positioning point must be known. For example, the top-left corner of the pre-defined object identifier principle image might actually be the bottom-right corner in a tilted image. Therefore, finding the position of each positioning point in the tilted image is crucial, as is clearly identifying its position. Otherwise, if positioning points are only used for code point region segmentation, finding the region is easy if the four positioning points are located at the vertices of the code point region, but it becomes impossible to determine which is the top-left, which is the bottom-right, and without this distinction, the decoded value is meaningless.
[0064] The purpose of the positioning point setting method described above in this invention is to facilitate the identification of which of these positioning points is the first positioning point, the second positioning point, and the third positioning point, thereby confirming the up, down, left, and right directions of this code point area. The first positioning line is formed by connecting three adjacent positioning points, thus confirming the direction of the code point area. However, the left and right sides of this first positioning line are determined by the second positioning point, which is adjacent to the first positioning line. Therefore, the second positioning point can also be found, and the left side of the code point area can also be determined. The distance from the third positioning point to the first positioning line of its own code point area is N-1-1=N-2 rows. However, since the code point area is laid out cyclically, the third positioning point is actually closer to the first positioning line of the code point area below its own code point area. If the third positioning point is set in the Nth row, then the distance from it to the first positioning line below it is also one row. In this way, during detection, it will be found that there is a positioning point very close to it above and below a first positioning line. Although the second and third positioning points can be distinguished from the fact that there are only 3 points on the first positioning line and the remaining positions are empty when viewed vertically, the vertical relationship between the positioning point and the positioning line no longer exists when tilted. It is difficult to distinguish whether the point adjacent to the first positioning line is the second positioning point of its own code point area or the third positioning point of the code point area above it. Therefore, the present invention sets the third positioning point in row N-1, so that it is close to the lower right corner while maintaining a certain distance from the positioning line of the code dot area below, which facilitates identification.
[0065] First, based on the area, positioning points and data points are determined from all code points according to the preset data point and positioning point size rules. Compared with the existing technology that uses the relationship between point spacing and angle to find positioning points, this invention achieves a simpler and more efficient distinction between positioning points and data points when the image is distorted. Based on the preset object identifier principle image and the first, second, and third positioning points, the perspective transformation matrix is solved. The perspective transformation matrix is used to perform perspective transformation on the coordinates of all code points, achieving more reliable and effective code point position correction. After correction, data recognition is performed. Even when the image is distorted, decoding can be completed quickly and accurately, thereby improving the efficiency and accuracy of decoding.
[0066] Please refer to Figure 7 Embodiment 3 of the present invention is as follows: An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a method for decoding an object identifier image as described in Embodiment 2.
[0067] In summary, the object identifier image, decoding method, and electronic device provided by this invention have m columns and n rows of code point units in each code point region. Each code point unit has one data point, and each code point region has multiple positioning points. The size of the positioning points is different from the size of the data points, where m and n are positive integers greater than or equal to 4. By having m columns and n rows of code point units in each code point region, each code point unit has one data point, and each code point region has multiple positioning points, the information density is higher. Furthermore, the different size of the positioning points compared to the data points allows for faster identification of the positioning points, more accurate segmentation of each code point region during subsequent decoding, and facilitates accurate image correction, thereby improving decoding efficiency and accuracy. In addition, the first positioning point is located in the first three columns of the first row of code point units, the second positioning point is located in the first column of the second row of code point units, and the third positioning point is located in the (n-1)th row and mth column of code point unit. The quadrilateral formed by these five positioning points enables more effective image correction during subsequent decoding, improving decoding accuracy. Furthermore, the area of the positioning point is four times the area of the data point, ensuring that the positioning point has stronger anti-interference ability and is not easily lost due to poor imaging quality, which further improves the efficiency of positioning point recognition, thereby improving decoding efficiency.
[0068] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An object identifier image, characterized in that, Includes at least one code point area arranged horizontally and vertically; Each of the code point regions is provided with m columns and n rows of code point units; Each code point unit has one data point, and each code point region has multiple positioning points; The positioning points are used to locate and correct the data points, and the data points are used to characterize the data. The size of the positioning point is different from the size of the data point; The m and n are positive integers greater than or equal to 4.
2. The object identifier image according to claim 1, characterized in that, The plurality of positioning points includes a first positioning point, a second positioning point, and a third positioning point; There are multiple first positioning points, each located in one of the m code point units in the first row, and the multiple first positioning points are connected in a straight line; There is at least one second positioning point, located in one of the m code point units in the second row; There is at least one third positioning point, located in one of the m code point units in the (n-1)th row.
3. An object identifier image according to claim 2, characterized in that, The first positioning point is located at the center of the m code point units in the first row, the second positioning point is located at the center of the m code point units in the second row, and the third positioning point is located at the center of the m code point units in the (n-1)th row.
4. An object identifier image according to claim 3, characterized in that, The first positioning point is located in the code point unit of the first row and the first three columns respectively; The second positioning point is located in the code point unit of the second row and first column; The third positioning point is located in the code point unit in the (n-1)th row and mth column.
5. An object identifier image according to claim 1, characterized in that, The area of the positioning point is four times the area of the data point.
6. A method for decoding an object identifier image, characterized in that, include: Optical reading of an object identifier image as described in any one of claims 1-5, to obtain an image containing the object identifier image, to extract data corresponding to the object identifier image.
7. The method for decoding an object identifier image according to claim 6, characterized in that, The step of retrieving data corresponding to the image of the object identifier includes: Calculate the area of all code points in the object identifier image and determine the coordinates of all code points; According to the preset data point and positioning point size rules, positioning points and data points are determined from all code points based on the area; Based on the coordinates of all the positioning points, the first positioning line is determined from all the positioning points according to the collinearity theorem, and the positioning points on the first positioning line are determined as the first positioning points. The positioning point adjacent to the first positioning point is determined as the second positioning point; All positioning points other than the first and second positioning points are designated as the third positioning point; The coordinates of all code points are corrected based on the first positioning point, the second positioning point and the third positioning point to obtain the corrected coordinates of all code points. Based on the coordinates of all corrected code points and the principle image of the preset object identifier, determine all code point regions and all code point units in each code point region. A virtual coordinate system is established with the center of each code point unit as the origin. The data represented by the data point is determined based on the position of the data point in the corresponding virtual coordinate system in each code point unit; The positive direction of the code point region is determined based on the positioning point, and the data represented by the data points is sorted according to the positive direction to obtain the complete data of the code point region.
8. The method for decoding an object identifier image according to claim 7, characterized in that, The calculation of the area of all code points in the object identifier image and the determination of the coordinates of all code points include: The object identifier image is binarized to obtain a binary image; Calculate the area of all code points in the binarized image and determine the coordinates of all code points.
9. The method for decoding an object identifier image according to claim 7, characterized in that, The step of correcting the coordinates of all code points based on the first positioning point, the second positioning point, and the third positioning point to obtain the corrected coordinates of all code points includes: The coordinates of the first positioning point, the second positioning point, and the third positioning point are used as reference coordinates, and the coordinates of the first positioning point, the second positioning point, and the third positioning point in the preset object identifier principle image are used as target coordinates. Solve the perspective transformation matrix based on the reference coordinates and the target coordinates; The coordinates of all code points are transformed using the perspective transformation matrix to obtain the corrected coordinates of all code points.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the method for decoding an object identifier image as described in any one of claims 6-9.