Image recognition method and device, electronic device, and computer-readable storage medium

CN122265622APending Publication Date: 2026-06-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-12-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the existing technology, material offset or image position change during the material assembly process can lead to inaccurate recognition areas, making it impossible to identify specific targets and affecting production.

Method used

By determining the reference position of the object to be identified in the image, a recognition area is established. If the target graphic is not identified, the position of the recognition area is adjusted and the recognition is retried until it is successful.

Benefits of technology

It improves the accuracy and success rate of material identification, avoids errors caused by inaccurate image acquisition, and meets production needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265622A_ABST
    Figure CN122265622A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of image recognition, and in particular, to an image recognition method and device, an electronic device, and a computer readable storage medium. The method comprises: determining a to-be-recognized object in an image, and determining a reference position on the to-be-recognized object; determining a recognition area according to the reference position; attempting to recognize a circular area in the recognition area; in the case where the circular area is not recognized in the recognition area, offsetting the position of the recognition area, and attempting to recognize the circular area in the offset recognition area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image recognition technology, and in particular to image recognition methods and apparatus, electronic devices and computer-readable storage media. Background Technology

[0002] Visual positioning refers to the accurate determination of the position and orientation of an object to be identified using cameras and image processing technology. In the field of industrial automation, visual positioning can be used to assist in material assembly and loading / unloading on production lines.

[0003] In related technologies, when assembling materials, image recognition technology is needed to identify specific locations on the object to be identified, such as circular holes used for assembly. However, these technologies can only perform identification within a designated area. If the identification area becomes inaccurate due to factors such as material offset or image position changes, the technology will be unable to identify the specific target within that area, leading to errors and impacting production. Summary of the Invention

[0004] To overcome the problems existing in the related technologies, this disclosure provides an image recognition method and apparatus, electronic equipment and computer-readable storage medium that can solve the above problems.

[0005] According to a first aspect of the present disclosure, an image recognition method is provided, the method comprising: determining an object to be recognized in an image, and determining a reference position on the object to be recognized; determining a recognition region based on the reference position; attempting to recognize a circular region within the recognition region; and, if the circular region is not recognized within the recognition region, shifting the position of the recognition region, and attempting to recognize the circular region within the shifted recognition region.

[0006] According to a second aspect of the present disclosure, an image recognition apparatus is provided, the apparatus comprising: a determining unit configured to determine an object to be recognized in an image and to determine a reference position on the object to be recognized; and to determine a recognition region based on the reference position; a recognizing unit configured to attempt to recognize a circular region within the recognition region; and an offsetting unit configured to, if the circular region is not recognized within the recognition region, offset the position of the recognition region and attempt to recognize the circular region within the offset recognition region.

[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor and a memory; the memory being used to store a computer program; and the processor being used to execute the image recognition method as described in the first aspect by invoking the computer program.

[0008] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the image recognition method as described in the first aspect.

[0009] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0010] This disclosure, based on the acquired image, first identifies the object to be recognized from the image. After identifying the object, a reference position is further determined on the object, which is used to determine the location of the recognition region. After determining the location of the recognition region, an attempt is made to recognize a target shape, such as a circular area, within the recognition region. If the circular area is recognized, the image recognition is complete; if the circular area is not recognized, the location of the recognition region can be shifted, and the recognition attempt can be retried within the shifted recognition region until recognition is successful or the shift exceeds a certain limit.

[0011] Based on embodiments of this disclosure, an initial recognition area can be determined first based on a reference position on the object to be recognized. When the target graphic cannot be recognized in the recognition area, an error is not immediately reported. Instead, the recognition area can be shifted to expand the recognition area by recognizing the area surrounding the initial recognition area. This avoids the inability to recognize the target graphic due to non-standard material placement or image capture.

[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0013] The accompanying drawings, which are incorporated in and form part of this disclosure, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0014] Figure 1 This is a schematic flowchart illustrating an image recognition method according to an exemplary embodiment of the present disclosure.

