Image recognition method, device, computer equipment and storage medium

Through the layer-by-layer recognition strategy of image pyramid, using layer-by-layer comparison of feature values and feature vectors, the accuracy problem of image recognition in the prior art when there are many noises or features are not obvious is solved, and higher recognition accuracy and faster recognition speed are achieved.

CN115965799BActive Publication Date: 2025-08-15WUHAN HUAGONG SAIBAI DATA SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211578085.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-08-15
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

In the case of excessive noise or lack of obvious characteristics, the matching accuracy cannot be guaranteed, and there are identification errors and inaccuracies.

Method used

The image pyramid layer-by-layer recognition strategy is adopted. By obtaining the feature values and feature vectors of the image to be identified and the target image, the image pyramid layer-by-layer recognition strategy is used for matching, including filtering processing, binarization processing and coordinate matrixing, the feature values and feature vectors are compared layer-by-layer to identify positions.

Benefits of technology

It improves the accuracy and stability of image recognition, shortens the recognition time, and improves the recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115965799B_ABST
    Figure CN115965799B_ABST
Patent Text Reader

Abstract

The present application relates to an image recognition method, apparatus, computer device, and storage medium. The method comprises: obtaining to-be-recognized feature values and to-be-recognized feature vectors for each layer of a first image pyramid containing a set of to-be-recognized points in an image to be recognized; parsing and converting image data in a preset format to generate a target image; obtaining target feature values and target feature vectors for each layer of a second image pyramid containing a set of target points in the target image; and identifying the location of the target image in the image to be recognized using a layer-by-layer recognition strategy based on the to-be-recognized feature values, the to-be-recognized feature vectors, the target feature values, and the target feature vectors, wherein the first and second image pyramids have the same number of layers. This method can improve image recognition accuracy, reduce recognition time, and increase recognition efficiency.
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 technology, and in particular to an image recognition method, apparatus, computer device, and storage medium. Background Art

[0002] With the rapid development of AI and image processing technology, and with the continuous diversification and popularization of application scenarios, higher requirements are placed on the accuracy, stability and processing efficiency of image processing technology.

[0003] The existing image processing method is the template matching positioning method, which is based on grayscale changes, correlation, shape, component and other methods, and obtains the result through processing a single feature. However, the matching accuracy cannot be guaranteed when there is a lot of noise or the features are not obvious, and matching errors and inaccuracies may occur. Summary of the Invention

[0004] Based on this, it is necessary to provide an image recognition method, device, computer equipment and storage medium that can improve the accuracy of image recognition in response to the above technical problems.

[0005] In a first aspect, the present application provides an image recognition method. The method comprises:

[0006] Obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified point set of the to-be-identified image in each layer of the pyramid image in the first image pyramid;

[0007] Parse and convert image data in a preset format to generate a target image;

[0008] Obtain target feature values and target feature vectors of each layer of pyramid images in the second image pyramid of the target point set of the target image;

[0009] An image pyramid layer-by-layer recognition strategy is used to identify a position of the target image in the image to be recognized based on the feature value to be recognized, the feature vector to be recognized, the target feature value, and the target feature vector, wherein the first image pyramid and the second image pyramid have the same number of layers.

[0010] In one embodiment, the to-be-identified point set includes at least one to-be-identified sub-point set; and identifying the position of the target image in the to-be-identified image based on the to-be-identified feature value, the to-be-identified feature vector, the target feature value, and the target feature vector using the image pyramid layer-by-layer recognition strategy includes:

[0011] Using an image pyramid recognition strategy from top to bottom, obtaining a region to be recognized on an i-th layer pyramid image of the image to be recognized, and comparing the feature values to be recognized and the feature vectors to be recognized of each set of sub-points to be recognized in the region to be recognized with the target feature values and the target feature vectors corresponding to the i-th layer pyramid image of the target image;

[0012] According to the comparison result, a position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be recognized is identified.

[0013] In one embodiment, identifying the position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be identified according to the comparison result includes:

[0014] If the comparison result satisfies a preset condition, the position of the sub-point set to be identified is used as the position of the i-th pyramid image of the target image, wherein the preset condition is that the similarity between the feature value to be identified and the target feature value of the sub-point set to be identified is greater than a first threshold, and the similarity between the feature vector to be identified and the target feature vector is greater than a second threshold;

