Image recognition method, device and storage medium

By acquiring and comparing the RGB color value differences of initial feature points in the target image during augmented reality image recognition, the recognition feature points are determined, which solves the problems of insufficient feature points and the influence of camera position, and improves recognition efficiency.

CN116263992BActive Publication Date: 2025-11-04CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211292284.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2025-11-04
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

Existing augmented reality image recognition technologies cannot effectively recognize images with few feature points, and the camera position has a significant impact on recognition results and accuracy.

Method used

By acquiring the initial feature points of the target image, determining its location information and grid area, and using RGB color value difference comparison to determine the recognition feature points, the image recognition process is optimized.

Benefits of technology

It improves the recognition efficiency of augmented reality image recognition, reduces the impact of camera position, and lowers the limitations of feature point recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263992B_ABST
    Figure CN116263992B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image recognition method and related equipment, which can improve the recognition efficiency of augmented reality image recognition. The method comprises: acquiring N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1; determining position information of each initial feature point in the N initial feature points; determining a grid area corresponding to each initial feature point according to the position information of each initial feature point; determining a comparison result corresponding to each initial feature point according to an RGB color value of the grid area corresponding to each initial feature point; determining a recognition feature point corresponding to the target picture according to the comparison result corresponding to each initial feature point; and determining an image recognition result corresponding to the target picture according to the recognition feature point corresponding to the target picture.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image recognition, and in particular to an image recognition method and device and storage medium. BACKGROUND

[0002] The development of image recognition has experienced three stages: character recognition, digital image processing and recognition, and object recognition. The principle of augmented reality image recognition technology is feature point matching based on the OpenCV image integration library. The main steps are to combine the camera of the device, encapsulate the captured picture into a MAT format file, and compare it frame by frame with the target object in OpenCV: real-time comparison of the spatial positioning of the feature points of the two targets, obtaining the matching items between the two descriptor sets, and when the image matrix meets the corresponding item positioning, drawing the tracking contour of the corresponding model in space.

[0003] The SDKs for augmented reality image recognition mainly include ARKit developed by IOS, ARCore developed by Google AR, and Vuforia developed by Qualcomm AR. The above augmented reality SDKs all have image recognition functions, but there are still unsolved technical barriers in augmented reality image recognition technology.

[0004] Firstly, the core problem of the three SDKs is the inability to recognize pictures with few feature points. Since image recognition technology is based on the position matching of feature points, the distribution and reading of feature points greatly affect the success rate of image recognition. Therefore, the current augmented reality image recognition has certain limitations on the recognized objects. Secondly, since the augmented reality picture recognition technology only recognizes the x, y axis positions of feature points, i.e. the plane coordinate positions, the camera position has a serious impact on the recognition effect, accuracy and success rate. SUMMARY

[0005] The embodiments of the present application provide an image recognition method, device and storage medium, which can improve the recognition efficiency of augmented reality image recognition.

[0006] The first aspect of the present application provides an image recognition method, which can include:

[0007] Obtaining N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1;

[0008] Determining the position information of each initial feature point in the N initial feature points;

[0009] Determining the grid area corresponding to each initial feature point according to the position information of each initial feature point;

[0010] determine, according to the comparison result corresponding to each initial feature point, a recognition feature point corresponding to the target picture;

[0011] determine, according to the comparison result corresponding to each initial feature point, a recognition feature point corresponding to the target picture;

[0012] determine, according to the recognition feature point corresponding to the target picture, an image recognition result corresponding to the target picture.

[0013] A second aspect of the present application provides an image recognition device, comprising:

[0014] an acquisition unit configured to acquire N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1;

[0015] a position determination unit configured to determine position information of each initial feature point in the N initial feature points;

[0016] a grid determination unit configured to determine, according to the position information of each initial feature point, a grid region corresponding to each initial feature point;

[0017] a comparison result determination unit configured to determine, according to an RGB color value of the grid region corresponding to each initial feature point, a comparison result corresponding to each initial feature point, wherein the comparison result is a comparison result of a difference between RGB color values of two adjacent sub-grids in the grid region corresponding to each initial feature point and a color value comparison threshold value;

[0018] a feature point recognition unit configured to determine, according to the comparison result corresponding to each initial feature point, a recognition feature point corresponding to the target picture;

[0019] a feature point comparison unit configured to determine, according to the recognition feature point corresponding to the target picture, an image recognition result corresponding to the target picture.

[0020] In a possible design, the comparison result determination unit is specifically configured to:

[0021] determine a color value comparison threshold value corresponding to the target picture;

[0022] determine an RGB color value of each sub-grid in the grid region corresponding to each initial feature point;