[0015] Figure 2 This disclosure is a schematic image of an object to be identified according to an exemplary embodiment.

[0016] Figure 3 This is a schematic diagram illustrating the recognition result of a circular region according to an exemplary embodiment of the present disclosure.

[0017] Figure 4 This is a schematic diagram illustrating a process for determining an identification result according to an exemplary embodiment of the present disclosure.

[0018] Figure 5 This is a block diagram illustrating an image recognition device according to an exemplary embodiment of the present disclosure.

[0019] Figure 6 This is a schematic block diagram illustrating an image recognition device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0021] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0023] In some embodiments, in the field of intelligent manufacturing, image acquisition devices can be used to acquire images, and the processor can perform image recognition on the acquired images to determine the position and posture of the materials, thereby enabling the robotic arm to accurately grasp and assemble the materials.

[0024] For example, materials on the production line can be transported to a predetermined location by a carrier. An image acquisition device is set up at the predetermined location to capture images of the materials. By processing and recognizing the images, the robotic arm can be controlled to accurately grasp the materials based on the recognition results.

[0025] However, in some cases, the target graphic cannot be identified within the image's recognition area. For example, manufacturing tolerances of the material may cause the target graphic to be located outside the recognition area. If the target graphic cannot be correctly identified, it may affect subsequent processes and thus impact production.

[0026] When material consistency is low, the actual position of the target graphic on the material may also have slight errors. Therefore, even if the material is accurately positioned, and even if the preset area is accurately located, the target graphic may not be recognized within the preset area due to material tolerances, resulting in an error. However, some minor tolerances do not actually affect use, and the high requirements for positioning in related technologies may actually lead to material waste.

[0027] To address the aforementioned technical problems, this disclosure proposes an image recognition method.

[0028] Figure 1 This is a schematic flowchart illustrating an image recognition method according to an embodiment of the present disclosure. The image recognition method can be executed by a terminal. This image recognition method can be used to identify target graphics on an object to be recognized. The target graphics can be circular areas. The terminal includes, but is not limited to, communication devices such as mobile phones, tablets, wearable devices, sensors, and IoT devices.

[0029] like Figure 1 As shown, image recognition methods include:

[0030] In step S101, an object to be identified is determined in the image, and a reference position is determined on the object to be identified;

[0031] In step S102, the identification area is determined based on the reference position;

[0032] In step S103, an attempt is made to identify a circular region within the identified region;

[0033] In step S104, if the circular region is not identified within the identification area, the position of the identification area is shifted, and an attempt is made to identify the circular region within the shifted identification area.

[0034] Figure 2 This is a schematic diagram of an image of an object to be identified according to an embodiment of the present disclosure.

[0035] In some embodiments, the object to be identified may be transported to a predetermined location by a vehicle, and an image acquisition device at the predetermined location may acquire an image.

[0036] like Figure 2 As shown, the image contains an object to be identified, and the object contains a target graphic that needs to be identified. Although the image was acquired at a predetermined location, the vehicle and / or the object to be identified may shift in position when it reaches the predetermined location, resulting in the object's position in the acquired image not being fixed, and its posture may also be tilted.

[0037] In some embodiments, an object to be identified is determined in an image, and a reference position is determined on the object to be identified.

[0038] The object to be identified can be any material on the production line. The target graphic to be identified is located on the object to be identified. For example, the object to be identified is called the first material, which could be a mobile phone frame. The target graphic to be identified could be a circular hole on the mobile phone frame. After identifying the circular hole, the robotic arm can be controlled to grasp the second material, which contains a cylindrical assembly. By embedding the cylindrical assembly into the circular hole, the combination of the first material and the second material is achieved.

[0039] After identifying the object to be identified, a reference position can be further determined on the object.

[0040] For example, if the object to be identified is a rectangle, the reference position can be a vertex of the rectangle or the center point. Alternatively, if the object has a prominent feature point, that feature point can be used as the reference position.