[0015] If the comparison result does not satisfy the preset condition, the position coordinates of the to-be-identified sub-point set are used as the to-be-identified region of the (i-1)th pyramid image layer of the to-be-identified image, and the operation of comparing the to-be-identified feature values and the to-be-identified feature vectors of each of the to-be-identified sub-point sets in the to-be-identified region with the target feature values and the target feature vectors corresponding to the i-th layer of the target image is repeatedly performed until the comparison result satisfies the preset condition.

[0016] In one embodiment, a method for obtaining the to-be-recognized area of the top pyramid image of the to-be-recognized image includes:

[0017] Acquire a recognition window of a preset resolution according to the resolution of the top pyramid image of the target image;

[0018] Sliding the recognition window on the top pyramid image of the image to be recognized according to a preset moving route;

[0019] Comparing the to-be-identified feature value and the to-be-identified feature vector of each to-be-identified sub-point set within each recognition window with the target feature value and the target feature vector of the top pyramid image of the target image, respectively;

[0020] If a comparison result between the set of sub-points to be identified within the recognition window and the target feature values and the target feature vectors of the top-level pyramid image of the target image satisfies the preset condition, the recognition window is used as the region to be identified of the top-level pyramid image of the target image.

[0021] In one embodiment, obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified point set of the to-be-identified image in each layer of the pyramid image in the first image pyramid includes:

[0022] Acquire the image to be identified, and perform filtering and binarization processing on the image to be identified;

[0023] Obtaining the feature points of the image to be identified after binarization processing to generate the point set to be identified;

[0024] For each layer of the first image pyramid, performing matrix processing on the coordinate values of the to-be-identified point set to generate a to-be-identified point set matrix;

[0025] The eigenvalues of the matrix of the point set to be identified are the eigenvalues to be identified, and the eigenvectors of the matrix of the point set to be identified are the eigenvectors to be identified.

[0026] In one embodiment, parsing and converting the image data in a preset format to generate a target image includes:

[0027] Decoding the image data in the preset format to form a plurality of image primitives;

[0028] Classifying the graphic elements according to closed graphic combination rules to generate at least one graphic element group;

[0029] Classifying each of the graphic element groups according to a category classification rule to generate at least one part graphic;

[0030] The image data in the preset format is converted into a nesting image, and the nesting image is recognized and processed according to each of the part graphics to generate the target image.

[0031] In one embodiment, the step of obtaining target feature values and target feature vectors of each pyramid image layer in the second image pyramid for the target point set of the target image includes:

[0032] performing binarization processing on the target image;

[0033] Acquire the feature points of the target image after binarization processing to generate the target point set;

[0034] For each layer in the second image pyramid, matrixing the coordinate values of the target point set to generate a target point set matrix;

[0035] The eigenvalue of the target point set matrix is the target eigenvalue, and the eigenvector of the target point set matrix is the target eigenvector.

[0036] In a second aspect, the present application further provides an image recognition device. The device comprises:

[0037] A recognition feature extraction module is used to obtain the feature values and feature vectors of the to-be-recognized points of the to-be-recognized image in each layer of the first image pyramid;

[0038] A target image generation module is used to parse and convert image data in a preset format to generate a target image;

[0039] A target feature extraction module is used to obtain target feature values and target feature vectors of target point sets of the target image in each layer of the pyramid image in the second image pyramid;

[0040] An image position recognition module, configured to use an image pyramid layer-by-layer recognition strategy to identify the position of the target image in the image to be recognized based on the feature value to be recognized, the feature vector to be recognized, the target feature value, and the target feature vector;

[0041] The first image pyramid and the second image pyramid have the same number of layers.

[0042] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any method described in the embodiments of the present application when executing the computer program.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any method described in the embodiments of the present application.

[0044] In a fifth aspect, the present application further provides a computer program product, comprising a computer program that, when executed by a processor, implements the steps of any method described in the embodiments of the present application.

[0045] The aforementioned image recognition method, apparatus, computer device, and storage medium convert the image to be recognized into a set of points to be recognized, the target image into a set of target points, and then compare the point sets to each other, thereby comparing the characteristic relationships between the points. This avoids inaccurate recognition due to unclear image features and improves recognition accuracy and stability through matching between point sets. Furthermore, layer-by-layer recognition is performed using an image pyramid, shortening image recognition time and improving recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 1 is a flow chart of an image recognition method according to an embodiment;

