Method and apparatus for identifying an identification code

By identifying the pixel coordinates of the data area and the verification area on the identification code, the problem of low identification accuracy was solved, and higher identification accuracy was achieved.

CN116228845BActive Publication Date: 2026-05-29MAGICLAB ROBOTICS TECHNOLOGY (WUXI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MAGICLAB ROBOTICS TECHNOLOGY (WUXI) CO LTD
Filing Date
2021-12-02
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The recognition accuracy of identification codes in existing technologies is relatively low.

Method used

By identifying the ID code point in the data area and the check code point in the check area of ​​the identification code, the pixel coordinates of each are obtained, and the identification code is determined under the same conditions, thereby improving the recognition accuracy.

Benefits of technology

The identification code is identified by comparing the ID code point in the data area with the check code point in the check area, which improves the identification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116228845B_ABST
    Figure CN116228845B_ABST
Patent Text Reader

Abstract

The application provides a recognition method and device of a recognition code, the method comprising: recognizing an ID code point in a data area of the recognition code and a check code point of a check area on the recognition code, obtaining first pixel coordinates of the ID code point and second pixel coordinates of the check code point; obtaining third pixel coordinates of the check code point corresponding to the ID code point according to the first pixel coordinates; and determining that the recognition code is recognized in the case that the second pixel coordinates are the same as the third pixel coordinates, solving the problem of low recognition accuracy of the recognition code in the related art, and improving the recognition accuracy of the recognition code by recognizing the recognition code through the ID code point of the data area and the check code point of the check area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, and more specifically, to a method and apparatus for identifying identification codes. Background Technology

[0002] Currently, robots often use identification codes for positioning, but the recognition accuracy of these codes is relatively low.

[0003] Therefore, it is necessary to improve the existing technology to overcome the aforementioned defects. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for identifying identification codes, so as to at least solve the problem of low identification accuracy of identification codes in related technologies.

[0005] According to an optional embodiment of this application, a method for identifying an identification code is provided, comprising:

[0006] Identify the ID code point in the data area of ​​the identification code and the check code point in the check area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point;

[0007] The third pixel coordinate of the check code point corresponding to the ID code point is obtained based on the first pixel coordinate;

[0008] If the second pixel coordinates are the same as the third pixel coordinates, the identification code is determined to be recognized.

[0009] Optionally, when the second pixel coordinates are the same as the third pixel coordinates, determining that the identification code has been identified includes:

[0010] The second pixel coordinates are compared with the third pixel coordinates to obtain the comparison result;

[0011] If the comparison result shows that the second pixel coordinates are the same as the third pixel coordinates, then the identification code has been identified.

[0012] Optionally, after determining that the identification code has been identified, the method further includes:

[0013] The location information of the identification code is obtained based on the ID code point information in the identification result;

[0014] Obtain the relative position of the identification code and the robot;

[0015] The robot's positioning information is determined based on the relative position and the position information of the identification code.

[0016] Optionally, obtaining the third pixel coordinates of the check point corresponding to the ID code point based on the first pixel coordinates includes:

[0017] The second pixel coordinates of the check point corresponding to the ID code point are determined based on the pre-stored coordinate correspondence between ID code points and check point coordinates.

[0018] Optionally, before identifying the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code, the method further includes:

[0019] The location points on the identification code are identified to determine the area where the identification code is located. The location points include a first preset point set on the identification code. The identification code contains a predetermined number of points.

[0020] Optionally, the data area is a region composed of a second preset point among the predetermined number of points;

[0021] The verification area is the region composed of points other than the first preset point and the second preset point from the predetermined number of points.

[0022] Optionally, the ID code points are a subset of points in the data area, the check code points are a subset of points in the check area, and the number of check code points is equal to the number of ID code points.

[0023] According to another optional embodiment of this application, a recognition device for an identification code is provided, comprising:

[0024] The first identification module is used to identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code, and to obtain the first pixel coordinates of the ID code point and the second pixel coordinates of the check code point.

[0025] The first acquisition module is used to acquire the third pixel coordinates of the check code point corresponding to the ID code point based on the first pixel coordinates;

[0026] The first determining module is used to determine that the identification code has been identified when the second pixel coordinates are the same as the third pixel coordinates.

[0027] Optionally, the first determining module includes:

[0028] The comparison submodule is used to compare the second pixel coordinates with the third pixel coordinates to obtain a comparison result;

[0029] The determination submodule is used to determine that the identification code has been identified if the comparison result shows that the second pixel coordinates and the third pixel coordinates are the same.

[0030] Optionally, the device further includes:

[0031] The second acquisition module is used to acquire the location information of the identification code based on the ID code point information in the identification result;

[0032] The third acquisition module is used to acquire the relative position of the identification code and the robot;

[0033] The second determining module is used to determine the robot's positioning information based on the relative position and the position information of the identification code.

[0034] Optionally, the first acquisition module is further configured to:

[0035] The second pixel coordinates of the check point corresponding to the ID code point are determined based on the pre-stored coordinate correspondence between ID code points and check point coordinates.

[0036] Optionally, the device further includes:

[0037] The second identification module is used to identify the positioning points on the identification code and determine the area where the identification code is located. The positioning points include a first preset point set on the identification code, and the identification code contains a predetermined number of points.

[0038] Optionally, the data area is a region composed of a second preset point among the predetermined number of points;

[0039] The verification area is the region composed of points other than the first preset point and the second preset point from the predetermined number of points.

[0040] Optionally, the ID code points are a subset of points in the data area, the check code points are a subset of points in the check area, and the number of check code points is equal to the number of ID code points.

[0041] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0042] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0043] The objective of this invention is achieved through the following technical solution: identifying the ID code point in the data area of ​​the identification code and the check code point in the check area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point; obtaining the third pixel coordinate of the check code point corresponding to the ID code point based on the first pixel coordinate; and determining that the identification code has been identified when the second pixel coordinate and the third pixel coordinate are the same, thus solving the problem of low identification accuracy of identification codes in related technologies.