[0041] In some embodiments, the identification region is determined based on the reference location.

[0042] The relative position between the initial identification area and the reference position can be determined in advance, and then the identification area can be determined based on the reference position and the relative position.

[0043] For example, a coordinate system can be established based on the reference position and the shape of the object to be identified. The coordinates of the reference position are (0,0). When the object to be identified is a rectangle, the horizontal axis can be parallel to the long side of the object to be identified, and the vertical axis can be parallel to the short side of the object to be identified. Assuming that the center coordinates of the identification area are (x,y), the center of the identification area can be determined first, and then the identification area can be determined based on the center of the identification area.

[0044] For example, the recognition area can be circular or rectangular. When the recognition area is circular, it can be determined based on the radius of the preset recognition area after determining the center coordinates. When the recognition area is rectangular, the relative position can point to the center of the recognition area or to the four vertices of the recognition area. Thus, the recognition area can be determined by the combination of the center and the side length, or by the four vertices.

[0045] The relative position can be preset or determined based on the identification and detection of standard materials (also known as metal materials).

[0046] The shape and size of the identification area are not limited in this disclosure. It should be noted that since the size of the identification area directly affects the accuracy of identifying the target graphic (e.g., a circular area), when the position is accurate, the larger the identification area, the more likely it is to identify other similar graphics other than the target graphic, which may lead to identification errors or grasping errors. Therefore, the size of the identification area based on standard material settings can be set to include only the target graphic and not other easily confused graphics.

[0047] In some embodiments, an attempt is made to identify a circular region within the identification area.

[0048] Based on a pre-defined image recognition model, it can identify target shapes within a recognition area. Target shapes can be circular areas or other shapes, such as rectangles or triangles.

[0049] This image recognition model is used to identify the location of a circular area within the recognition area. The specific method for creating the model will not be elaborated here, but will be introduced in detail later.

[0050] In some embodiments, a circular region is identified within the identification area.

[0051] The recognition of a circular area indicates successful recognition. Subsequent operations such as grasping and assembling can be performed on the circular area based on the recognition results of the image.

[0052] In some embodiments, if the circular region is not identified within the identification area, the position of the identification area is shifted, and an attempt is made to identify the circular region within the shifted identification area.

[0053] If no circular area is detected within the recognition area, the recognition fails. However, recognition failure does not necessarily mean that the target graphic (circular area) is not present on the object to be recognized. It may be due to factors such as the object's position shifting or the image shooting angle causing inaccurate positioning of the recognition area, resulting in the recognition area not completely encompassing the circular area. The object itself is not the problem.

[0054] Therefore, if a circular area is not detected, the position of the detection area can be shifted, and an attempt can be made to detect a circular area within the shifted detection area. If a circular area is still not detected within the shifted detection area, the detection area can be shifted further to try to detect a circular area in other locations or over a larger area until successful detection is achieved. Alternatively, if the maximum number of shifts or the maximum shift distance is reached and a circular area is still not detected, then the detection fails.

[0055] In the embodiments disclosed herein, the object to be identified can be determined first, and the initial identification area can be determined more accurately based on the reference position on the object to be identified. If the circular area (target graphic) is not identified within the initial identification area, the identification is not directly determined to be a failure. Instead, the identification area is shifted to a certain extent, and the circular area is continued to be identified after the shift until the identification is successful or the shift is too large.

[0056] When the consistency of incoming materials is not high, the recognition area can be offset to achieve real-time self-correction of the recognition area. Thus, when the tolerance of the object to be recognized is not large, the circular area can be recognized by the self-corrected recognition area, thereby meeting the production recognition requirements of the project.

[0057] In some embodiments, the model required to identify a circular region within the identification area can be implemented by creating a function or method.

[0058] For example, you can first create a measurement handle, the corresponding code is: CreateMetrologyModel.