[0047] Figure 2 Schematic diagram of a process for a layer-by-layer recognition strategy of an image pyramid in one embodiment;

[0048] Figure 3 Schematic diagram of the process of a layer-by-layer recognition strategy of an image pyramid in another embodiment;

[0049] Figure 4 1 is a flow chart of a method for obtaining a region to be identified in a top-level pyramid image according to one embodiment;

[0050] Figure 5 is a flowchart of an image recognition method in another embodiment;

[0051] Figure 6 1 is a flow chart of an image recognition method in another embodiment;

[0052] Figure 7 A schematic flow chart of an image recognition method according to another embodiment;

[0053] Figure 8 is a structural block diagram of an image recognition device in one embodiment;

[0054] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0056] In one embodiment, Figure 1 As shown, an image recognition method is provided, comprising the following steps:

[0057] Step S100: obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified image in each layer of the pyramid image in the first image pyramid.

[0058] The image to be identified is an image requiring feature object recognition. The image to be identified can be a picture taken by a camera, and the camera can be an industrial camera. The point set to be identified is the point set corresponding to the object to be identified in the image to be identified. The feature values to be identified and the feature vectors to be identified of the point set can represent the geometric relationship between the point sets and thus the shape and size of the object to be identified. The point set to be identified, the feature values to be identified, and the feature vectors to be identified of each object to be identified are unique and different from those of other objects to be identified. The first image pyramid is a downsampling pyramid, which is formed by gradually reducing the resolution of the image to be identified using the original image to be identified as the bottom layer. The top layer of the first image pyramid has the lowest resolution. The resolution of each layer of the image to be identified in the first image pyramid is different, and the corresponding feature values to be identified and feature vectors to be identified are also different.

[0059] Step S200: parsing and converting the image data in a preset format to generate a target image.

[0060] The preset format may be a DXF format, and the image data in the preset format may be a nesting diagram in a DXF format. The nesting diagram is a parts arrangement diagram, and a nesting diagram is generated by arranging and combining several parts. The target image is an image of any part in the nesting diagram.

[0061] Step S300: obtaining target feature values and target feature vectors of the target point set of the target image in each layer of the pyramid image in the second image pyramid.

[0062] The target eigenvalues and target eigenvectors of the target point set can characterize the shape and size of the target image. Each target point set's target eigenvalues and target eigenvectors are unique and different from those of other target images. The second image pyramid is a downsampling pyramid, which uses the original target image as the bottom layer and gradually reduces the resolution of the target image to form an image pyramid. The top layer of the second image pyramid has the lowest resolution. Each target image layer in the second image pyramid has a different resolution, and the corresponding target eigenvalues and target eigenvectors are also different. The first and second image pyramids have the same number of layers.

[0063] Step S400: using an image pyramid layer-by-layer recognition strategy, identifying the position of the target image in the image to be recognized according to the feature value to be recognized, the feature vector to be recognized, the target feature value and the target feature vector.

[0064] This image recognition method converts the image to be recognized into a set of points to be recognized, the target image into a set of target points, and then compares the point sets to identify their characteristic relationships. This method avoids inaccurate recognition due to unclear image features and improves recognition accuracy and stability through point set matching. Furthermore, layer-by-layer recognition using an image pyramid can shorten image recognition time and improve efficiency.

[0065] like Figure 2 In one embodiment, the set of points to be identified includes at least one sub-set of points to be identified; step S400, using the layer-by-layer recognition strategy of the image pyramid, identifying the position of the target image in the image to be identified according to the feature value to be identified, the feature vector to be identified, the target feature value and the target feature vector, includes steps S410 to S420.

[0066] Step S410: Using an image pyramid recognition strategy from top to bottom, a to-be-recognized area is obtained on the i-th pyramid image layer of the to-be-recognized image, and the to-be-recognized feature values and the to-be-recognized feature vectors of each to-be-recognized sub-point set in the to-be-recognized area are compared with the target feature values and the target feature vectors corresponding to the i-th pyramid image layer of the target image.

[0067] The region to be recognized is a portion of the image to be recognized. The resolution of the region to be recognized can be the same as or different from the resolution of the i-th pyramid image of the target image. The set of points to be recognized includes at least one sub-set of points to be recognized. The image to be recognized includes multiple objects to be recognized, each corresponding to a sub-set of points to be recognized. The region to be recognized includes at least one sub-set of points to be recognized.