[0023] The difference between the RGB color values of two adjacent sub-grids in the grid region corresponding to each initial feature point is compared with the color value comparison threshold to obtain the comparison result.

[0024] In a possible design, the comparison result determination unit is further specifically configured to:

[0025] The difference between the RGB color values of two adjacent sub-grids in a target grid region is compared with the color value comparison threshold by the following formula to obtain a first comparison result, the target grid region being a grid region corresponding to any one of the N initial feature points, and the two adjacent sub-grids being two edge-adjacent sub-grids in the target grid region:

[0026] |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0027] wherein R a1 , G a1 and B a1 are the RGB color values of one of the two edge-adjacent sub-grids, R a2 , G a2 and B a2 are the RGB color values of the other of the two edge-adjacent sub-grids, and n is the color value comparison threshold.

[0028] If the first comparison result does not satisfy a preset condition, the difference between the RGB color values of two adjacent sub-grids in the target grid region is compared with the color value comparison threshold by the following formula to obtain a second comparison result, the two adjacent sub-grids being two diagonally-adjacent sub-grids in the target grid region:

[0029] |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0030] wherein R a1 , G a1 and B a1 are the RGB color values of one of the two diagonally-adjacent sub-grids, R a2 , G a2 and B a2RGB color value of another one of the two diagonal adjacent sub-grids, n is a color value contrast threshold value;

[0031] The first comparison result and the second comparison result are the comparison result.

[0032] In a possible design, the feature point identification unit is specifically configured to:

[0033] If the first comparison result is that the difference between the RGB color values of the two edge adjacent sub-grids in the target grid region is greater than the color value contrast threshold value, the feature point corresponding to the target grid region is determined as the identified feature point.

[0034] If the first comparison result is that the difference between the RGB color values of the M groups of edge adjacent sub-grids in the target grid region is less than the color value contrast threshold value, and the second comparison result is that the difference between the RGB color values of the two diagonal adjacent sub-grids in the target grid region is less than the color value contrast threshold value, the feature point corresponding to the target grid region is invalidated, where M is an integer greater than or equal to 2.

[0035] If the first comparison result is that the difference between the RGB color values of the M groups of edge adjacent sub-grids in the target grid region is less than the color value contrast threshold value, and the second comparison result is that the difference between the RGB color values of the one group of diagonal adjacent sub-grids in the target grid region is greater than the color value contrast threshold value, the feature point corresponding to the target grid region is determined as the identified feature point.

[0036] In a possible design, the comparison result determination unit is specifically configured to:

[0037] Determine an augmented reality influencing factor corresponding to the target picture, the augmented reality influencing factor including contrast, brightness, and light intensity in an identified environment corresponding to the target picture.

[0038] Determine a color value contrast threshold value corresponding to the target picture according to the augmented reality influencing factor.

[0039] In a possible design, the grid determination unit is specifically configured to:

[0040] Determine a boundary range point corresponding to each initial feature point according to the position information of the initial feature point.

[0041] Determine a grid region corresponding to each initial feature point according to a region surrounded by the boundary range point corresponding to the initial feature point.

[0042] In a possible design, the feature point comparison unit is specifically configured to:

[0043] The feature point distribution corresponding to the identified feature points is compared with the N initial feature points to obtain flaw feature points, the flaw feature points being feature points that are not successfully identified or feature points with inaccurate identification positions among the N initial feature points.

[0044] The feature points that are not successfully identified and the feature points with inaccurate positions are corrected in coordinates to obtain corrected feature points.

[0045] The identified feature points and the corrected feature points are determined as the image recognition result.

[0046] The third aspect of the present application provides a computer readable storage medium, the computer readable storage medium storing at least one executable instruction, the executable instruction causing a computing device to execute the image recognition method according to the first aspect of the present application when the executable instruction is run on the computing device.

[0047] The fourth aspect of the present application discloses a computer program product, which causes a computer to execute the image recognition method according to the first aspect of the present application when the computer program product is run on the computer.

[0048] The fifth aspect of the present application discloses an application publishing platform, which is used for publishing a computer program product, wherein the computer program product causes a computer to execute the image recognition method according to the first aspect of the present application when the computer program product is run on the computer.

[0049] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:

[0050] When identifying a target image, the image recognition device can determine the position information of N initial feature points and determine the grid region corresponding to the position information of the N initial feature points, then determine the comparison result of each initial feature point according to the RGB color value of the corresponding grid, and further determine the identified feature point through the comparison result, and finally determine the image recognition result through the comparison between the identified feature point and the initial feature point. Therefore, the image recognition technology can be optimized and enhanced through the comparison of color values, and the recognition efficiency of the augmented reality image recognition can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0051] The accompanying drawings are included to provide a further understanding of the embodiments, and are incorporated in and constitute a part of this application. In the drawings, like reference numerals refer to like parts throughout the various drawings. In the drawings:

[0052] Figure 1 A flowchart of the image recognition method provided by the embodiments of the present application is shown;

[0053] Figure 2A schematic diagram for constructing an initial feature point coordinate system provided by an embodiment of the present application is shown in the following figure.

[0054] Figure 3 A schematic diagram of a grid region provided by an embodiment of the present application is shown in the following figure.

[0055] Figure 4 A schematic diagram of two sub-grids adjacent to each other provided by an embodiment of the present application is shown in the following figure.

[0056] Figure 5 A schematic diagram of two sub-grids diagonally adjacent to each other provided by an embodiment of the present application is shown in the following figure.

[0057] Figure 6 A virtual structure schematic diagram of an image recognition device provided by an embodiment of the present application is shown in the following figure.

[0058] Figure 7 A hardware structure schematic diagram of an image recognition device provided by an embodiment of the present application is shown in the following figure. DETAILED DESCRIPTION

[0059] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all should belong to the scope of protection of the present application.

[0060] With the rise of smart phones, augmented reality technology has a natural development carrier, and video augmented reality technology has rapidly developed. Based on the analysis of the image recognition technology feature anchor point position matching, the color value matching and color comparison of the target image are added, and the accuracy and success rate of the existing augmented reality technology image recognition function are optimized by combining the color value of the target image. The color value of the image integrated into the OpenCV image library is compared, and the similarity value is satisfied, which is a successful match. The results can be used to optimize the augmented reality image recognition technology, so that the augmented reality image recognition is no longer affected by the camera position, the feature limitation of the augmented reality recognized picture is reduced, and the recognition efficiency of the augmented reality image recognition is improved to a certain extent.

[0061] The image recognition method provided by the present application will be described in detail from the perspective of the image recognition device.

[0062] Please refer to Figure 1 , Figure 1 A flowchart of the image recognition method provided by an embodiment of the present application is shown in the following figure, which includes:

[0063] 101, obtaining N initial feature points corresponding to a target picture.

[0064] In this embodiment, the image recognition device can acquire N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1. Specifically, the target picture can be input into an augmented reality picture recognition system, and the RGB color value corresponding to the target picture is retained.

[0065] 102. Determine the position information of each initial point in the N initial feature points.

[0066] In this embodiment, the image recognition device can determine the position information of each initial feature point in the N initial feature points, which is represented in the form of coordinates (of course, the position information of each initial feature point can also be represented by other position representation forms, such as latitude and longitude, and the specific form is not limited). The following will be described in conjunction with Figure 2 , please refer to Figure 2 , Figure 2 The schematic diagram for constructing the initial feature point coordinate system provided by the embodiment of the present application, the image recognition device can establish and generate a two-dimensional plane rectangular coordinate system in space according to the augmented reality picture recognition technology, and perform gray picture recognition on the target picture to obtain the (x, y) coordinate value of each initial feature point in the N initial feature points corresponding to the target picture. Figure 2 In the following, the target picture is taken as an example including two initial feature points A and B, the coordinates of the initial feature point A are (X a , Y a ), and the coordinates of the initial feature point B are (X b , Y b ).

[0067] 103. Determine the grid area corresponding to each initial feature point according to the position information of each initial feature point.