[0059] Add another model for a line "Circle" using the code: AddMetrologyObjectLineMeasure.

[0060] Set relevant measurement (recognition) parameters for the model, such as Gaussian smoothing parameters, edge gradient threshold, edge polarity, edge direction selection, etc. The code is: SetMetrologyObjectParam.

[0061] After determining the relevant measurement parameters, you can use this model to start finding the circle. The code is: ApplyMetrologyModel.

[0062] If a "Circle" model is detected in the image, the result of the found circle will be displayed on the image. The code is: GetMetrologyObjectMeasures, GetMetrologyObjectResultContour.

[0063] In some embodiments, the image recognition method further includes: determining standard recognition parameters for the circular region; wherein, attempting to recognize the circular region within the recognition region includes: attempting to recognize the circular region within the recognition region according to the standard recognition parameters.

[0064] The relevant measurement parameters in the model are set to defined standard recognition parameters to find the desired circular region within the recognition area. Then, based on the model using the standard recognition parameters, an attempt is made to identify the circular region within the recognition area.

[0065] If a circular region is identified, it will be marked on the image to facilitate subsequent operations such as grasping and assembly; if no circular region is identified, the model fails to identify a circular region this time.

[0066] In some embodiments, the standard identification parameters may be user-inputted identification parameters or identification parameters determined by identifying standard materials.

[0067] Users can directly input standard recognition parameters based on experience or feedback from image recognition results.

[0068] Alternatively, by performing image recognition on standard materials, the parameters that can correctly identify the circular area in the image corresponding to the standard material can be determined as the standard recognition parameters.

[0069] For example, the model can use a combination of multiple measurement parameters to identify images corresponding to standard materials and generate multiple recognition results. Users can select and determine the recognition result with the best recognition effect from the multiple recognition results, and determine the measurement parameters corresponding to the selected recognition result as the standard recognition parameters. Alternatively, the model can first identify images corresponding to standard materials based on a first set of measurement parameters. After viewing the recognition results, users can continuously adjust the measurement parameters and view the adjusted recognition results until they are satisfied with the recognition results, and then determine the final adjusted measurement parameters as the standard recognition parameters.

[0070] In some embodiments, if the circular region is not identified within the identification area, the position of the identification area is shifted.

[0071] The recognition region can be shifted based on the method used to determine it. For example, if the recognition region is determined by its center point (or vertex, feature point), the center point (or vertex, feature point) can be shifted, and a new recognition region can be determined based on the shifted center point (or vertex, feature point).

[0072] In some embodiments, the recognition area can be circular. The center point (i.e., the center of the circle) of the recognition area can be determined first, and then the recognition area can be determined by a preset radius.

[0073] For example, if the initial center coordinates of the recognition region are (x, y), then when offsetting this recognition region, each offset can be performed in different directions with the same step size. For example, if the offset step size is L, the coordinates after the first offset can include (xL, yL), (xL, y+L), (x+L, yL), and (x+L, y+L). Based on the four offset center coordinates, four new recognition regions are determined, and attempts are made to recognize the target image in each region.

[0074] To avoid misidentifying other materials or graphics as the required circular area due to excessive offset distance, a limit can be added to the number of offsets. For example, the number of offsets can be n, where n is less than 5. The number of offsets n increases with each failed identification. The center coordinates of each offset can include (xL*n, yL*n), (xL*n, y+L*n), (x+L*n, yL*n), and (x+L*n, y+L*n).

[0075] In some embodiments, if a circular region is identified in the identification area after any offset, the position of the identification area is recorded.

[0076] If a circular area can be identified within the recognition area, the location of that area can be recorded, such as the coordinates of its center, for subsequent recognition or grasping.

[0077] Figure 3 This is a schematic diagram illustrating the identification result of a circular region according to an embodiment of the present disclosure.