[0068] Step S420: identifying the position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be identified according to the comparison result.

[0069] In the above image recognition method, since the resolution of the image to be recognized is much higher than that of the target image, if all the sub-point sets to be recognized in the image to be recognized were matched with the target point set simultaneously, the amount of data processed simultaneously would be enormous, resulting in confusing recognition results or increased recognition time. By setting a region to be recognized and matching only the sub-point sets to be recognized in the region to be recognized with the target sub-point set, the amount of data processed simultaneously is reduced, thereby improving accuracy and recognition efficiency. The feature values and feature vectors of each sub-point set to be recognized in the region to be recognized in the i-th layer of the first image pyramid are compared with the target feature values and feature vectors of the i-th layer of the second image pyramid to identify the position of the i-th layer of the target image in the i-th layer of the pyramid image of the image to be recognized. The region to be recognized narrows the recognition range, reduces the number of sub-point sets to be recognized, and improves recognition speed. The comparison results of the multi-layer image pyramid are then used to improve recognition accuracy.

[0070] like Figure 3 In one embodiment, step S420 of identifying the position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be identified according to the comparison result includes steps S421 to S422.

[0071] Step S421: If the comparison result satisfies a preset condition, the position of the sub-point set to be identified is used as the position of the i-th pyramid image of the target image. The preset condition is that the similarity between the feature value to be identified and the target feature value of the sub-point set to be identified is greater than a first threshold, and the similarity between the feature vector to be identified and the target feature vector is greater than a second threshold.

[0072] The first threshold and the second threshold are both set values. In some embodiments, the first threshold and the second threshold may be the same or different, and are not limited herein. For example, if the first threshold and the second threshold are set to 0, the target image can be located on the original image of the image to be identified only when the i-th layer pyramid image is the bottom-level pyramid image, the to-be-identified feature value of the to-be-identified sub-point set is the same as the target feature value, and the to-be-identified feature vector is the same as the target feature vector. Alternatively, if the first threshold and the second threshold are set to small values, the i-th layer image pyramid is close to the bottom-level pyramid image. When the to-be-identified feature value of the to-be-identified sub-point set is close to the target feature value, and the to-be-identified feature vector is close to the target feature vector, the target image can be located on the i-th layer first image pyramid. Based on this location, the target image can be roughly located on the original image of the image to be identified.

[0073] Step S422: If the comparison result does not meet the preset condition, the position coordinates of the to-be-identified sub-point set are used as the to-be-identified region of the (i-1)th pyramid image of the to-be-identified image, and the operation of comparing the to-be-identified feature values and the to-be-identified feature vectors of each of the to-be-identified sub-point sets in the to-be-identified region with the target feature values and the target feature vectors corresponding to the i-th layer of the target image is repeatedly performed until the comparison result meets the preset condition.

[0074] The above-mentioned image recognition method uses the position coordinates of the set of to-be-recognized sub-points in the i-th layer as the to-be-recognized area on the i-1-th layer of the pyramid image. This method can gradually reduce the to-be-recognized area. Furthermore, the recognition results of the previous layer are used as a reference value to reduce the amount of recognition data in the layer being recognized and improve recognition accuracy. This reduces the amount of recognition data and recognition time in the entire recognition process, thereby improving recognition efficiency and accuracy.

[0075] like Figure 4 In one embodiment, the method for obtaining the to-be-recognized area of the top pyramid image of the to-be-recognized image includes steps S411 to S414.

[0076] Step S411: obtaining a recognition window of a preset resolution according to the resolution of the top pyramid image of the target image.

[0077] The preset resolution can be the same as or different from the resolution of the top pyramid image of the second image pyramid of the target image; it can be a multiple or a factor of the target image resolution; it can be higher or lower than the target image resolution by a preset value, without limitation. The top pyramid image is used for the first recognition, and the coordinates of the previously identified sub-point set are not included as the recognition area. Therefore, a recognition window can be set using the resolution of the top pyramid image of the target image as a reference to reduce the amount of data processed simultaneously.

[0078] Step S412: sliding the recognition window on the top pyramid image of the image to be recognized according to a preset movement route.

[0079] Generate a preset movement route based on the set movement step length and set movement direction.