[0068] In this embodiment, the image recognition device can determine the boundary range point corresponding to each initial feature point according to the position information of each initial feature point, and determine the area surrounded by the boundary range point corresponding to each initial feature point as the grid area corresponding to each initial feature point. The following will be described in conjunction with Figure 3 , please refer to Figure 3 , Figure 3 The schematic diagram of the grid area provided by the embodiment of the present application, taken as an example of the initial feature point A, the area surrounded by the 2x2 grid in the unit range of the initial feature point A in the plane direct coordinate system is taken as the grid area corresponding to the initial feature point A, that is, the 301 area, that is, the A1(x a-1 , y a-1 ), A2(x a-1 , y a+1 ), A3(x a+1 , ya-1 ), A4(x a+1 y a+1 The grid range with four points as boundary points is the same as the grid region 302 corresponding to the initial feature point B.

[0069] It should be noted that, Figure 3 The example used is a 2×2 grid, but it can also be a 3×3 grid; there are no specific limitations.

[0070] 104. Determine the comparison result corresponding to each initial feature point based on the RGB color value of the grid region corresponding to each initial feature point.

[0071] In this embodiment, the image recognition device can determine the comparison result corresponding to each initial feature point based on the RGB color values ​​of the grid region corresponding to each initial feature point. This comparison result is the comparison result of the difference in RGB color values ​​between two adjacent sub-grids in the grid region corresponding to each initial feature point and the color value comparison threshold. The following is a detailed explanation:

[0072] The image recognition device can first determine the color value contrast threshold corresponding to the target image. Specifically, it can determine the augmented reality (AR) influencing factors corresponding to the target image, including the contrast, brightness, and lighting intensity in the recognition environment. Based on these AR influencing factors, the color value contrast threshold corresponding to the target image is determined. That is, the user can set the color value contrast threshold based on specific factors affecting AR image recognition, such as the contrast, brightness, and lighting intensity in the recognition environment, thereby determining the number of feature points to be recognized. The default value is 100.

[0073] Simultaneously, determine the RGB color values ​​of each sub-grid within the grid region corresponding to each feature point, such as... Figure 3 As shown, taking initial feature point A as an example, the RGB color values ​​within a 2×2 grid within a unit range of initial feature point A are used for identification, and the R values ​​within four grids are obtained. a G a B a There are twelve color values ​​in total;

[0074] Finally, the difference in RGB color values ​​between two adjacent sub-grids within the grid region corresponding to each feature point is compared with the color value comparison threshold to obtain the comparison result. Specifically, the difference in RGB color values ​​between two adjacent sub-grids within the target grid region can be compared with the color value comparison threshold using the following formula to obtain the first comparison result. Here, the target grid region is the grid region corresponding to any one of the N initial feature points, and the two adjacent sub-grids are the two adjacent sub-grids within the target grid region:

[0075] R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0076] wherein, R a1 , G a1 and B a1 are RGB color values of one of the two edge-adjacent subgrids, R a2 , G a2 and B a2 are RGB color values of the other of the two edge-adjacent subgrids, and n is a color value contrast threshold value;

[0077] If the first comparison result does not satisfy the preset condition, the difference between the RGB color values of the two adjacent subgrids in the target grid region is compared with the color value contrast threshold value by the following formula to obtain a second comparison result, the two adjacent subgrids being two diagonally adjacent subgrids in the target grid region:

[0078] |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0079] wherein, R a1 , G a1 and B a1 are RGB color values of one of the two diagonally adjacent subgrids, R a2 , G a2 and B a2 are RGB color values of the other of the two diagonally adjacent subgrids, and n is a color value contrast threshold value;

[0080] The first comparison result and the second comparison result are both comparison results. The comparison result of the two edge-adjacent subgrids will be described below in combination with Figure 4

[0081] Please refer to Figure 4 , and take the initial feature point A and the grid region as a 2x2 grid as an example for description. The difference between the RGB color values of the two subgrids in the 401, 402, 403 and 404 grid regions is compared and calculated with the color value contrast threshold value by the following formulas (for the convenience of understanding, the two subgrids in the 401 grid region will be taken as an example for description below):

[0082] |R a1 -R a2|+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0083] wherein R a1 , G a1 and B a1 are the RGB color values of one of the two subgrids in the 401 grid area, R a2 , G a2 and B a2 are the RGB color values of the other of the two subgrids in the 401 grid area, and n is the color value comparison threshold; first, the difference between the RGB color values of the two subgrids in the 401 grid area is calculated, then the absolute values of the difference between the RGB color values are added, and the sum is compared with the color value comparison threshold n to obtain the first comparison result.

[0084] The comparison results of the two diagonally adjacent subgrids are described below, taking the initial feature point A and the grid area as a 2x2 grid as an example. The difference between the RGB color values of the two subgrids in 501 and 502 is compared with the color value comparison threshold by the following formulas (for ease of understanding, the two subgrids in the 501 grid area are taken as an example below): Figure 5 |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0085] wherein R a1 , G a1 and B a1 are the RGB color values of one of the two subgrids in the 501 grid area, R a2 , G a2 and B a2 are the RGB color values of the other of the two subgrids in the 501 grid area, and n is the color value comparison threshold; first, the difference between the RGB color values of the two subgrids in the 501 grid area is calculated, then the absolute values of the difference between the RGB color values are added, and the sum is compared with the color value comparison threshold n to obtain the first comparison result.

[0086] It can be understood that the two subgrids in the 401, 402, 403, 404 grid area are two edge-adjacent subgrids, and the two subgrids in the 501 grid area are two diagonally adjacent subgrids.

[0087] It can be understood that the two subgrids in the 401, 402, 403, 404 grid area are two edge-adjacent subgrids, and the two subgrids in the 501 grid area are two diagonally adjacent subgrids.

[0088] 105. Determine the identified feature point corresponding to the target picture according to the matching result corresponding to each initial feature point.

