A cellular code recognition method, device, equipment and storage medium
By setting locators in the cellular code to form a Cartesian coordinate system and using vectors to represent the cellular pixel coordinates, the problem of inaccurate cellular code information reading is solved, and efficient and accurate cellular code reading is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAOMING OPTOELECTRONICS TECH
- Filing Date
- 2026-01-27
- Publication Date
- 2026-04-24
AI Technical Summary
Traditional QR code reading methods cannot be directly applied to cellular codes, resulting in inaccurate information reading from cellular codes.
By setting specific locators in the cellular code to construct a Cartesian coordinate system, and using the vector representation of cellular pixels in the Cartesian coordinate system, efficient and accurate reading of the cellular code can be achieved.
It achieves efficient and accurate reading of cellular codes, and can identify cellular code information after flipping, blurring, tilting, and stretching.
Smart Images

Figure CN121615669B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to a cellular code reading method, apparatus, device, and storage medium. Background Technology
[0002] Image encoding technology is a technique that converts raw digital signals into image signals that are easy for cameras to recognize. This technology can store information on images, and its recognition is fast, accurate, and efficient. With the widespread use of smartphones, image encoding technology has been widely applied in people's daily lives, such as barcodes on goods and QR codes for quick payments.
[0003] Research shows that retroreflective structures can generate hexagonal array patterns resembling honeycomb structures. The principle is to control the microscopic surface at a specific location within the retroreflective structure (retroreflection, also known as retrograde reflection, is a type of reflection where reflected light returns from near the direction of the incident light), reflecting the reflected light from that area beyond the receiving surface to form a light spot. By altering the microscopic surface structure of the retroreflective structure, differences in brightness and darkness can be created in the light spot. Furthermore, through iterative algorithms, a hexagonal pixel array pattern similar to a honeycomb can be formed, referred to as a cellular code. Due to its unique geometric characteristics and advantages, the cellular code demonstrates value in image encoding, exhibiting characteristics such as high space utilization, good symmetry, and excellent visual effects.
[0004] However, cellular codes contain image information, which is an analog signal based on visible light, not a digital signal adapted to computers. Traditional QR codes, on the other hand, are based on rectangular pixel structures, whose topological symmetry is clearly different from cellular codes and has no connection to optical structures. Therefore, traditional QR code reading methods cannot be directly applied to cellular codes. Thus, a specialized method for reading cellular codes is needed to accurately extract information from them. Summary of the Invention
[0005] In view of this, the present invention provides a cellular code reading method, apparatus, device and storage medium to optimize the reading efficiency and accuracy of cellular codes.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A cellular code reading method, comprising:
[0008] S101, Read the image to be read containing the cellular code; wherein, the cellular code in the image to be read is encoded with at least three locators located at different positions, the positions of the at least three locators establish a first Cartesian coordinate system and a first basis vector, and the first vector coordinate of each cellular pixel of the cellular code in the first Cartesian coordinate system is represented by the first basis vector.
[0009] S102, Obtain the location information of multiple locators contained in the cellular code;
[0010] S103, establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system;
[0011] S104, read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be identified based on the binary information.
[0012] Preferably, it further includes:
[0013] Encode the cellular code; where:
[0014] During encoding, the locator located in the upper left corner of the cell code is used as the first locator, the locator located in the upper right corner of the cell code is used as the second locator, and the locator located in the lower right corner of the cell code is used as the third locator.
[0015] A first Cartesian coordinate system is established with the center of the center cell pixel of the second locator as the origin. The first axis of the first Cartesian coordinate system points to the center of the center cell pixel of the first locator, and the second axis of the first Cartesian coordinate system points to the center of the center cell pixel of the third locator.
[0016] Assume there is a relationship between the center cellular pixel of the first locator and the center cellular pixel of the second locator. In column cell pixels, there is an odd number of rows between the center cell pixel of the second locator and the center cell pixel of the third locator. Row cellular pixels, the radius of the outer circle of the cellular pixel is Then the first basis vector is expressed as , ;
[0017] by and The coefficients are obtained by calculating the parameter expression of the center of each cell pixel of the cellular code relative to the origin of the base. and This allows us to obtain the first vector coordinates of each cell pixel in the first Cartesian coordinate system. .
[0018] Preferably, in step S102, the locator of the cellular code is used as the convolution kernel to perform convolution operation on the image to be identified in order to obtain the position information of multiple locators.
[0019] Preferably, the convolution kernels are configured in multiple ways according to different rotation angles and resolutions.
[0020] Preferably, step S103 specifically includes:
[0021] The center pixels of the three locators obtained by connection and identification form a triangle;
[0022] Let the locator corresponding to the vertex with the largest interior angle be the second locator. Starting from the center pixel of the center cell pixel of the second locator, two vectors are formed pointing to the center pixels of the center cell pixels of the other two locators. , ;
[0023] calculate and According to the cross product rule, if the result of the cross product is greater than 0, then... The corresponding anchor is the first anchor; if the result is less than 0, then The corresponding locator is the first locator;
[0024] A second Cartesian coordinate system is established with the center pixel of the center cell pixel of the second locator as the origin. The second basis vector is calculated based on the coordinates of the center pixel of the center cell pixel of the locator. , In the second Cartesian coordinate system, the second vector coordinate of the center pixel of each cellular pixel is expressed as: .
[0025] Preferably, in step S104,
[0026] The binary information of a cell pixel is obtained by reading the average grayscale value of the cell pixels near each cell pixel in the second Cartesian coordinate system.
[0027] Preferably, step S104 specifically includes:
[0028] The location is determined to match the preset information based on the binary information of the cellular pixels read from the location; wherein the location is non-horizontally flipped symmetrical.
[0029] If a match is found, the information contained in the cellular code is obtained based on the binary information;
[0030] If there is no match, the image to be identified is flipped and then re-identified.
[0031] This invention also provides a cellular code reader, which includes:
[0032] The image reading unit is used to read an image containing a cellular code; wherein the cellular code in the image to be read is encoded with at least three locators located at different positions, the positions of the at least three locators establish a first Cartesian coordinate system and a first basis vector, and the first vector coordinate of each cellular pixel of the cellular code in the first Cartesian coordinate system is represented by the first basis vector.
[0033] A locator identification unit is used to obtain the location information of multiple locators contained in the cellular code;
[0034] The coordinate calculation unit is used to establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and to calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system.
[0035] The binary information reading unit is used to read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be read based on the binary information.
[0036] This invention also provides a cellular code reading device, which includes a memory and a processor. The memory stores a computer program that can be executed by the processor to implement the cellular code reading method described above.
[0037] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the cellular code reading method described above.
[0038] In summary, this embodiment constructs a Cartesian coordinate system by setting specific locators in the cellular code, and then performs vector representation of the coordinates of the cellular pixels according to the Cartesian coordinate system, thereby achieving efficient and accurate reading of the cellular code. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the cellular code reading method provided in the first embodiment of the present invention;
[0040] Figure 2 A schematic diagram illustrating the addition of locators during the encoding step, provided as an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram of the outer circle of a cellular pixel and its center provided in an embodiment of the present invention;
[0042] Figure 4A schematic diagram of the first Cartesian coordinate system provided for an embodiment of the present invention;
[0043] Figure 5 This is a schematic diagram illustrating the construction of a second Cartesian coordinate system on an image to be identified, provided by an embodiment of the present invention.
[0044] Figure 6 This is a schematic diagram of the cellular code reading device provided in the second embodiment of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] Please see Figure 1 The first embodiment of the present invention provides a cellular code reading method, which can be executed by a cellular code reading device (hereinafter referred to as the reading device), specifically, by one or more processors within the reading device, to achieve the following steps:
[0047] S101, Read the image to be identified containing the cellular code; wherein, the cellular code in the image to be identified is encoded with at least three locators located at different positions, the positions of the at least three locators establish a first Cartesian coordinate system and a first basis vector, and the first vector coordinate of each cellular pixel of the cellular code in the first Cartesian coordinate system is represented by the first basis vector.
[0048] In this embodiment, the reading device can be various terminal devices, such as smartphones, tablets, etc. In particular, the reading device has an image scanning function, which can scan the image to be read containing the cellular code to read the image.
[0049] In this embodiment, at least three locators need to be added during cellular code encoding, and the locators are distinguished based on their location. See [link to documentation]. Figure 2 Taking three locators as an example, the locator located in the upper left corner of the cell code is defined as the first locator, the locator located in the upper right corner of the cell code is defined as the second locator, and the locator located in the lower right corner of the cell code is defined as the third locator.
[0050] It should be noted that during encoding, the cellular code can be a vector graphic, meaning it will not lose quality when enlarged. Clearly, the locator is composed of several cellular pixels, each of which is a polygon, such as a hexagon. However, when interpreting an input image, the image to be interpreted is a bitmap, composed of several pixels. Therefore, cellular pixels and pixels are two different concepts; in a bitmap, one cellular pixel is typically composed of multiple pixels.
[0051] It should be noted that each cellular pixel in this embodiment is a regular hexagon, and therefore has a circumcircle center, such as... Figure 3 As shown, the center of the cellular pixel is the center of the circumcircle of the regular hexagon, and its size is the radius of the circumcircle. However, in some other embodiments, the cellular pixel may not be a regular hexagon. In this case, the center and size need to be determined according to its specific shape. These solutions are all within the protection scope of this invention. For ease of explanation, the following will use a regular hexagon as an example.
[0052] In this embodiment, after distinguishing the locators, a first Cartesian coordinate system is established with the center of the outer circle of the central cell pixel of the second locator as the origin. The first axis points to the center of the outer circle of the central cell pixel of the first locator, and the second axis points to the center of the outer circle of the central cell pixel of the third locator. Figure 4 As shown.
[0053] Then, calculate the first basis vector. , Assume there is a relationship between the center cell pixel of the first locator and the center cell pixel of the second locator. There is a cell pixel in the column, and there is a cell pixel at the center of the second locator and the cell pixel at the center of the third locator. (here) The number is odd, defined during the generation of the cellular code image; that is, the design of the cellular code itself defines the number of pixels between two locators as odd (number of rows of cellular pixels), and the radius of the outer circle of the cellular pixel is... ,but , In this embodiment, , However, it is not limited to this.
[0054] Finally, with and The coefficients are obtained by calculating the parameter expression of the circumcenter of each cell pixel of the cellular code relative to the origin. and Then, the coordinates of the center of the circumcircle of each cellular pixel in the first Cartesian coordinate system can be expressed as: .
[0055] In this embodiment, vector operations are based on the vector decomposition formula of affine space, where a vector can be expressed by two non-parallel basis vectors. This is because the formula... Since both are known, A and B can be deduced from them.
[0056] In this embodiment, since the vector representation method is faster for computation and is not affected by image tilting or stretching, more accurate identification of cellular codes can be achieved.
[0057] S102, obtain the location information of multiple locators contained in the cellular code.
[0058] In this embodiment, the location information of the multiple locators contained in the cellular code can be obtained in various ways, such as through image recognition or matching technology.
[0059] Specifically, the locator of the cellular code is used as the convolution kernel to perform convolution operation on the image to be identified in order to obtain the position information of multiple locators.
[0060] In this embodiment, as Figure 4 As shown, a locator consists of 19 cellular pixels. Figure 4 In the image, a black hexagon or a white hexagon represents a honeycomb pixel. In the image to be identified, a honeycomb pixel is composed of multiple pixels.
[0061] During convolution, a pre-stored locator image is used as the convolution kernel, which is then moved over the image to be identified. During the movement, the locator image is convolved with the area of the currently covered image to be identified to obtain the convolution result. The convolution result is used to determine the area that is the same as or similar to the locator image. When the same or similar area is found, the specific location can be marked, that is, the location information of the locator on the image to be identified.
[0062] In addition, specifically considering that the image to be identified may have different rotation angles and resolutions, the convolution kernel is set in multiple ways according to different rotation angles and resolutions to improve the accuracy and precision of recognition.
[0063] S103, establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system.
[0064] Specifically, when reading cellular codes, locators are distinguished as follows: A triangle is formed by connecting the center pixels of the three locators' center cellular pixels. The locator corresponding to the vertex with the largest interior angle is designated as the second locator. Two vectors are formed, starting from the center pixel of the second locator's center cellular pixel and pointing towards the center pixels of the other two locators' center cellular pixels. , ,calculate and According to the cross product rule, if the result of the cross product is greater than 0, then... The corresponding anchor is the first anchor; if the result is less than 0, then The corresponding locator is the first locator.
[0065] Next, a second Cartesian coordinate system is established on the image to be identified, using the center pixel coordinates of the center cell pixel of the locator corresponding to the vertex with the largest interior angle as the origin, such as... Figure 5 As shown.
[0066] Next, calculate the second basis vector. , ,at this time , Using the image's pixel coordinates as a reference, Starting from the origin of the second Cartesian coordinate system, the endpoint is the center pixel coordinates of the central cell pixel of the first locator. Starting from the origin of the second Cartesian coordinate system and ending at the center pixel coordinates of the central cell pixel of the third locator, the coordinates of the circumscribed circle center of each cell pixel in the second Cartesian coordinate system can then be expressed as: .
[0067] The reason for using two coordinate systems in this embodiment is as follows:
[0068] When designing cellular codes, the image of the cellular code, expressed using mathematical formulas in a computer, is an ideal image, highly accurate as a vector representation. However, in actual detection, the image to be identified is a bitmap, which can only be processed pixel by pixel. The first Cartesian coordinate system is for the vector image generated during design, while the second Cartesian coordinate system is for pixel processing during detection. It can be said that the parameters of the first Cartesian coordinate system are precise and conform to the ideal cellular code, but the parameters of the second Cartesian coordinate system need to be transformed accordingly based on the flipping and stretching of the image to be identified.
[0069] One of the key purposes of establishing the first Cartesian coordinate system is to calculate coefficients A and B, which together describe the relative positional relationship between each cell pixel in the cellular code and the locator. During detection, the relative positions of each cell pixel in the image to be identified and the locator must be derived in reverse based on coefficients A and B.
[0070] In other words, the representation of each cell pixel in the second Cartesian coordinate system depends on two parts: the second basis vector and the coefficients A and B. Coefficients A and B are calculated and determined during the design phase from the first Cartesian coordinate system, while the second basis vector and the second vector coordinates need to be obtained by constructing the second Cartesian coordinate system.
[0071] S104, read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be identified based on the binary information.
[0072] In this embodiment, let Let the grayscale matrix of the input image be... Then the grayscale value of the center pixel coordinate of each cellular pixel can be expressed as: ,in This represents the rounding function. To improve recognition accuracy, the average gray value of adjacent pixels can be taken as the gray value represented by the cell pixel.
[0073] In this embodiment, a threshold can be set according to the actual situation. That is, when the gray value of a cellular pixel is greater than a certain value, the cellular pixel represents binary information "1", and vice versa.
[0074] In this embodiment, after reading the binary information of the cellular pixels in the locator, it is necessary to further determine whether the locator matches the preset information.
[0075] In this embodiment, the preset information is mainly used to determine whether the locator has been flipped. Since the locator in this embodiment is not horizontally flipped symmetrically, the preset information can be used to determine whether the image to be read has been flipped. For example... Figure 4 As shown, when no flip occurs, the locator has a white notch facing the negative x-axis, so the default information is that the notch faces the negative x-axis.
[0076] If a match is found, the information contained in the cellular code is obtained based on the binary information;
[0077] If there is no match, the image to be identified is flipped and then re-identified, i.e., the process returns to step S101.
[0078] In summary, this embodiment constructs a Cartesian coordinate system by setting specific locators in the cellular code, and then performs vector representation of the cellular pixels according to the coordinate system, thereby accurately obtaining the coordinates of each cellular pixel and achieving efficient and accurate reading of the cellular code.
[0079] Moreover, it can read cellular code information after it has been flipped, blurred, tilted, or stretched.
[0080] Specifically, for the image to be read after tilting and stretching, since this application represents the cellular pixels in a vector representation manner, the vectors also tilt or stretch after tilting or stretching, which keeps the vector representation of the cellular pixels unchanged and therefore does not affect the final representation structure.
[0081] For blurry images to be identified, since this embodiment determines the binary information corresponding to each cell pixel by the grayscale of the cell pixels near each cell pixel, the partial blurring will not have a significant impact on the final representation result.
[0082] For the image to be read that has been flipped, since the locator in this embodiment is not horizontally flipped symmetrically, the locator identified after the flip is generated is inconsistent with the locator without flipping, so it can be determined whether a flip has occurred.
[0083] Please see Figure 6 The second embodiment of the present invention also provides a cellular code reading device, which includes:
[0084] Image reading unit 210 is used to read an image to be read containing a cellular code; wherein, the cellular code in the image to be read is encoded with at least three locators located at different positions, the positions of the at least three locators establish a first Cartesian coordinate system and a first basis vector, and the first vector coordinate of each cellular pixel of the cellular code in the first Cartesian coordinate system is represented by the first basis vector.
[0085] The locator identification unit 220 is used to obtain the location information of multiple locators contained in the cellular code;
[0086] The coordinate calculation unit 230 is used to establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and to calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system.
[0087] The binary information reading unit 240 is used to read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be read based on the binary information.
[0088] The third embodiment of the present invention also provides a cellular code reading device, which includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the cellular code reading method described above.
[0089] The fourth embodiment of the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the cellular code reading method described above.
[0090] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0091] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0092] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0093] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for reading cellular codes, characterized in that, include: S101, Read the image to be read containing the cellular code; wherein, the cellular code in the image to be read is encoded with at least three locators located at different positions, the positions of the at least three locators establish a first Cartesian coordinate system and a first basis vector, and the first vector coordinate of each cellular pixel of the cellular code in the first Cartesian coordinate system is represented by the first basis vector; wherein, when encoding the cellular code, the locator located at the upper left corner of the cellular code is used as the first locator, the locator located at the upper right corner of the cellular code is used as the second locator, and the locator located at the lower right corner of the cellular code is used as the third locator; the first Cartesian coordinate system is established with the center of the center cellular pixel of the second locator as the origin, the first axis of the first Cartesian coordinate system points to the center of the center cellular pixel of the first locator, and the second axis of the first Cartesian coordinate system points to the center of the center cellular pixel of the third locator; assuming there is a distance between the center cellular pixel of the first locator and the center cellular pixel of the second locator. In column cell pixels, there is an odd number of rows between the center cell pixel of the second locator and the center cell pixel of the third locator. Row cellular pixels, the radius of the outer circle of the cellular pixel is Then the first basis vector is expressed as , ;by and The coefficients are obtained by calculating the parameter expression of the center of each cell pixel of the cellular code relative to the origin of the base. and This allows us to obtain the first vector coordinates of each cell pixel in the first Cartesian coordinate system. ; S102, Obtain the location information of multiple locators contained in the cellular code; S103, establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system; specifically, this includes: connecting the center pixels of the center cell pixels of the three identified locators to form a triangle; assuming the locator corresponding to the vertex with the largest interior angle is the second locator, and using the center pixel of the center cell pixel of the second locator as the starting point to point to the center pixels of the center cell pixels of the other two locators to form two vectors. , ;calculate and According to the cross product rule, if the result of the cross product is greater than 0, then... The corresponding anchor is the first anchor; if the result is less than 0, then The corresponding locator is the first locator; a second Cartesian coordinate system is established with the center pixel of the center cell pixel of the second locator as the origin, and the second basis vector is calculated based on the coordinates of the center pixel of the center cell pixel of the locator. , In the second Cartesian coordinate system, the second vector coordinate of the center pixel of each cellular pixel is expressed as: ; S104, read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be identified based on the binary information.
2. The cellular code reading method according to claim 1, characterized in that, In step S102, the locator of the cellular code is used as the convolution kernel to perform convolution operation on the image to be identified in order to obtain the position information of multiple locators.
3. The cellular code reading method according to claim 2, characterized in that, The convolution kernel is configured with multiple kernels depending on the rotation angle and resolution.
4. The cellular code reading method according to claim 1, characterized in that, In step S104, The binary information of a cell pixel is obtained by reading the average grayscale value of the cell pixels near each cell pixel in the second Cartesian coordinate system.
5. The cellular code reading method according to claim 1, characterized in that, Step S104 specifically includes: The binary information of the cellular pixels in the locator is read to determine whether the locator matches the preset information; wherein, the locator is non-horizontally flipped and symmetrical; the preset information is used to determine whether the image to be identified has been flipped; If a match is found, the information contained in the cellular code is obtained based on the binary information; If there is no match, the image to be identified is flipped and then re-identified.
6. A cellular code reading device, characterized in that, include: An image reading unit is used to read an image containing a cellular code. The cellular code in the image is encoded with at least three locators located at different positions. The positions of these three locators establish a first Cartesian coordinate system and a first basis vector. The first vector coordinate of each cellular pixel in the first Cartesian coordinate system is represented by the first basis vector. When encoding the cellular code, the locator at the upper left corner is used as the first locator, the locator at the upper right corner as the second locator, and the locator at the lower right corner as the third locator. A first Cartesian coordinate system is established with the center of the center cellular pixel of the second locator as the origin. The first axis of the first Cartesian coordinate system points to the center of the center cellular pixel of the first locator, and the second axis points to the center of the center cellular pixel of the third locator. It is assumed that there exists a distance between the center cellular pixel of the first locator and the center cellular pixel of the second locator. In column cell pixels, there is an odd number of rows between the center cell pixel of the second locator and the center cell pixel of the third locator. Row cellular pixels, the radius of the outer circle of the cellular pixel is Then the first basis vector is expressed as , ;by and The coefficients are obtained by calculating the parameter expression of the center of each cell pixel of the cellular code relative to the origin of the base. and This allows us to obtain the first vector coordinates of each cell pixel in the first Cartesian coordinate system. ; A locator identification unit is used to obtain the location information of multiple locators contained in the cellular code; The coordinate calculation unit is used to establish a second Cartesian coordinate system and generate a second basis vector based on the position information of multiple locators, and to calculate the second vector coordinate of each cell pixel in the second Cartesian coordinate system using the first vector coordinate of each cell pixel in the first Cartesian coordinate system. Specifically, the coordinate calculation unit includes: connecting the center pixels of the center cell pixels of the three identified locators to form a triangle; designating the locator corresponding to the vertex with the largest interior angle as the second locator; and using the center pixel of the center cell pixel of the second locator as the starting point to point to the center pixels of the center cell pixels of the other two locators to form two vectors. , ;calculate and According to the cross product rule, if the result of the cross product is greater than 0, then... The corresponding anchor is the first anchor; if the result is less than 0, then The corresponding locator is the first locator; a second Cartesian coordinate system is established with the center pixel of the center cell pixel of the second locator as the origin, and the second basis vector is calculated based on the coordinates of the center pixel of the center cell pixel of the locator. , In the second Cartesian coordinate system, the second vector coordinate of the center pixel of each cellular pixel is expressed as: ; The binary information reading unit is used to read the grayscale of the cell pixels near each cell pixel in the second Cartesian coordinate system according to the second vector coordinates to determine the binary information corresponding to the cell pixel, so as to obtain the information contained in the image to be read based on the binary information.
7. A cellular code reading device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can be executed by the processor to implement the cellular code reading method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the cellular code reading method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
QR code recognition method and device
CN110543798A
Information processing method and system based on cellular pixel structure
CN120409522A