[0044] Compared with the prior art, the present invention has the following advantages: by identifying the identification code through the ID code point in the data area and the check code point in the check area, the identification accuracy of the identification code is improved. Attached Figure Description

[0045] Figure 1 This is a hardware structure block diagram of an intelligent device for the identification method of the identification code according to an embodiment of this application;

[0046] Figure 2 This is a flowchart of a method for identifying an identification code according to an embodiment of this application;

[0047] Figure 3 This is a schematic diagram of an identification code according to an embodiment of this application;

[0048] Figure 4 This is a structural block diagram of an identification device for an identification code according to an embodiment of this application. Detailed Implementation

[0049] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0050] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0051] The methods and embodiments provided in this application can be executed in smart devices or similar computing devices. Taking running on a robot as an example, Figure 1 This is a hardware structure block diagram of a smart device for the identification method of the identification code according to an embodiment of this application, such as... Figure 1 As shown, a smart device may include one or more ( Figure 1Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD) and a memory 104 for storing data; optionally, the aforementioned intelligent device may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that...) Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned smart device. For example, the smart device may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0052] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the identification method of the identification code in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the smart device 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0053] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the robot 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0054] This embodiment provides a method for recognizing the identification code of the aforementioned smart device. Figure 2 This is a flowchart of a method for recognizing an identification code according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0055] Step S202: Identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point;

[0056] After capturing the image of the identification code using a camera device, the pixel coordinates of each point in the image can be obtained.

[0057] Step S204: Obtain the third pixel coordinates of the check code point corresponding to the ID code point based on the first pixel coordinates;

[0058] In this embodiment of the application, step S204 can specifically determine the third pixel coordinate of the check code point corresponding to the ID code point based on the pre-stored coordinate correspondence between the ID code point and the check code point. For example, the correspondence between the ID code point and the check code point is y=f(x), where x is the pixel coordinate of the ID code point and y is the coordinate of the check code point. After obtaining the pixel coordinate of the ID code point, the coordinate of the corresponding check code point (i.e., the third pixel coordinate) can be calculated through this correspondence, i.e., the formula.

[0059] In this embodiment, the positioning points on the identification code can be identified before step S202 to determine the area where the identification code is located. Specifically, the robot can acquire images during its movement and determine the area code where the identification code is located based on the positioning points in the images. These positioning points include a first preset point set on the identification code. Specifically, the identification code can contain a predetermined number of points, where the first preset point is a positioning point used to locate the identification code. The first preset point can contain one point or multiple points. For example, the first preset point can be five points, three points, or other numbers of points. This embodiment does not limit the number of first preset points.

[0060] In the identification code, the data area is a region composed of a second preset point from a predetermined number of points; the verification area is a region composed of points other than the first and second preset points from the predetermined number of points. The second preset point can contain one point or multiple points, and the first and second preset points are different points, meaning that the points contained in the first and second preset points are not the same. The total number of the first and second preset points is less than the sum of the total number of points in the identification code. For example, the identification code can be a region composed of 5×5 squares, where the intersections of the squares are the points contained in the identification code, totaling 25 points. The positioning points (first preset points) can be 5 points, specifically 4 vertices and the midpoint of an edge. The data area can be a region composed of 12 points (second preset points) from the 25 points excluding the positioning points; the verification area is a region composed of the remaining 8 points from the 25 points excluding the positioning points and the 12 points (second preset points). In the above example, the total number of positioning points, points in the data area, and points in the verification area is equal to the total number of points contained in the identification code. Of course, in some embodiments, the total number of positioning points, points in the data area, and points in the verification area may be less than the total number of points contained in the identification code. Further, the ID code points are at least a portion of the points in the data area, the verification code points are at least a portion of the points in the verification area, and the number of verification code points is equal to the number of ID code points; for example, both the verification code points and ID code points are three.