[0089] In this embodiment, after determining the matching result corresponding to each initial feature point, the image recognition device can determine the identified feature point corresponding to the target picture according to the matching result corresponding to each initial feature point, specifically as follows:

[0090] If the first matching result is that the difference between the RGB color values of the two edge-adjacent sub-grid regions in the target grid region is greater than the color value comparison threshold, the feature point corresponding to the target grid region is determined as the identified feature point;

[0091] If the first matching result is that there are M groups of edge-adjacent sub-grid regions in the target grid region whose RGB color values are less than the color value comparison threshold, and the second matching result is that the RGB color values of the two diagonally-adjacent sub-grid regions in the target grid region are both less than the color value comparison threshold, the feature point corresponding to the target grid region is discarded, where M is an integer greater than or equal to 2;

[0092] If the first matching result is that there are M groups of edge-adjacent sub-grid regions in the target grid region whose RGB color values are less than the color value comparison threshold, and the second matching result is that there is a group of diagonally-adjacent sub-grid regions in the target grid region whose RGB color values are greater than the color value comparison threshold, the feature point corresponding to the target grid region is determined as the identified feature point.

[0093] 106. Determine the image recognition result corresponding to the target picture according to the identified feature point corresponding to the target picture.

[0094] In this embodiment, after determining the identified feature point corresponding to the target picture, the image recognition device can first determine the feature point distribution map of the identified feature point, and then distribute the feature points corresponding to the identified feature point to the N initial feature points for comparison to obtain the flaw feature points, where the flaw feature points are the feature points that are not successfully identified and the feature points whose positions are not accurately identified among the N initial feature points; and the coordinates of the feature points that are not successfully identified and the feature points whose positions are not accurately identified are corrected to obtain the corrected feature points; the identified feature points and the corrected feature points are determined as the image recognition result.

[0095] In summary, it can be seen that in the embodiments provided in the present application, when the target picture is identified, the image recognition device can determine the position information of the N initial feature points, and determine the grid area corresponding to the position information of the N initial feature points, then determine the comparison result of each initial feature point according to the RGB color value of the corresponding grid, and then determine the identified feature point through the comparison result, and finally determine the image recognition result by comparing the identified feature point with the initial feature point. Therefore, the image recognition technology can be optimized and enhanced through the comparison of color values, and the recognition efficiency of augmented reality image recognition can be improved.

[0096] The above describes the embodiments of the present application from the image recognition method, and the following describes the embodiments of the present application from the perspective of the image recognition device:

[0097] Please refer to Figure 6 , Figure 6 The virtual structure schematic diagram of the image recognition device provided in the embodiments of the present application is shown in the following figure, and the image recognition device 600 includes:

[0098] The acquisition unit 601 is configured to acquire N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1;

[0099] The position determination unit 602 is configured to determine position information of each initial feature point in the N initial feature points;

[0100] The grid determination unit 603 is configured to determine a grid area corresponding to each initial feature point according to the position information of each initial feature point;

[0101] The comparison result determination unit 604 is configured to determine a comparison result corresponding to each initial feature point according to the RGB color value of the grid area corresponding to each initial feature point, and the comparison result is a comparison result of the difference value of the RGB color values of two adjacent sub-grids in the grid area corresponding to each initial feature point and the color value comparison threshold;

[0102] The feature point identification unit 605 is configured to determine an identified feature point corresponding to the target picture according to the comparison result corresponding to each initial feature point;

[0103] The feature point comparison unit 606 is configured to determine an image recognition result corresponding to the target picture according to the identified feature point corresponding to the target picture.

[0104] In a possible design, the comparison result determination unit 604 is specifically configured to:

[0105] determine a color value comparison threshold corresponding to the target picture;

[0106] Determine the RGB color values ​​of each sub-grid within the grid area corresponding to each initial feature point;

[0107] The difference in RGB color values ​​between two adjacent sub-grids within the grid area corresponding to each initial feature point is compared with the color value comparison threshold to obtain the comparison result.

[0108] In one possible design, the comparison result determination unit 604 is further specifically used for:

[0109] The difference in RGB color values ​​between two adjacent sub-grids within the target grid region is compared with the color value comparison threshold using the following formula to obtain a first comparison result. The target grid region is the grid region corresponding to any one of the N initial feature points, and the two adjacent sub-grids are two adjacent sub-grids within the target grid region:

[0110] |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0111] Among them, R a1 G a1 And B a1 R is the RGB color value of one of the two adjacent sub-grids of the edge. a2 G a2 And B a2 Let n be the RGB color value of the other sub-grid in the two sub-grids adjacent to the edge, and n be the color value comparison threshold.

