Method and system for determining complete icons
By dividing the determination area around the image and counting the number of pixels to determine the integrity of the icon, the problem of missing command cards caused by the incomplete image of the mobile robot is solved, and fast and accurate icon recognition and speed improvement are achieved.
Patent Information
- Application Number
- CN202011539921.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2040-12-23
AI Technical Summary
When mobile robots recognize icons, they are prone to missing command cards due to incomplete images. Traditional methods can only be accurately recognized when all icons enter the image, and cannot provide technical help on whether all icons enter.
By dividing the determination area around the image, counting the number of pixels identified by the icon and auxiliary mark, setting a threshold value to determine whether the icon is complete, and ensuring that the recognition operation is performed when the image is complete.
It improves the accuracy and efficiency of icon recognition, reduces hardware configuration requirements, and improves the movement speed of mobile robots.
Smart Images

Figure CN112597893B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method and system for determining a complete icon in a moving state. Background Art
[0002] A mobile robot is an intelligent robot that is programmed to move along a preset route according to set rules.
[0003] Patent document CN 111625003 A discloses a mobile robot toy and its use method. The robot moves along a carrying surface according to a road segment to search for and read instruction cards to obtain corresponding action instructions, and then performs actions in any of the following ways: performing actions according to a single instruction card; performing actions according to a combination of multiple instruction cards; performing actions according to a combination of an instruction card and a road segment; or performing actions according to a combination of an instruction card and identification information on the carrying surface. This allows the mobile robot to be controlled through simple and clear operations, eliminating complex programming and making it easier for children to use. However, the actual implementation of this mobile robot has the following problems:
[0004] like Figure 1 As shown, the mobile robot recognizes icon 1 of the instruction card while moving, which inevitably leads to a long time for image recognition. In addition, affected by the speed of the mobile robot and the timing of image recognition, the image recognition algorithm takes about 100ms to recognize a frame of image. Premature recognition may result in missing the instruction card because only a part of icon 1 in the recognized image is within the recognition range 2.
[0005] In addition, traditional icons can only be used to be recognized as instructions, and can only be accurately recognized when the icon is fully included in the image. The icon itself cannot provide any technical help in determining whether the icon is fully included in the image. Summary of the Invention
[0006] In view of the defects in the prior art, the present invention aims to provide a method and system for determining a complete icon.
[0007] A method for determining a complete icon according to the present invention includes:
[0008] Image acquisition steps: collect a frame of image and divide the judgment area in the peripheral area of the image;
[0009] Image scanning step: scanning and counting the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary mark of the determination area;
[0010] Judgment steps: when the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold, or the number of pixels of the color corresponding to the auxiliary identifiers of one or more judgment areas in all judgment areas is less than or equal to a second threshold, the icon in the image is judged to be incomplete; when the number of pixels of the color corresponding to the icon in the image is greater than the first threshold, and the number of pixels of the color corresponding to the auxiliary identifier of each judgment area is greater than the second threshold, the icon in the image is judged to be complete.
[0011] Preferably, the determination area forms a closed-loop structure along the edge of the image.
[0012] Preferably, when it is determined that the icon in the image is incomplete, the process returns to capture the next frame of image; when it is determined that the icon in the image is complete, image recognition is performed on the icon.
[0013] Preferably, the color of the auxiliary mark is different from the color of the icon.
[0014] Preferably, the determination area forms a closed rectangular ring structure along the edge of the image;
[0015] The judging step comprises:
[0016] If the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold and the number of pixels of the color corresponding to the auxiliary markers of two determination areas that are opposite sides of a rectangle is less than or equal to a second threshold, the icon in the image is determined to be incomplete;
[0017] When the number of pixels of the color corresponding to the icon in the image is greater than the first threshold and the number of pixels of the color corresponding to the auxiliary identifiers of two judgment areas that are opposite sides of a rectangle is greater than the second threshold, it is determined whether there are straight lines in the other two judgment areas. If the judgment result is no, the icon in the image is determined to be incomplete. If the judgment result is yes, the icon in the image is determined to be complete.
[0018] Preferably, the icon has a first color, the auxiliary mark has a second color, and the area of the second color or the inner envelope of the area of the second color surrounds the area of the first color;
[0019] The judging step comprises:
[0020] If there are pixels of the first color at the edge of the image and the number of pixels of the first color exceeds a third threshold, determining that the icon of the image is incomplete;
[0021] When there are pixels of a first color in the image, the number of pixels of the first color in the image is not less than a first threshold, and the number of pixels of a second color at the edge of the image exceeds a fourth threshold, the icon of the image is determined to be complete.
[0022] A system for determining a complete icon according to the present invention includes:
[0023] Image acquisition module: collects a frame of image and divides the judgment area in the peripheral area of the image;
[0024] Image scanning module: scans and counts the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary mark of the determination area;
[0025] Judgment module: When the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold, or the number of pixels of the color corresponding to the auxiliary identifiers of one or more judgment areas in all judgment areas is less than or equal to a second threshold, the icon in the image is determined to be incomplete; when the number of pixels of the color corresponding to the icon in the image is greater than the first threshold, and the number of pixels of the color corresponding to the auxiliary identifier of each judgment area is greater than the second threshold, the icon in the image is determined to be complete.
[0026] Preferably, the determination area forms a closed-loop structure along the edge of the image.
[0027] Preferably, when it is determined that the icon of the image is incomplete, the next frame of image is captured; when it is determined that the icon of the image is complete, image recognition is performed on the icon.
[0028] Preferably, the color of the auxiliary mark is different from the color of the icon.
[0029] Preferably, the determination area forms a closed rectangular ring structure along the edge of the image;
[0030] The judgment module includes:
[0031] If the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold and the number of pixels of the color corresponding to the auxiliary markers of two determination areas that are opposite sides of a rectangle is less than or equal to a second threshold, the icon in the image is determined to be incomplete;
[0032] When the number of pixels of the color corresponding to the icon in the image is greater than the first threshold and the number of pixels of the color corresponding to the auxiliary identifiers of two judgment areas that are opposite sides of a rectangle is greater than the second threshold, it is determined whether there are straight lines in the other two judgment areas. If the judgment result is no, the icon in the image is determined to be incomplete. If the judgment result is yes, the icon in the image is determined to be complete.
[0033] Preferably, the icon has a first color, the auxiliary mark has a second color, and the area of the second color or the inner envelope of the area of the second color surrounds the area of the first color;
[0034] The judgment module includes:
[0035] If there are pixels of the first color at the edge of the image and the number of pixels of the first color exceeds a third threshold, determining that the icon of the image is incomplete;
[0036] When there are pixels of a first color in the image, the number of pixels of the first color in the image is not less than a first threshold, and the number of pixels of a second color at the edge of the image exceeds a fourth threshold, the icon of the image is determined to be complete.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] 1. The present invention can ensure that recognition operations are performed only when the image is complete, even with limited computing resources. For example, if recognition operations are performed after an image is recognized but the image is incomplete, then when the vehicle moves to the top of the image and can capture the complete image, the recognition operation for the incomplete image is still in progress, making it impossible to perform recognition operations on the complete image in a timely manner.
[0039] 2. The present invention can complete recognition operations at a faster speed, can improve recognition efficiency while reducing hardware configuration requirements, and when this technology is applied to mobile robots, the moving speed of the mobile robots can be doubled compared to traditional ones. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0041] Figure 1 This is a schematic diagram where the icon is not fully collected and cannot be identified;
[0042] Figure 2 A schematic diagram of dividing the judgment area;
[0043] Figure 3 This is a workflow diagram of Example 1;
[0044] Figure 4 This is a workflow diagram of Example 2;
[0045] Figure 5 This is a schematic diagram of placing icons on the line;
[0046] Figure 6 This is the workflow diagram of Example 3. DETAILED DESCRIPTION
[0047] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0048] Example 1
[0049] like Figure 3 As shown, this embodiment provides a method for determining a complete icon, including:
[0050] Image acquisition step: Capture a frame of image and divide the judgment area in the peripheral area of the image. The judgment area forms a closed loop structure along the edge of the image. Its purpose is to ensure that there is no icon content in the edge of the image, or to ensure that the icon content is minimal. It can be Figure 2 The rectangular structure shown is divided into a first determination area 3, a second determination area 4, a third determination area 5 and a fourth determination area 6 (corresponding to Figure 3 Of course, in other embodiments, it can also be a complete circular ring, or a complete, combined polygonal ring.
[0051] To improve recognition accuracy, in this embodiment, noise filtering can be performed on the captured image to remove interference factors in the image according to preset rules before entering the image scanning step. The image denoising method can adopt existing technologies, such as: spatial domain-based filters, wavelet domain-based wavelet threshold denoising, PDE-based image denoising, total variation (TV) image denoising, etc., which are not limited by the present invention.
[0052] Image scanning step: Scan and count the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary marker in the determination area. In this embodiment, the color corresponding to the icon is black pixels and the auxiliary marker is white pixels, ensuring that the two colors are different for easy identification.
[0053] Judgment steps: when the number of pixels of the color corresponding to the icon in the image is less than or equal to the first threshold, or the number of pixels of the color corresponding to the auxiliary identifiers of one or more judgment areas in all judgment areas is less than or equal to the second threshold, it is determined that the icon in the image is incomplete; when the number of pixels of the color corresponding to the icon in the image is greater than the first threshold, and the number of pixels of the color corresponding to the auxiliary identifier of each judgment area is greater than the second threshold, it is determined that the icon in the image is complete.
[0054] If it is determined that the icon in the image is incomplete, the process returns to capture the next frame of image; if it is determined that the icon in the image is complete, the process performs image recognition on the icon.
[0055] Furthermore, considering that the captured image may capture incomplete icons and auxiliary markers, in this embodiment, the icon can be set to a first color and the auxiliary marker to a second color, where the first and second colors are different, and the second color area or the inner envelope of the second color area surrounds the first color area. In the present invention, the first color is not limited to a single color and can be a combination of various colors. The second color is not limited to a single color and can be a combination of various colors.
[0056] The judgment steps include:
[0057] When there are pixels of the first color at the edge of the image and the number of pixels of the first color exceeds the third threshold, it is considered that the second color in the image does not completely surround the first color, and the image icon is determined to be incomplete; when there are pixels of the first color in the image and the number of pixels of the first color is not less than the first threshold, and the number of pixels of the second color at the edge of the image exceeds the fourth threshold, it is considered that the second color in the image completely surrounds the first color, and the image icon is determined to be complete.
[0058] The method for judging whether an icon is complete adopted by the present invention can ensure that the icon is not missed when the car moves forward quickly, can improve the recognition efficiency while reducing the configuration requirements for hardware, and the moving speed of the car can be doubled.
[0059] Example 2
[0060] like Figure 4 As shown, this embodiment is based on the embodiment 1, and the auxiliary mark is changed to a red pixel. The determination principle is still the same as that of the embodiment 1.
[0061] Example 3
[0062] like Figure 5As shown, considering the possibility that icon 1 may be directly overlapped and placed on the mark in the map (including various auxiliary images such as straight lines, triangles, quadrilaterals, polygons, other regular or irregular shapes representing the forward route), as shown in FIG. Figure 6 As shown, this embodiment is further improved on the basis of embodiment 1:
[0063] Image acquisition step: Capture a frame of image and divide the judgment area in the peripheral area of the image. The judgment area forms a closed loop structure along the edge of the image. Its purpose is to ensure that there is no icon content in the edge of the image, or to ensure that the icon content is minimal. It can be Figure 2 The rectangular structure shown is divided into a first determination area 3, a second determination area 4, a third determination area 5 and a fourth determination area 6. Of course, in other embodiments, it can also be a complete circular ring, or a complete, combined polygonal ring.
[0064] Image scanning step: Scan and count the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary marker in the determination area. In this embodiment, the color corresponding to the icon is black pixels and the auxiliary marker is white pixels, ensuring that the two colors are different for easy identification.
[0065] Judgment step: The number of pixels of the color corresponding to the icon in the image is less than or equal to the first threshold and there are two judgment areas that are opposite to each other (corresponding to Figure 5 If the number of pixels of the color corresponding to the auxiliary identification of 4 and 6) is less than or equal to the second threshold, the icon of the image is determined to be incomplete; on the contrary, in the other two determination areas (corresponding to Figure 5 In 3) and 5), it is determined whether there are straight lines. If the judgment result is no, it is determined that the icon of the image is incomplete. If the judgment result is yes, it is determined that the icon of the image is complete.
[0066] If it is determined that the icon in the image is incomplete, the process returns to capture the next frame of image; if it is determined that the icon in the image is complete, the process performs image recognition on the icon.
[0067] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.
[0068] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A method for determining a complete icon, characterized in that: include: Image acquisition steps: collect a frame of image and divide the judgment area in the peripheral area of the image; Image scanning step: scanning and counting the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary mark of the determination area; Determining step: if the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold, or if the number of pixels of the color corresponding to the auxiliary markers of one or more determination areas in all determination areas is less than or equal to a second threshold, determining that the icon in the image is incomplete; If the number of pixels of the color corresponding to the icon in the image is greater than a first threshold, and the number of pixels of the color corresponding to the auxiliary marker in each determination area is greater than a second threshold, the icon in the image is determined to be complete; The determination area forms a closed-loop structure along the edge of the image.
2. The method for determining a complete icon according to claim 1, wherein: If it is determined that the icon in the image is incomplete, the process returns to capture the next frame of image; if it is determined that the icon in the image is complete, the process performs image recognition on the icon.
3. The method for determining a complete icon according to claim 1, wherein: The color of the auxiliary mark is different from the color of the icon.
4. The method for determining a complete icon according to claim 1, wherein: The determination area forms a closed rectangular ring structure along the edge of the image; The judging step comprises: If the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold and the number of pixels of the color corresponding to the auxiliary markers of two determination areas that are opposite sides of a rectangle is less than or equal to a second threshold, the icon in the image is determined to be incomplete; When the number of pixels of the color corresponding to the icon in the image is greater than the first threshold and the number of pixels of the color corresponding to the auxiliary identifiers of two judgment areas that are opposite sides of a rectangle is greater than the second threshold, it is determined whether there are straight lines in the other two judgment areas. If the judgment result is no, the icon in the image is determined to be incomplete. If the judgment result is yes, the icon in the image is determined to be complete.
5. The method for determining a complete icon according to claim 1, wherein: The icon has a first color, the auxiliary mark has a second color, and the area of the second color surrounds the area of the first color; The judging step comprises: If there are pixels of the first color at the edge of the image and the number of pixels of the first color exceeds a third threshold, determining that the icon of the image is incomplete; When there are pixels of a first color in the image, the number of pixels of the first color in the image is not less than a first threshold, and the number of pixels of a second color at the edge of the image exceeds a fourth threshold, the icon of the image is determined to be complete.
6. A system for determining a complete icon, characterized in that: include: Image acquisition module: collects a frame of image and divides the judgment area in the peripheral area of the image; Image scanning module: scans and counts the number of pixels of the color corresponding to the icon in the entire image and the number of pixels of the color corresponding to the auxiliary mark of the determination area; A judgment module: when the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold, or when the number of pixels of the color corresponding to the auxiliary markers of one or more judgment areas in all judgment areas is less than or equal to a second threshold, determines that the icon in the image is incomplete; If the number of pixels of the color corresponding to the icon in the image is greater than a first threshold, and the number of pixels of the color corresponding to the auxiliary marker in each determination area is greater than a second threshold, the icon in the image is determined to be complete; The determination area forms a closed-loop structure along the edge of the image.
7. The system for determining a complete icon according to claim 6, wherein: If it is determined that the icon in the image is incomplete, the next frame of image is captured; if it is determined that the icon in the image is complete, image recognition is performed on the icon.
8. The system for determining a complete icon according to claim 6, wherein: The color of the auxiliary mark is different from the color of the icon.
9. The system for determining a complete icon according to claim 6, wherein: The determination area forms a closed rectangular ring structure along the edge of the image; The judgment module: If the number of pixels of the color corresponding to the icon in the image is less than or equal to a first threshold and the number of pixels of the color corresponding to the auxiliary markers of two determination areas that are opposite sides of a rectangle is less than or equal to a second threshold, the icon in the image is determined to be incomplete; When the number of pixels of the color corresponding to the icon in the image is greater than the first threshold and the number of pixels of the color corresponding to the auxiliary identifiers of two judgment areas that are opposite sides of a rectangle is greater than the second threshold, it is determined whether there are straight lines in the other two judgment areas. If the judgment result is no, the icon in the image is determined to be incomplete. If the judgment result is yes, the icon in the image is determined to be complete.
10. The system for determining a complete icon according to claim 6, wherein: The icon has a first color, the auxiliary mark has a second color, and the area of the second color surrounds the area of the first color; The judgment module includes: If there are pixels of the first color at the edge of the image and the number of pixels of the first color exceeds a third threshold, determining that the icon of the image is incomplete; When there are pixels of a first color in the image, the number of pixels of the first color in the image is not less than a first threshold, and the number of pixels of a second color at the edge of the image exceeds a fourth threshold, the icon of the image is determined to be complete.
Citation Information
Patent Citations
Mobile robot toy and using method thereof
CN111625003A
Detecting method and device for specific pictures applied to website
CN104240228A
Pop-up window control method and apparatus
CN105607831A