[0061] Step S206: If the second pixel coordinates are the same as the third pixel coordinates, it is determined that the identification code has been identified.

[0062] Through the above steps S202 to S206, the problem of low recognition accuracy of identification codes in related technologies is solved. The identification code is identified by the ID code point in the data area and the check code point in the check area, thereby improving the recognition accuracy of the identification code.

[0063] In this embodiment of the application, step S208 may specifically include:

[0064] S2081, compare the second pixel coordinates with the third pixel coordinates to obtain a comparison result;

[0065] S2082, if the comparison result is that the second pixel coordinates are the same as the third pixel coordinates, it is determined that the identification code has been identified;

[0066] In an optional embodiment, after step S206 above, the position information of the identification code is obtained based on the ID code point information in the identification result; the relative position of the identification code and the robot is obtained. Specifically, the relative position of the identification code and the robot can be obtained by scanning the identification code with a camera and using depth information; the positioning information of the robot is determined based on the relative position and the position information of the identification code. Since the identification result includes the ID code point information of the identification code, a map can be built based on the ID code point information of the identification code. During the map building process, the correspondence between the ID code point information of the identification code and the coordinates is established to obtain the mapping result of the robot. That is, after storing the correspondence between the ID code point information and the coordinates of each identification code in the map, it can be used to locate the robot. The position information of the identification code is determined based on the correspondence between the identification code and the coordinates in the established map. The position information of the robot can be obtained based on the position information of the identification code and the phase position, that is, the robot is located, and the positioning accuracy is improved.

[0067] In a specific example, the reflective sticker in the identification code is made of a material that reflects infrared light. An infrared emitting device is placed next to the camera to illuminate the reflective sticker. With an infrared filter added to the lens, the camera can see the infrared light reflected by the reflective sticker and filter out natural light. The reflective sticker is circular, with a diameter of 1.5 cm. The reflective sticker is attached to a substrate, which is a 5x5 square. Each code has five reflective stickers in fixed positions to determine the orientation of the code. Figure 3 This is a schematic diagram of the identification code according to an embodiment of this application, such as... Figure 3 As shown, the remaining 19 positions are divided into a data area and a check area. Positions 9-20 are the data area, and positions 1-8 are the check area. 3 to 12 circular reflective stickers can be affixed to the data area. Different positions represent a binary digit. By adding up all the reflective stickers in the data area and matching them with a dictionary, a unique identifier ID can be obtained.

[0068] The robot captures images through a camera; it identifies positioning points in the images and determines the two-dimensional coordinates of those points.

[0069] Identify the ID code point in the data area of ​​the image and obtain the pixel coordinates of the ID code point (i.e., the first pixel coordinates); obtain the pixel coordinates of the pre-stored check code point corresponding to the ID code point (i.e., the third pixel coordinates).

[0070] The system identifies the pixel coordinates of the actual check code point in the image (i.e., the second pixel coordinates) and compares them with the pre-stored pixel coordinates of the check code point (i.e., the third pixel coordinates). If they are the same, the identification result is complete (i.e., correct); otherwise, the identification result is incomplete (i.e., incorrect). Incorrect identification results can typically include various situations. For example, the identification code may actually be correct, but the machine makes a mistake during the identification process, resulting in an incorrect result. Another example is that the identification code may have contaminants or obstructions (such as mosquitoes, flies, or dust), making the code itself incorrect, which the robot will also detect during verification through the verification area. The robot's position information (i.e., positioning information) is then obtained by using the world coordinates and positioning points corresponding to the ID code.

[0071] Among them, both the ID code point and the check code point are dynamic code points, and different identification codes have different ID code points and check code points.

[0072] The verification data of the code can be calculated based on the ID of the identification code. The verification data corresponding to each ID is unique. If the ID of the data area matches the data of the verification area observed by the camera, the ID of the code is considered to be correctly identified; otherwise, it is considered to be incorrectly identified.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM), random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0074] This embodiment also provides an identification device for an identification code, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0075] Figure 4 This is a structural block diagram of an identification device for an identification code according to an embodiment of this application, such as... Figure 4 As shown, the device includes:

[0076] The first identification module 42 is used to identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code, and to obtain the first pixel coordinates of the ID code point and the second pixel coordinates of the check code point.

[0077] The first acquisition module 44 is used to acquire the third pixel coordinates of the check code point corresponding to the ID code point based on the first pixel coordinates;