[0112] If the first comparison result does not meet the preset conditions, the difference in RGB color values ​​between two adjacent sub-grids in the target grid region is compared with the color value comparison threshold using the following formula to obtain the second comparison result, wherein the two adjacent sub-grids are two diagonally adjacent sub-grids in the target grid region:

[0113] |R a1 -R a2 |+|G a1 -G a2 |+|B a1 -B a2 |≧n;

[0114] Among them, R a1 G a1 And B a1 R is the RGB color value of one of the two diagonally adjacent subgrids.a2 , G a2 and B a2 RGB color value of another one of the two diagonally adjacent sub-grids, n is a color value contrast threshold;

[0115] The first comparison result and the second comparison result are the comparison result.

[0116] In a possible design, the feature point identification unit 605 is specifically configured to:

[0117] If the first comparison result is that the differences between the RGB color values of the two edge-adjacent sub-grids in the target grid region are all greater than the color value contrast threshold, the feature point corresponding to the target grid region is determined as the identified feature point.

[0118] If the first comparison result is that the differences between the RGB color values of M groups of edge-adjacent sub-grids in the target grid region are less than the color value contrast threshold, and the second comparison result is that the differences between the RGB color values of the two diagonally adjacent sub-grids in the target grid region are all less than the color value contrast threshold, the feature point corresponding to the target grid region is invalidated, where M is an integer greater than or equal to 2.

[0119] If the first comparison result is that the differences between the RGB color values of M groups of edge-adjacent sub-grids in the target grid region are less than the color value contrast threshold, and the second comparison result is that the difference between the RGB color values of one group of diagonally adjacent sub-grids in the target grid region is greater than the color value contrast threshold, the feature point corresponding to the target grid region is determined as the identified feature point.

[0120] In a possible design, the comparison result determination unit 604 is specifically configured to:

[0121] determine an augmented reality influencing factor corresponding to the target picture, the augmented reality influencing factor including contrast, brightness, and light intensity in an identified environment corresponding to the target picture;

[0122] determine a color value contrast threshold corresponding to the target picture according to the augmented reality influencing factor.

[0123] In a possible design, the grid determination unit 603 is specifically configured to:

[0124] determine a boundary range point corresponding to each initial feature point according to the position information of the initial feature point;

[0125] determine a grid region corresponding to each initial feature point according to a region surrounded by the boundary range point corresponding to the initial feature point.

[0126] In a possible design, the feature point comparison unit 606 is specifically configured to:

[0127] compare the feature point distribution corresponding to the identified feature points with the N initial feature points to obtain flaw feature points, the flaw feature points being feature points that are not successfully identified or feature points with inaccurate positions among the N initial feature points;

[0128] perform coordinate correction on the feature points that are not successfully identified and the feature points with inaccurate positions to obtain corrected feature points;

[0129] determine the identified feature points and the corrected feature points as the image recognition result.

[0130] Embodiments of the present application further provide another image recognition apparatus, as shown in Figure 7 for the purpose of illustration, only parts related to the embodiments of the present application are shown, and specific technical details not disclosed are referred to the method part of the embodiments of the present application. The image recognition apparatus can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc. Taking the mobile phone as an example of the image recognition apparatus:

[0131] Figure 7 shown is a block diagram of part of the structure of the mobile phone related to the terminal provided by the embodiments of the present application. Referring to Figure 7 , the mobile phone includes an RF (Radio Frequency) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a WiFi (wireless fidelity) module 770, a processor 780, and a power supply 790, etc. Those skilled in the art can understand that the structure of the mobile phone shown in Figure 7 does not constitute a limitation on the mobile phone, and can include more or fewer components than those shown, or combine certain components, or have different arrangement of components.

[0132] The various constituent components of the mobile phone will be specifically introduced below with reference to Figure 7 :

[0133] The RF circuit 710 can be used for receiving and sending signals in the process of information or communication, especially, receiving the downlink information from the base station and processing by the processor 780; in addition, sending the uplink data to the base station. Generally, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to global system for mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.

[0134] The memory 720 can be used to store software programs and modules, and the processor 780 can execute various function applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 720 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0135] The input unit 730 can be used to receive input digital or character information, and to generate key signal input with respect to user setting of the mobile phone and control of the function. Specifically, the input unit 730 can include a touch panel 731 and other input device 732. The touch panel 731, also called a touch screen, can collect a touch operation (such as an operation of a user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 731) of the user on or near it, and drive a corresponding connection device according to a pre-set program. Optionally, the touch panel 731 can include two parts of a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts it into touch coordinates, and then sends it to the processor 780, and can receive the command from the processor 780 and execute it. In addition, the touch panel 731 can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch panel 731, the input unit 730 can also include other input device 732. Specifically, the other input device 732 can include one or more of a physical keyboard, a function key (such as a volume control button, an on-off button, etc.), a trackball, a mouse, a joystick, etc.