[0078] like Figure 3 As shown, in some embodiments, multiple different parameters can be used to identify the image. If the circular regions identified by multiple parameters are the same, then the circular region meets the requirements; if the multiple parameters identify multiple circular regions (e.g., ... Figure 3 If the circular regions 1 and 2 are not found, it means that the circular regions identified by different parameters are not unique, and therefore the circular regions do not meet the standard.

[0079] exist Figure 3 In the image, the identified circular regions 1 and 2 are shown using square markers. This could be due to shadows in the image during capture, or the presence of inner or outer diameters in the photographed circular material. However, if a single parameter is used for image recognition, only one circular region might be identified from these multiple circular regions. This single circular region identified using such a parameter cannot guarantee that it is the one needed for subsequent grasping, assembly, or other processes.

[0080] For example, Figure 3 If multiple parameters are used to identify an image, multiple circular regions may be identified. For example, parameters 1 and 2 may identify circular region 1 and circular region 2, respectively. This indicates that multiple circular regions may exist in the image. However, in actual operation, if only parameter 1 is used for identification, only circular region 1 will be identified. Circular region 1 may not be the target; circular region 2 may be. This leads to inconsistency between the identified circular region and the target, resulting in positioning errors and affecting factory production.

[0081] To address the aforementioned technical problems, in some embodiments, attempting to identify a circular region within the identification area includes: if a circular region is identified within the identification area, determining the number of identified circular regions; if the number is 1, determining the circular region as the identification result; if the number is multiple, determining one circular region as the identification result from the multiple identified circular regions.

[0082] It should be noted that by setting the position, shape, and size of the recognition area, the simultaneous appearance of two circular areas within the recognition area can be avoided. Therefore, the "multiple" cases refer to the identification of multiple different circular areas of the same target area using different recognition parameters.

[0083] This embodiment can attempt to identify the recognition area using multiple recognition parameters. If all the recognition parameters can only identify the same circular area, that circular area is taken as the recognition result. If the multiple recognition parameters can identify multiple circular areas, then one of the identified circular areas is selected as the recognition result.

[0084] Compared to identifying a circular region using only one recognition parameter, this embodiment uses multiple recognition parameters, resulting in higher accuracy. When multiple circular regions exist, it can also identify one of them as the recognition result, thus improving the reliability of the recognition result.

[0085] In some embodiments, for the identified circular region, it can be determined whether the identified circular region meets the requirements.

[0086] A circular region that meets the requirements can be identified as the recognition result. If the identified circular region does not meet the requirements, the recognition parameters can be adjusted to try to identify a circular region that meets the requirements, until the number of times the recognition parameters can be adjusted exceeds the limit.

[0087] In some embodiments, the image recognition method further includes: determining a reference radius of the circular region; wherein, determining a circular region as the recognition result from the identified plurality of circular regions includes: determining the difference between the radius of each circular region in the plurality of circular regions and the reference radius; and determining a circular region as the recognition result from the plurality of circular regions based on the plurality of differences.

[0088] The reference radius of the circular region can be predetermined, and the difference between the radius of each of the identified circular regions and the reference radius can be determined. Based on the difference, a circular region is determined as the identification result.

[0089] It should be noted that the reference radius can be directly output by the user, or it can be obtained based on the detection results of image recognition of standard materials.

[0090] In some embodiments, the requirement includes, but is not limited to: the difference between the radius of the identified circular region and the reference radius is less than a first threshold.

[0091] In some embodiments, determining a circular region as the recognition result from the plurality of circular regions based on the plurality of differences includes: determining the circular region corresponding to the difference less than a first difference threshold among the plurality of differences as the recognition result.

[0092] It should be noted that the circular area corresponding to the difference equal to the first difference threshold can be identified as a recognition result, or it can be not identified as a recognition result.

[0093] The first difference threshold can be preset. Subsequent operations such as grasping and assembling the recognition results can tolerate a certain degree of error, so the first difference threshold can be determined based on this allowable error. Since the material position on the object to be recognized is fixed, and there are no other easily confused materials around the recognized circular area that could lead to grasping errors, for multiple recognized circular areas, the circular area whose difference from the reference is within the allowable error range can be directly determined as the recognition result.

[0094] In some embodiments, determining the circular region corresponding to the difference less than a first difference threshold among the plurality of differences as the recognition result includes: determining the circular region corresponding to the smallest difference among the circular regions corresponding to differences less than the first difference threshold as the recognition result.

[0095] The smaller the difference between the radius of the circular region and the reference radius, the more accurate the identification result, and the more likely the circular region is to represent the actual location of the target material. Therefore, the circular region with the smallest difference can be identified as the identification result.

[0096] In some embodiments, the image recognition method further includes: adjusting the recognition parameters for the circular region when all of the plurality of differences are greater than a first difference threshold; attempting to recognize the circular region in the recognition region according to the adjusted recognition parameters; and determining the recognition result from the recognized circular region.

[0097] If none of the identified circular regions meet the requirement that the difference between their reference radii and the first threshold is met, it indicates that these identified circular regions do not meet the conditions and cannot be correctly grasped and assembled subsequently. Therefore, the recognition parameters can be adjusted, and the circular regions can be re-identified based on the adjusted parameters.

[0098] The radius of the re-identified circular region also needs to be subtracted from the reference radius to determine whether the re-identified circular region meets the requirements. Please refer to the above embodiment, which will not be repeated here.

[0099] The above example will be illustrated with a specific example below.

[0100] Figure 4 This is a schematic flowchart illustrating a process for determining an identification result according to an embodiment of the present disclosure.

[0101] like Figure 4 As shown, the reference radius can be determined first.

[0102] The reference radius can be determined using a standard material. An image of the standard material is obtained, and a reference circular region is identified within the image. The radius of this reference circular region is determined, recorded, and saved; this radius is the reference radius.

[0103] After determining the reference radius, you can first try to identify the circular area using the preset recognition parameters and determine the radius of the circular area.

[0104] Preset recognition parameters may include, for example, a Gaussian smoothing parameter and an edge gradient threshold, where the Gaussian smoothing parameter is 1 and the edge gradient threshold is 30. The Gaussian smoothing parameter is used to reduce image noise and detail; the larger the Gaussian smoothing parameter, the less noise, the better the smoothing effect, and the less detail, which affects the radius of the recognized circular region. The edge gradient threshold is used to determine and distinguish the boundaries of the image, and therefore affects the boundaries of the recognized circular region, thus affecting the radius of the circular region.

[0105] Based on the above recognition parameters, a circular region, denoted as circle1, can be identified within the recognition area, and the difference between the radius of circle1 and the reference radius can be calculated.

[0106] If the difference is less than the first threshold, the identified circular region can be considered to meet the standard, and the circular region circle1 can be identified as the result.

[0107] The first threshold is related to the process and can be determined according to the specific needs of the production project. For example, the first threshold can be set to 5 pixels, indicating that the difference between the radius of the identified circular area and the reference radius is within 5 pixels, which meets the production requirements.

[0108] If the difference is greater than the first threshold, the identified circular region can be considered non-compliant with the standard. In this case, the edge gradient threshold in the identification parameters can be adjusted further.

[0109] The edge gradient thresholds were set to 20, 40, 60, 80 and 100 respectively, and the adjusted edge gradient thresholds were used to identify circular regions. The corresponding circular regions can be recorded as circle20, circle40, circle60, circle80 and circle100 respectively.

[0110] For the identified multiple circular regions, determine the difference between the radius of each circular region (circle20, circle40, circle60, circle80, and circle100) and the reference radius. Alternatively, first determine the minimum radius among these circular regions, and then determine the difference between the minimum radius and the reference radius.

[0111] If the difference is less than the first threshold, or if the difference between the minimum radius of these circular regions and the reference radius is less than the first threshold, then the circular region corresponding to the difference (or minimum radius) less than the first threshold is determined as the recognition result.

[0112] If the difference between the radius of these circular regions and the reference value is greater than the first threshold, then further adjustments can be made to the Gaussian smoothing parameter (Gaussian threshold).

[0113] You can first determine whether the Gaussian smoothing parameter before adjustment is greater than a specified value, for example, a specified value of 3.

[0114] If the Gaussian smoothing parameter is not greater than the specified value, the step size can be increased by 0.5. After adjusting the Gaussian smoothing parameter, the circular regions are re-identified with the edge gradient thresholds set to 20, 40, 60, 80, and 100, and the radius of the identified circular regions is determined to meet the requirements. This process continues until a recognition result is obtained, or if the recognition fails when the Gaussian smoothing parameter is greater than the specified value.

[0115] Based on this embodiment, it can be first determined whether the circular region identified under the preset recognition parameters meets the requirements. If the identified circular region does not meet the requirements, the edge gradient threshold is adjusted to try to identify a circular region that meets the requirements. If the adjustment of the edge gradient threshold fails to identify a circular region that meets the requirements, the Gaussian smoothing parameter is further adjusted, and the circular region is re-identified through multiple edge gradient thresholds under the adjusted Gaussian smoothing parameter to determine whether it meets the requirements.

[0116] The embodiments of this disclosure can determine whether the identified circular region meets the requirements, and if the identified circular region does not meet the requirements, the identification parameters can be modified to re-attempt to identify a circular region that meets the requirements. This method can ensure the accuracy of identification, avoid errors caused by the inability to correctly identify circular regions, and prevent problems in subsequent grasping and assembly of circular regions due to non-standard identified circular regions. It can improve the grasping accuracy of circular regions, reduce the reliance on the consistency control of the objects to be identified, meet the production identification needs, and provide technical support for unmanned factories.

[0117] Corresponding to the embodiments of the image recognition method of this disclosure, this disclosure also provides embodiments of corresponding image recognition devices.

[0118] Please see Figure 5 , Figure 5 This is a block diagram of an image recognition device according to one embodiment of this disclosure. Figure 5 As shown, the image recognition device includes:

[0119] The determining unit 510 is configured to determine an object to be identified in an image, and to determine a reference position on the object to be identified; and to determine a recognition region based on the reference position.

[0120] The identification unit 520 is configured to attempt to identify a circular region within the identification area;

[0121] The offset unit 530 is configured to offset the position of the identification area when the circular area is not identified within the identification area, and attempt to identify the circular area within the offset identification area.

[0122] In some embodiments, the image recognition device is further configured to: determine standard recognition parameters for the circular region; wherein, attempting to recognize the circular region within the recognition region includes: attempting to recognize the circular region within the recognition region according to the standard recognition parameters.

[0123] In some embodiments, attempting to identify a circular region within the identification area includes: if a circular region is identified within the identification area, determining the number of identified circular regions; if the number is 1, determining the circular region as the identification result; if the number is multiple, determining one circular region as the identification result from the multiple identified circular regions.

[0124] In some embodiments, the image recognition device is further configured to: determine a reference radius of the circular region; wherein determining a circular region as a recognition result from the identified plurality of circular regions includes: determining the difference between the radius of each circular region in the plurality of circular regions and the reference radius; and determining a circular region as a recognition result from the plurality of circular regions based on the plurality of differences.

[0125] In some embodiments, determining a circular region as the recognition result from the plurality of circular regions based on the plurality of differences includes: determining the circular region corresponding to the difference less than a first difference threshold among the plurality of differences as the recognition result.

[0126] In some embodiments, determining the circular region corresponding to the difference less than a first difference threshold among the plurality of differences as the recognition result includes: determining the circular region corresponding to the smallest difference among the circular regions corresponding to differences less than the first difference threshold as the recognition result.

[0127] In some embodiments, the image recognition device is further configured to: adjust the recognition parameters for the circular region when all of the plurality of differences are greater than a first difference threshold; attempt to recognize the circular region in the recognition region according to the adjusted recognition parameters; and determine the recognition result from the recognized circular region.

[0128] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0129] Embodiments of this disclosure also provide an electronic device, including: a processor and a memory; the memory for storing a computer program; and the processor for executing the image recognition method as described in any of the above embodiments by invoking the computer program.