[0080] Step S413: comparing the to-be-identified feature value and the to-be-identified feature vector of each to-be-identified sub-point set within each recognition window with the target feature value and the target feature vector of the top pyramid image of the target image respectively;

[0081] Step S414: If the comparison result between the sub-point set to be identified within the recognition window and the target feature value and the target feature vector of the top pyramid image of the target image meets the preset condition, the recognition window is used as the to-be-identified region of the top pyramid image of the target image to be identified.

[0082] The above-mentioned image recognition method divides the image to be recognized into multiple regions through the recognition window, and recognizes and matches one region at a time. This can reduce the amount of data processed simultaneously during the recognition process of the first layer of the image pyramid, thereby improving accuracy and recognition efficiency.

[0083] like Figure 5 In one embodiment, step S100 of obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified point set of the to-be-identified image in each layer of the pyramid image in the top image pyramid includes steps S110 to S130.

[0084] Step S110: Acquire the image to be identified, and perform filtering and binarization processing on the image to be identified.

[0085] Filtering is the process of suppressing noise in the image to be identified while preserving image details as much as possible. Binarization is the process of setting the grayscale value of the pixels in the image to be identified to 0 or 255, so that the image to be identified appears to be only black and white.

[0086] Step S120: Acquire the feature points of the image to be identified after binarization processing to generate the set of points to be identified.

[0087] All contours in the image to be identified are obtained according to the first-order gradient change or the second-order gradient, and all the extracted contour points are aggregated to generate a point set to be identified.

[0088] Step S130: For each layer in the first image pyramid, matrix processing is performed on the coordinate values of the to-be-identified point set to generate a to-be-identified point set matrix.

[0089] The formula Ax=cx is used to calculate the point set matrix to be identified for each layer of the pyramid. The eigenvalue of the point set matrix to be identified is the eigenvalue to be identified, and the eigenvector of the point set matrix to be identified is the eigenvector to be identified, where A is a matrix, c is an eigenvalue, and x is an eigenvector.

[0090] The above-mentioned image recognition method removes the noisy areas on the image to be identified by filtering to prevent the noise from affecting the subsequent recognition process, and then performs binarization to obtain all the contours of the image to be identified, thereby obtaining the feature points of all the contours to generate a set of points to be identified. By obtaining all the feature points in the image to be identified to generate a set of points to be identified, the feature values are obtained from the most basic points to avoid the occurrence of inaccurate recognition due to unclear features.

[0091] like Figure 6 In one embodiment, step 200 , parsing and converting the image data in a preset format to generate a target image includes steps S210 to S240 .

[0092] Step S210: decoding the image data in the preset format to form a plurality of image primitives.

[0093] The preset format can be DXF format, and the preset format image data can be a nesting diagram in DXF format, which is a parts arrangement diagram. All data in the DXF drawing is decoded according to the group code and the corresponding value of the group code, and decoded into primitives. Primitives are the smallest drawing units and include point primitives, line primitives, arc primitives, and circle primitives.

[0094] Step S220: Classify the graphic elements according to the closed graphic combination rule to generate at least one graphic element group.

[0095] The coordinate information of all graphics elements is obtained, and the closed graphics combination rule is to divide the graphics elements with strong correlation into graphics element groups according to the coordinate information and the positional relationship between the graphics elements.

[0096] Step S230: Classify each of the graphic element groups according to the category classification rules to generate at least one part graphic.

[0097] The classification rule is based on part inclusion relationships. That is, when one part contains another, they are separated into two separate part graphics. To save consumables, white space is minimized when generating nesting drawings, so often one part contains another. For example, consider a semi-arc part with a circular part in the middle of the semi-arc area. When using the closed shape combination rule for division, the two parts may be grouped together due to their close coordinate information and nested positions. In this case, the group needs to be decomposed into the semi-arc part graphics and the circular part graphics.

[0098] Step S240: converting the image data in the preset format into a nesting image, and performing recognition processing on the nesting image according to each of the part graphics to generate the target image.

[0099] The above-mentioned image recognition method separates all individual parts in the image data of a preset format into part graphics through closed graphic combination rules and category division rules, and then generates a nested image for the image data of the preset format according to the part graphics, and performs segmentation processing to generate a target image, which is an image of a single part. After selecting a target image, the selected target image is matched and identified in the image to be identified. The nested parts can be separated through closed graphic combination rules and category division rules to avoid the inability to identify individual parts without nested relationships in the image to be identified during the recognition process due to the nesting of parts.