[0136] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 can include a display panel 741, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 731 can cover the display panel 741, and when the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of touch event. Although in the above embodiment, the touch panel 731 and the display panel 741 are realized as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone. Figure 7

[0137] ​The phone can also include at least one sensor 750, such as an optical sensor, a motion sensor, and other sensors. Specifically, the optical sensor can include an ambient light sensor to adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor to turn off the display panel 741 and / or the backlight when the phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (usually three axes), and when at rest, the magnitude and direction of gravity, which can be used for applications such as identifying the phone posture (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like. As for other sensors that the phone can also be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, will not be described here.

[0138] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the phone. The audio circuit 760 can convert the received audio data into an electrical signal and transmit it to the speaker 761, which converts the electrical signal into a sound signal and outputs it; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, which is then processed by the processor 780 and transmitted to another phone via the RF circuit 710, or output to the memory 720 for further processing.

[0139] WiFi is a short-range wireless transmission technology. The WiFi module 770 can help users send and receive emails, browse web pages, and access streaming media, and it provides users with wireless broadband Internet access. Although Figure 7 Although the WiFi module 770 is shown, it is understood that it is not a necessary component of the phone and can be omitted without changing the essence of the application.

[0140] The processor 780 is the control center of the phone, which connects all parts of the phone through various interfaces and lines, executes various functions of the phone and processes data by running or executing software programs and / or modules stored in the memory 720 and calling data stored in the memory 720, and thus monitors the phone as a whole. Optionally, the processor 780 can include one or more processing units; preferably, the processor 780 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It is understood that the above-mentioned modem processor can also not be integrated into the processor 780.

[0141] The mobile phone further includes a power supply 790 (such as a battery) for supplying power to each component. Preferably, the power supply is logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management.

[0142] Although not shown, the mobile phone can further include a camera, a Bluetooth module, and the like, which will not be described herein.

[0143] In the example of the present application, the processor 780 included in the terminal can further perform the operations described above as being performed by the image recognition apparatus.

[0144] The present application further provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a computing device, the computing device performs the image recognition method described in any of the embodiments.

[0145] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product.

[0146] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk, SSD)), etc.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, apparatuses, and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.

[0148] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0149] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0150] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0151] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0152] The above embodiments are merely used to describe the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An image recognition method characterized by, The method comprises the following steps: acquiring N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1; determining position information of each initial feature point in the N initial feature points; determining a grid region corresponding to each initial feature point according to the position information of each initial feature point; determining a comparison result corresponding to each initial feature point according to an RGB color value of the grid region corresponding to each initial feature point, wherein the comparison result is a comparison result of a difference between RGB color values of two adjacent sub-grid regions in the grid region corresponding to each initial feature point and a color value comparison threshold, and the color value comparison threshold is determined according to an augmented reality influencing factor corresponding to the target picture, and the augmented reality influencing factor comprises contrast, brightness, and light intensity in an identification environment corresponding to the target picture; determining an identification feature point corresponding to the target picture according to the comparison result corresponding to each initial feature point, wherein if a first comparison result is that the difference between the RGB color values of the two adjacent sub-grid regions in a target grid region is greater than the color value comparison threshold, the initial feature point corresponding to the target grid region is determined as the identification feature point; if a first comparison result is that the difference between the RGB color values of the two adjacent sub-grid regions in the target grid region is less than the color value comparison threshold, and a second comparison result is that the difference between the RGB color values of two diagonally adjacent sub-grid regions in the target grid region is greater than the color value comparison threshold, the initial feature point corresponding to the target grid region is determined as the identification feature point; and the target grid region is a grid region corresponding to any one of the N initial feature points; determining an image recognition result corresponding to the target picture according to the identification feature point corresponding to the target picture, wherein a feature point distribution corresponding to the identification feature point is compared with the N initial feature points to obtain a flaw feature point, the flaw feature point is an un-identified feature point and an inaccurate position feature point in the N initial feature points, a coordinate of the un-identified feature point and the inaccurate position feature point is corrected to obtain a corrected feature point, and the identification feature point and the corrected feature point are determined as the image recognition result.

2. The method of claim 1, wherein, The method comprises the following steps: determining a color value comparison threshold corresponding to the target picture; determining an RGB color value of each sub-grid in the grid region corresponding to each initial feature point; comparing the difference between the RGB color values of the two adjacent sub-grid regions in the grid region corresponding to each initial feature point with the color value comparison threshold to obtain the comparison result.