[0130] Embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the image recognition method as described in any of the above embodiments.

[0131] Figure 6 This is a schematic block diagram illustrating an image recognition device 600 according to an embodiment of the present disclosure. For example, device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0132] Reference Figure 6The device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.

[0133] Processing component 602 typically controls the overall operation of device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the information receiving method described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0134] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0135] Power supply component 606 provides power to the various components of device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 600.

[0136] Multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0137] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0138] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.

[0139] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, changes in the position of device 600 or a component of device 600, the presence or absence of user contact with device 600, the orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0140] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0141] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the information receiving method described above.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of the device 600 to complete the information receiving method described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0143] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0144] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0145] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. 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. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0146] The methods and apparatus provided in the embodiments of this disclosure have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this disclosure. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this disclosure. Therefore, the content of this specification should not be construed as a limitation of this disclosure.

Claims

1. An image recognition method, characterized in that, The method includes: Identify the object to be identified in the image, and determine a reference position on the object to be identified; The identification area is determined based on the reference location; Attempt to identify a circular region within the identified area; If the circular region is not identified within the identification area, the position of the identification area is shifted, and an attempt is made to identify the circular region within the shifted identification area.

2. The method according to claim 1, characterized in that, The method further includes: Determine the standard identification parameters for the circular region; Wherein, attempting to identify a circular region within the identification area includes: The system attempts to identify a circular region within the recognition area based on the standard recognition parameters.