[0100] like Figure 7 In one embodiment, step S300 of obtaining target feature values and target feature vectors of the target point set of the target image in each layer of the pyramid image in the second image pyramid includes steps S210 to S230.

[0101] Step S210: performing binarization processing on the target image;

[0102] Step S220: Acquire the feature points of the target image after binarization processing to generate the target point set;

[0103] Step S230 : For each layer in the second image pyramid, matrix processing is performed on the coordinate values of the target point set to generate a target point set matrix.

[0104] The target point set matrix of each layer of the pyramid is calculated using the formula Ax=cx, the eigenvalue of the target point set matrix is the target eigenvalue, and the eigenvector of the target point set matrix is the target eigenvector, wherein A is a matrix, c is an eigenvalue, and x is an eigenvector.

[0105] The above-mentioned image recognition method obtains all feature points of the target image through binarization, generates a target point set by obtaining all feature points in the target image, and obtains feature values from the most basic points to avoid inaccurate recognition caused by unclear features.

[0106] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0107] Based on the same inventive concept, embodiments of the present application also provide an image recognition device for implementing the aforementioned image recognition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more of the following image recognition device embodiments can be found in the above-described limitations on the image recognition method and will not be further elaborated here.

[0108] In one embodiment, Figure 8 As shown, an image recognition device 80 is provided, comprising: a recognition feature extraction module 81, a target image generation module 82, a target feature extraction module 83 and an image position recognition module 84, wherein:

[0109] The recognition feature extraction module 81 is used to obtain the feature values and feature vectors of the to-be-recognized points of the to-be-recognized image in each layer of the first image pyramid.

[0110] The target image generation module 82 is used to parse and convert the image data in a preset format to generate a target image;

[0111] A target feature extraction module 83 is used to obtain target feature values and target feature vectors of the target point set of the target image in each layer of the pyramid image in the second image pyramid;

[0112] The image position recognition module 84 is configured to utilize an image pyramid layer-by-layer recognition strategy to recognize the position of the target image in the image to be recognized based on the feature value to be recognized, the feature vector to be recognized, the target feature value, and the target feature vector.

[0113] In one embodiment, the image position identification module 84 is further configured to utilize an image pyramid recognition strategy from the top layer to the bottom layer to obtain a region to be identified on the i-th layer pyramid image of the image to be identified, compare the feature values to be identified and the feature vectors to be identified of each set of sub-points to be identified in the region to be identified with the target feature values and the target feature vectors corresponding to the i-th layer pyramid image of the target image, and identify the position of the i-th layer pyramid image of the target image in the i-th layer pyramid image of the image to be identified based on the comparison results.

[0114] In one embodiment, the image position identification module 84 is further configured to, if the comparison result satisfies a preset condition, use the position of the to-be-identified sub-point set as the position of the i-th pyramid image layer of the target image. The preset condition is that the similarity between the to-be-identified feature value of the to-be-identified sub-point set and the target feature value is greater than a first threshold, and the similarity between the to-be-identified feature vector and the target feature vector is greater than a second threshold. If the comparison result does not satisfy the preset condition, use the position coordinates of the to-be-identified sub-point set as the to-be-identified region of the i-1-th pyramid image layer of the to-be-identified image, and repeatedly compare the to-be-identified feature value and the to-be-identified feature vector of each of the to-be-identified sub-point sets in the to-be-identified region with the target feature value and the target feature vector corresponding to the i-th layer of the target image until the comparison result satisfies the preset condition.

[0115] In one embodiment, the image position recognition module 84 is further configured to obtain a recognition window of a preset resolution based on the resolution of the top-level pyramid image of the target image; slide the recognition window along a preset movement path on the top-level pyramid image of the image to be recognized; compare the to-be-recognized feature values and the to-be-recognized feature vectors of each of the to-be-recognized sub-point sets within each recognition window with the target feature values and the target feature vectors of the top-level pyramid image of the target image; and if the comparison result of the to-be-recognized sub-point set within the recognition window with the target feature values and the target feature vectors of the top-level pyramid image of the target image meets a preset condition, define the recognition window as the to-be-recognized region of the top-level pyramid image of the image to be recognized.