3. The method of claim 2, wherein, The method comprises the following steps: comparing the difference between the RGB color values of the two adjacent sub-grid regions in the grid region corresponding to each initial feature point with the color value comparison threshold to obtain the comparison result. The difference between the RGB color values of two adjacent sub-grids in the target grid region is compared with the color value comparison threshold by the following formula to obtain a first comparison result, the two adjacent sub-grids being two edge-adjacent sub-grids in the target grid region: | R a1 - R a2 | + | G a1 - G a2 | + | B a1 - B a2 | >= n; wherein R a1 , G a1 , and B a1 are the RGB color values of one of the two subgrids adjacent to the edge, R a2 , G a2 , and B a2 are the RGB color values of the other of the two subgrids adjacent to the edge, and n is the color value contrast threshold value; If the first comparison result does not satisfy a preset condition, the difference between the RGB color values of two adjacent sub-grids in the target grid region is compared with the color value comparison threshold by the following formula to obtain a second comparison result, the two adjacent sub-grids being two diagonal-adjacent sub-grids in the target grid region: | R a1 - R a2 | + | G a1 - G a2 | + | B a1 - B a2 | >= n; wherein R a1 , G a1 , and B a1 are the RGB color values of one of the two diagonally adjacent subgrids, R a2 , G a2 , and B a2 are the RGB color values of the other of the two diagonally adjacent subgrids, and n is the color value contrast threshold value; The first comparison result and the second comparison result are both the comparison results.

4. The method of claim 3, wherein, The method further comprises: If the first comparison result is that the differences between the RGB color values of M groups of edge-adjacent sub-grids in the target grid region are all less than the color value comparison threshold, and the second comparison result is that the differences between the RGB color values of two diagonal-adjacent sub-grids in the target grid region are both less than the color value comparison threshold, the initial feature point corresponding to the target grid region is invalidated, wherein M is an integer greater than or equal to 2.

5. The method according to any one of claims 1 to 4, characterized in that, The determination of the grid region corresponding to each initial feature point according to the position information of the initial feature point comprises: determining a boundary range point corresponding to each initial feature point according to the position information of the initial feature point; determining a region surrounded by the boundary range point corresponding to each initial feature point as the grid region corresponding to the initial feature point.

6. An image recognition apparatus characterized by comprising: It comprises: an acquisition unit configured to acquire N initial feature points corresponding to a target picture, wherein the target picture is a picture to be subjected to image recognition, and N is an integer greater than or equal to 1; a position determination unit configured to determine position information of each initial feature point in the N initial feature points; a grid determination unit configured to determine a grid region corresponding to each initial feature point according to the position information of the initial feature point; a comparison result determination unit configured to determine a comparison result corresponding to each initial feature point according to the RGB color values of the grid region corresponding to the initial feature point, the comparison result being a comparison result of the difference between the RGB color values of two adjacent sub-grids in the grid region corresponding to the initial feature point and a color value comparison threshold; wherein the color value comparison threshold is determined according to an augmented reality influencing factor corresponding to the target picture, and the augmented reality influencing factor comprises contrast, brightness, and light intensity in a recognition environment corresponding to the target picture. The feature point recognition unit is configured to determine a recognition feature point corresponding to the target picture according to a comparison result corresponding to each initial feature point; if the first comparison result is that the difference between the RGB color values of two adjacent edges of a target grid region is greater than the color value comparison threshold, the initial feature point corresponding to the target grid region is determined as the recognition feature point; if the first comparison result is that the difference between the RGB color values of two adjacent edges of M groups of the target grid region is less than the color value comparison threshold, and the second comparison result is that the difference between the RGB color values of two diagonally adjacent sub-grids of the target grid region is greater than the color value comparison threshold, the initial feature point corresponding to the target grid region is determined as the recognition feature point; the target grid region is a grid region corresponding to any one of the N initial feature points; The feature point comparison unit is configured to determine an image recognition result corresponding to the target picture according to the recognition feature point corresponding to the target picture, wherein the feature point distribution corresponding to the recognition feature point is compared with the N initial feature points to obtain a flaw feature point, the flaw feature point being an initial feature point that is not successfully recognized or an initial feature point with an inaccurate recognition position; the initial feature point that is not successfully recognized or the initial feature point with the inaccurate recognition position is corrected in position to obtain a corrected feature point; and the recognition feature point and the corrected feature point are determined as the image recognition result.

7. A computer program product, characterised in that, When the computer program product is run on a computer, the computer is caused to perform the image recognition method of any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one executable instruction, and the executable instruction, when run on a computing device, causes the computing device to perform the image recognition method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for recognizing rain-wind induced vibration waterline of stayed cable based on computer vision

    CN107339980A

  • Image processing system

    JP2013131941A