3. The method according to claim 1, characterized in that, The step of attempting to identify a circular region within the identification area includes: If the circular region is identified within the identification area, the number of the identified circular regions is determined; When the quantity is 1, the circular region is determined as the recognition result; When there are multiple such regions, one circular region is selected as the identification result from the multiple identified circular regions.

4. The method according to claim 3, characterized in that, The method further includes: Determine the reference radius of the circular region; The step of determining a circular region as the recognition result from the identified multiple circular regions includes: Determine the difference between the radius of each of the plurality of circular regions and the reference radius; Based on the multiple differences, a circular region is determined from the multiple circular regions as the recognition result.

5. The method according to claim 4, characterized in that, The step of determining a circular region as the recognition result from the multiple circular regions based on the multiple differences includes: Among the plurality of differences, the circular region corresponding to the difference that is less than a first difference threshold is determined as the recognition result.

6. The method according to claim 5, characterized in that, The step of determining the circular region corresponding to the difference less than a first difference threshold among the plurality of differences as the recognition result includes: In the circular regions corresponding to differences less than the first difference threshold, the circular region corresponding to the smallest difference is determined as the recognition result.

7. The method according to claim 5, characterized in that, The method further includes: If all the differences are greater than the first difference threshold, the recognition parameters for the circular region are adjusted. Based on the adjusted recognition parameters, an attempt is made to recognize a circular region within the recognition area, and the recognition result is determined from the recognized circular region.

8. An image recognition device, characterized in that, The device includes: The determining unit is configured to determine an object to be identified in an image, and to determine a reference position on the object to be identified; and to determine a recognition region based on the reference position. The identification unit is configured to attempt to identify a circular region within the identification area; The offset unit is configured to offset the position of the identification area if the circular area is not identified within the identification area, and then attempt to identify the circular area within the offset identification area.

9. An electronic device, characterized in that, include: Processor, memory; The memory is used to store computer programs; The processor is configured to execute the image recognition method as described in any one of claims 1-7 by invoking the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the image recognition method according to any one of claims 1-7.