[0116] In one embodiment, the recognition feature extraction module 81 is further used to obtain the image to be recognized, and perform filtering and binarization processing on the image to be recognized; obtain the feature points of the image to be recognized after the binarization processing to generate the point set to be recognized; for each layer in the first image pyramid, perform coordinate value matrix processing on the point set to be recognized to generate a matrix of the point set to be recognized; wherein the eigenvalues of the matrix of the point set to be recognized are the eigenvalues to be recognized, and the eigenvectors of the matrix of the point set to be recognized are the eigenvectors to be recognized.

[0117] In one embodiment, the target image generation module 82 is also used to decode the image data in the preset format to form multiple graphic elements; classify each of the graphic elements according to the closed graphic combination rules to generate at least one graphic element group; classify each of the graphic element groups according to the type classification rules to generate at least one part graphic; convert the image data in the preset format into a nested image, and identify the nested image according to each of the part graphics to generate the target image.

[0118] In one embodiment, the target feature extraction module 83 is further used to perform binarization processing on the target image; obtain feature points of the target image after binarization processing to generate the target point set; for each layer in the second image pyramid, perform coordinate value matrix processing on the target point set to generate a target point set matrix; wherein the eigenvalue of the target point set matrix is the target eigenvalue, and the eigenvector of the target point set matrix is the target eigenvector.

[0119] Each module in the above-mentioned image recognition device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0120] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image recognition method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0121] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0122] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0123] Step S100: obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified pyramid images of each layer in the first image pyramid of the to-be-identified point set of the to-be-identified image;

[0124] Step S200: parsing and converting the image data in a preset format to generate a target image;

[0125] Step S300: obtaining target feature values and target feature vectors of each layer of pyramid images in the second image pyramid of the target point set of the target image;

[0126] Step S400: using an image pyramid layer-by-layer recognition strategy, identifying a position of the target image in the image to be recognized based on the eigenvalue to be recognized, the eigenvector to be recognized, the target eigenvalue, and the target eigenvector, wherein the first image pyramid and the second image pyramid have the same number of layers.

[0127] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0128] Step S100: obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified image in each layer of the pyramid image in the first image pyramid;

[0129] Step S200: parsing and converting the image data in a preset format to generate a target image;

[0130] Step S300: obtaining target feature values and target feature vectors of each layer of pyramid images in the second image pyramid of the target point set of the target image;

[0131] Step S400: using an image pyramid layer-by-layer recognition strategy, identifying a position of the target image in the image to be recognized based on the eigenvalue to be recognized, the eigenvector to be recognized, the target eigenvalue, and the target eigenvector, wherein the first image pyramid and the second image pyramid have the same number of layers.

[0132] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0133] Step S100: obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified image in each layer of the pyramid image in the first image pyramid;

[0134] Step S200: parsing and converting the image data in a preset format to generate a target image;

[0135] Step S300: obtaining target feature values and target feature vectors of each layer of pyramid images in the second image pyramid of the target point set of the target image;

[0136] Step S400: using an image pyramid layer-by-layer recognition strategy, identifying a position of the target image in the image to be recognized based on the eigenvalue to be recognized, the eigenvector to be recognized, the target eigenvalue, and the target eigenvector, wherein the first image pyramid and the second image pyramid have the same number of layers.

[0137] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0138] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0139] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An image recognition method, characterized in that: The method comprises: Obtaining the to-be-identified feature values and to-be-identified feature vectors of the to-be-identified point set of the to-be-identified image in each layer of the pyramid image in the first image pyramid; Parse and convert image data in a preset format to generate a target image; Obtain target feature values and target feature vectors of each layer of pyramid images in the second image pyramid of the target point set of the target image; An image pyramid layer-by-layer recognition strategy is used to identify a position of the target image in the image to be recognized based on the feature value to be recognized, the feature vector to be recognized, the target feature value, and the target feature vector, wherein the first image pyramid and the second image pyramid have the same number of layers.

2. The image recognition method according to claim 1, wherein: The to-be-recognized point set includes at least one to-be-recognized sub-point set; and identifying the position of the target image in the to-be-recognized image according to the to-be-recognized feature value, the to-be-recognized feature vector, the target feature value, and the target feature vector by using the image pyramid layer-by-layer recognition strategy includes: Using an image pyramid recognition strategy from top to bottom, obtaining a region to be recognized on an i-th layer pyramid image of the image to be recognized, and comparing the feature values to be recognized and the feature vectors to be recognized of each set of sub-points to be recognized in the region to be recognized with the target feature values and the target feature vectors corresponding to the i-th layer pyramid image of the target image; According to the comparison result, a position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be recognized is identified.