[0078] The first determining module 46 is used to determine that the identification code has been identified when the second pixel coordinates are the same as the third pixel coordinates.

[0079] Optionally, the first determining module 46 includes:

[0080] The comparison submodule is used to compare the second pixel coordinates with the third pixel coordinates to obtain a comparison result;

[0081] The determination submodule is used to determine that the identification code has been identified if the comparison result shows that the second pixel coordinates and the third pixel coordinates are the same.

[0082] Optionally, the device further includes:

[0083] The second acquisition module is used to acquire the location information of the identification code based on the ID code point information in the identification result;

[0084] The third acquisition module is used to acquire the relative position of the identification code and the robot;

[0085] The second determining module is used to determine the robot's positioning information based on the relative position and the position information of the identification code.

[0086] Optionally, the first acquisition module 42 is further configured to:

[0087] The second pixel coordinates of the check point corresponding to the ID code point are determined based on the pre-stored coordinate correspondence between ID code points and check point coordinates.

[0088] Optionally, the device further includes:

[0089] The second identification module is used to identify the positioning points on the identification code and determine the area where the identification code is located. The positioning points include a first preset point set on the identification code, and the identification code contains a predetermined number of points.

[0090] Optionally, the data area is a region composed of a second preset point among the predetermined number of points;

[0091] The verification area is the region composed of points other than the first preset point and the second preset point from the predetermined number of points.

[0092] Optionally, the ID code points are a subset of points in the data area, the check code points are a subset of points in the check area, and the number of check code points is equal to the number of ID code points.

[0093] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0094] Embodiments of this application also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above method embodiments when run.

[0095] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0096] S1, identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point;

[0097] S2, obtain the third pixel coordinates of the check code point corresponding to the ID code point based on the first pixel coordinates;

[0098] S3, if the second pixel coordinates are the same as the third pixel coordinates, determine that the identification code has been identified.

[0099] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0100] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0101] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0102] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0103] S1, identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point;

[0104] S2, obtain the third pixel coordinates of the check code point corresponding to the ID code point based on the first pixel coordinates;

[0105] S3, if the second pixel coordinates are the same as the third pixel coordinates, determine that the identification code has been identified.

[0106] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0107] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0108] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for identifying an identification code, characterized in that, include: Identify the ID code point in the data area of ​​the identification code and the check code point in the check area of ​​the identification code to obtain the first pixel coordinate of the ID code point and the second pixel coordinate of the check code point; Obtaining the third pixel coordinate of the check point corresponding to the ID code point based on the first pixel coordinate includes: determining the third pixel coordinate of the check point corresponding to the ID code point based on the pre-stored coordinate correspondence between ID code points and check point; If the second pixel coordinates are the same as the third pixel coordinates, the identification code is determined to be recognized.

2. The method according to claim 1, characterized in that, When the second pixel coordinates are the same as the third pixel coordinates, determining that the identification code has been identified includes: The second pixel coordinates are compared with the third pixel coordinates to obtain the comparison result; If the comparison result shows that the second pixel coordinates are the same as the third pixel coordinates, then the identification code has been identified.

3. The method according to claim 2, characterized in that, After confirming that the identification code has been identified, the method further includes: The location information of the identification code is obtained based on the ID code point information in the identification result; Obtain the relative position of the identification code and the robot; The robot's positioning information is determined based on the relative position and the position information of the identification code.

4. The method according to any one of claims 1 to 3, characterized in that, Before identifying the ID code point in the data area of ​​the identification code and the check code point in the check area of ​​the identification code, the method further includes: The location points on the identification code are identified to determine the area where the identification code is located. The location points include a first preset point set on the identification code. The identification code contains a predetermined number of points.

5. The method according to claim 4, characterized in that, The data area is the region composed of the second preset point among the predetermined number of points; The verification area is the region composed of points other than the first preset point and the second preset point from the predetermined number of points.

6. The method according to claim 5, characterized in that, The ID code points are a subset of points in the data area, the check code points are a subset of points in the check area, and the number of check code points is equal to the number of ID code points.

7. A device for identifying identification codes, characterized in that, include: The first identification module is used to identify the ID code point in the data area of ​​the identification code and the check code point in the verification area of ​​the identification code, and to obtain the first pixel coordinates of the ID code point and the second pixel coordinates of the check code point. The first acquisition module is used to acquire the third pixel coordinates of the check code point corresponding to the ID code point according to the first pixel coordinates, including: determining the third pixel coordinates of the check code point corresponding to the ID code point according to the pre-stored coordinate correspondence between ID code points and check code points; The first determining module is used to determine that the identification code has been identified when the second pixel coordinates are the same as the third pixel coordinates.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 6 when it is run.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 6.