3. The image recognition method according to claim 2, wherein: The step of identifying, according to the comparison result, a position of the i-th level pyramid image of the target image in the i-th level pyramid image of the image to be identified, includes: If the comparison result satisfies a preset condition, the position of the sub-point set to be identified is used as the position of the i-th pyramid image of the target image, wherein the preset condition is that the similarity between the feature value to be identified and the target feature value of the sub-point set to be identified is greater than a first threshold, and the similarity between the feature vector to be identified and the target feature vector is greater than a second threshold; If the comparison result does not satisfy the preset condition, the position coordinates of the to-be-identified sub-point set are used as the to-be-identified region of the (i-1)th pyramid image layer of the to-be-identified image, and the operation of comparing the to-be-identified feature values and the to-be-identified feature vectors of each of the to-be-identified sub-point sets in the to-be-identified region with the target feature values and the target feature vectors corresponding to the i-th layer of the target image is repeatedly performed until the comparison result satisfies the preset condition.

4. The image recognition method according to claim 3, wherein: The method for obtaining the to-be-recognized area of the top pyramid image of the to-be-recognized image includes: Acquire a recognition window of a preset resolution according to the resolution of the top pyramid image of the target image; Sliding the recognition window on the top pyramid image of the image to be recognized according to a preset moving route; Comparing the to-be-identified feature value and the to-be-identified feature vector of each to-be-identified sub-point set within each recognition window with the target feature value and the target feature vector of the top pyramid image of the target image, respectively; If a comparison result between the set of sub-points to be identified within the recognition window and the target feature values and the target feature vectors of the top-level pyramid image of the target image satisfies the preset condition, the recognition window is used as the region to be identified of the top-level pyramid image of the target image.

5. The image recognition method according to claim 1, wherein: The step of obtaining the feature values and feature vectors of the pyramid images of each layer in the first image pyramid of the set of points to be identified in the image to be identified includes: Acquire the image to be identified, and perform filtering and binarization processing on the image to be identified; Obtaining the feature points of the image to be identified after binarization processing to generate the point set to be identified; For each layer of the first image pyramid, performing matrix processing on the coordinate values of the to-be-identified point set to generate a to-be-identified point set matrix; The eigenvalues of the matrix of the point set to be identified are the eigenvalues to be identified, and the eigenvectors of the matrix of the point set to be identified are the eigenvectors to be identified.

6. The image recognition method according to claim 1, wherein: The parsing and converting of the image data in a preset format to generate a target image includes: Decoding the image data in the preset format to form a plurality of image primitives; Classifying the graphic elements according to closed graphic combination rules to generate at least one graphic element group; Classifying each of the graphic element groups according to a category classification rule to generate at least one part graphic; The image data in the preset format is converted into a nesting image, and the nesting image is recognized and processed according to each of the part graphics to generate the target image.

7. The image recognition method according to claim 1, wherein: The step of obtaining target feature values and target feature vectors of the target point set of the target image in each layer of the pyramid image in the second image pyramid includes: performing binarization processing on the target image; Acquire the feature points of the target image after binarization processing to generate the target point set; For each layer in the second image pyramid, matrixing the coordinate values of the target point set to generate a target point set matrix; The eigenvalue of the target point set matrix is the target eigenvalue, and the eigenvector of the target point set matrix is the target eigenvector.

8. An image recognition device, characterized in that: The device comprises: A recognition feature extraction module is used to obtain the feature values and feature vectors of the to-be-recognized points of the to-be-recognized image in each layer of the first image pyramid; A target image generation module is used to parse and convert image data in a preset format to generate a target image; A target feature extraction module is used to obtain target feature values and target feature vectors of target point sets of the target image in each layer of the pyramid image in the second image pyramid; An image position recognition module, configured to use an image pyramid layer-by-layer recognition strategy to identify the position of the target image in the image to be recognized based on the feature value to be recognized, the feature vector to be recognized, the target feature value, and the target feature vector; The first image pyramid and the second image pyramid have the same number of layers.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Embossment optical image generation method and device, electronic equipment and storage medium

    CN114627105A

  • Apparatus and method for performing motion capture using a random pattern on capture surfaces

    US20070091178A1