Image feature point matching method and device, computer equipment and storage medium
By performing deviation correction and screening matching between the feature point list of the image to be detected and the template feature point list, the problem of insufficient feature point matching accuracy in the existing technology is solved, and the accuracy of image correction and the reliability of detection are improved.
Patent Information
- Application Number
- CN202410639321.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the accuracy of direct feature point matching based on Euclidean distance is insufficient, resulting in inaccurate correction of the image to be detected, affecting detection accuracy.
An image feature point matching method is proposed, which corrects the deviation data between the detection feature point list and the template feature point list of the image to be detected, filters and matches the feature points, determines the target matching feature points, and reduces the differences between feature points. error.
It improves the accuracy of feature point matching, enhances the accuracy of image correction, and ensures the reliability of detection.
Smart Images

Figure CN118628772A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image feature point matching method, device, computer equipment and storage medium. Background Art
[0002] Computer vision is increasingly used in industrial inspection. When acquiring the image to be inspected, there is a deviation between the industrial camera and the object to be inspected, which causes the image to be inspected to be tilted. Therefore, it is necessary to correct the image to be inspected to improve the accuracy of the inspection.
[0003] In the related art, feature points of the image to be detected are directly matched according to the Euclidean distance, and then the image to be detected is corrected based on the matched feature points. However, the accuracy of the feature point matching method directly based on the Euclidean distance needs to be improved. Summary of the invention
[0004] The embodiments of this specification are intended to solve at least one of the technical problems in the related art to a certain extent. To this end, the embodiments of this specification propose an image feature point matching method, device, computer equipment and storage medium.
[0005] This specification provides a method for processing a data set, the method comprising:
[0006] Obtain a detection feature point list of an image to be detected; wherein the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list;
[0007] Correcting the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list;
[0008] Determining, in the correction feature point list, feature points to be verified that meet a preset distance screening condition according to distance data between the correction feature point in the correction feature point list and the template feature point;
[0009] Screening and matching are performed between the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
[0010] In one embodiment, the screening and matching between the correction feature point list and the template feature point list based on the feature point to be verified to determine the target matching feature point in the detection feature point list includes:
[0011] By screening and matching the correction feature point list with the template feature point list, determining whether to delete the feature point to be verified from the correction feature point list, and obtaining a retained correction point list;
[0012] The feature points in the retained correction point list are subjected to deviation restoration to obtain the target matching feature points.
[0013] In one embodiment, the determining whether to delete the feature point to be verified from the correction feature point list by screening and matching between the correction feature point list and the template feature point list includes:
[0014] Filtering the correction feature point list based on the feature points to be verified to obtain a filtered correction list;
[0015] Selecting template feature points in the template feature point list according to the distance data between the screened feature points in the screened correction list and the template feature points to obtain a selected template list;
[0016] Calculating the distance between feature points based on the screening correction list and the selection template list to determine a plurality of matching feature point pairs;
[0017] Summing the distance data between two feature points in the matching feature point pair to obtain a verification summary deviation;
[0018] If the verification summary deviation is less than the reference summary deviation, deleting the feature point to be verified;
[0019] If the verification summary deviation is not less than the reference summary deviation, the feature point to be verified is not deleted.
[0020] In one embodiment, the calculating the distance between feature points based on the screening correction list and the selection template list to determine a plurality of matching feature point pairs includes:
[0021] Correcting the screening correction list based on deviation data between the screening feature points in the screening correction list and the selected feature points in the selection template list to obtain a corrected screening list;
[0022] According to the distance data between the corrected filtered feature points and the selected feature points in the corrected filtered list, a plurality of matching feature point pairs are determined; wherein the matching feature point pairs include a corrected filtered feature point and a selected feature point having a minimum distance to the corrected filtered feature point.
[0023] In one embodiment, the reference summary deviation is determined by:
[0024] Determine a plurality of reference feature point pairs according to the distance data between the correction feature points in the correction feature point list and the template feature points; wherein the reference feature point pairs include a correction feature point and a template feature point having a minimum distance to the correction feature point;
[0025] Constructing a deviation distance list based on the minimum distance of each reference feature point pair;
[0026] The minimum distances in the deviation distance list are summed to obtain the reference summary deviation.
[0027] In one embodiment, the step of screening the correction feature point list based on the feature point to be verified to obtain a screened correction list includes:
[0028] The feature points to be verified are deleted from the correction feature point list to obtain the screened correction list.
[0029] In one embodiment, the number of feature points to be verified is at least one, and the at least one feature point to be verified constitutes a list to be verified; the method of screening and matching between the correction feature point list and the template feature point list to determine whether to delete the feature point to be verified from the correction feature point list to obtain a retained correction point list includes:
[0030] Traversing the feature points to be verified in the list to be verified, and filtering the correction feature point list based on any feature point to be verified in the list to be verified to obtain a filtered correction list;
[0031] The screened feature points in the screened correction list are matched with the template feature points in the template feature point list corresponding to the screened feature points to determine whether to delete any of the feature points to be verified from the correction feature point list.
[0032] In one embodiment, the deviation data includes the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation between the detection feature point and the template feature point; the detection feature point list is corrected based on the deviation data between the detection feature point in the detection feature point list and the template feature point in the template feature point list to obtain the corrected feature point list, including:
[0033] The minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation are used to perform coordinate correction on the detected feature points to obtain the corrected feature point list.
[0034] The embodiment of this specification provides an image feature point matching device, the device comprising:
[0035] A feature point list acquisition module is used to acquire a detection feature point list of an image to be detected; wherein the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list;
[0036] A feature point list correction module, used for correcting the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list;
[0037] A feature point screening module, used to determine the feature points to be verified that meet the preset distance screening conditions in the correction feature point list according to the distance data between the correction feature points in the correction feature point list and the template feature points;
[0038] The feature point matching module is used to screen and match the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
[0039] The present invention provides a computer device, which includes: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, and the instructions are executed by the one or more processors to enable the one or more processors to implement the steps of the method described in any one of the above-mentioned embodiments.
[0040] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.
[0041] The present invention provides a computer program product, wherein the computer program product includes instructions, and when the instructions are executed by a processor of a computer device, the computer device is enabled to execute the steps of the method described in any one of the above embodiments.
[0042] An embodiment of the present specification provides a chip, including a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit implements the steps of the method described in any of the above embodiments when executing the computer program.
[0043] In the above-mentioned embodiment of the specification, first, a detection feature point list of an image to be detected is obtained, and the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list. Then, the detection feature point list is corrected based on the deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a correction feature point list. Then, according to the distance data between the correction feature points and the template feature points in the correction feature point list, the feature points to be verified that meet the preset distance screening condition are determined in the correction feature point list. Finally, based on the feature points to be verified, screening and matching are performed between the correction feature point list and the template feature point list to determine the target matching feature points in the detection feature point list. The deviation data corrects the detection feature point list to reduce the error between the feature points. In the correction feature point list, according to the distance data between the correction feature points and the template feature points, it is determined whether the feature points to be verified that need to be further verified can be used for feature point pairing. Then, according to the feature points to be verified and the template feature point list, screening and matching are performed to determine the feature points to be verified that need to be retained, which helps to improve the accuracy of feature point matching, thereby determining more accurate target matching feature points in the detection feature point list. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1a A schematic diagram of the flow of an image feature point matching method provided in an embodiment of this specification;
[0045] Figure 1b A schematic diagram of the structure of a pre-trained object detection model provided in an embodiment of this specification;
[0046] Figure 2 A schematic diagram of a process for determining target matching feature points provided in an embodiment of this specification;
[0047] Figure 3 A flowchart of whether to delete a feature point to be verified from a correction feature point list provided in an embodiment of this specification;
[0048] Figure 4 A schematic diagram of a process for determining multiple matching feature point pairs provided in an embodiment of this specification;
[0049] Figure 5 A schematic diagram of a process for determining a reference summary deviation provided in an embodiment of this specification;
[0050] Figure 6 A schematic diagram of a process for obtaining a list of reserved calibration points provided in an embodiment of this specification;
[0051] Figure 7 A schematic diagram of the flow of an image feature point matching method provided in an embodiment of this specification;
[0052] Figure 8 A schematic diagram of an image feature point matching device provided in an embodiment of this specification;
[0053] Fig. 9 An internal structural diagram of a computer device provided for an embodiment of this specification. DETAILED DESCRIPTION
[0054] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0055] In the field of industrial inspection, the application of computer vision technology is becoming more and more common. Among them, one of the common application scenarios is to test the qualification of products. The product is photographed by the shooting device on the inspection equipment, and the electronic image obtained is transmitted to the inspection software for processing to test the qualification of the product. However, the function of the shooting device on some inspection equipment is relatively lagging, resulting in blurred electronic images. In addition, the angle of the shooting device on the inspection equipment or the placement of the product causes the perspective tilt or deformation of the electronic image taken. These situations bring difficulties to subsequent inspection and identification. Therefore, in view of the above situation, it is necessary to perform image correction on the electronic image taken to ensure the accuracy and reliability of subsequent inspections.
[0056] Before image correction, it is necessary to identify the feature points of the electronic image and match the feature points for subsequent image correction.
[0057] In the related art, feature points of the image to be detected are directly matched according to the Euclidean distance, and then the image to be detected is corrected based on the matched feature points. However, the accuracy of the feature point matching method directly based on the Euclidean distance needs to be improved.
[0058] Based on the above analysis, the embodiment of this specification provides an image feature point matching method. First, obtain a detection feature point list of an image to be detected, and the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list. Next, based on the deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list, the detection feature point list is corrected to obtain a correction feature point list. Then, according to the distance data between the correction feature points and the template feature points in the correction feature point list, the feature points to be verified that meet the preset distance screening conditions are determined in the correction feature point list. Finally, based on the feature points to be verified, screening and matching are performed between the correction feature point list and the template feature point list to determine the target matching feature points in the detection feature point list. The deviation data corrects the detection feature point list to reduce the error between the feature points. In the correction feature point list, according to the distance data between the correction feature points and the template feature points, determine whether the feature points to be verified that need further verification can be used for feature point pairing. Then, the feature points to be verified are screened and matched with the template feature point list to determine the feature points to be retained, which helps to improve the accuracy of feature point matching, thereby determining more accurate target matching feature points in the detection feature point list.
[0059] The image feature point matching method provided in the embodiments of the present specification can be applied to printed circuit board detection and recognition. Specifically, a camera is used to photograph a printed circuit board A to obtain an image to be detected. The holes on the image to be detected are detected to obtain position data of multiple detection frames. According to the position data of each detection frame, the center point of each detection frame is determined to form a detection feature point list [A10, A11, A12, ..., A111]. Printed circuit board A corresponds to a template image, and the template image corresponds to a template feature point list [A00, A01, A02, ..., A011] based on the position data of the hole. Using the detection feature point A10 and the template feature point list, the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation corresponding to the detection feature point A10 are determined. The detection feature point A10 is coordinate-corrected using the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation corresponding to the detection feature point A10 to obtain the correction feature point A20. The detection feature point list is traversed to determine the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation corresponding to each detection feature point in the detection feature point list. Use the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation corresponding to each detected feature point to perform coordinate correction to obtain a correction feature point list [A20, A21, A22, ..., A211]. Calculate the distance data between the correction feature points and the template feature points in the correction feature point list, and determine multiple reference feature point pairs including a correction feature point and a template feature point with the minimum distance to the correction feature point. Each reference feature point pair corresponds to a minimum distance, forming a deviation distance list [E00, E01, E02, ..., E011]. Sum the minimum distances in the deviation distance list, that is, E00+E01+E03+...+E011, to obtain a reference summary deviation S1. Compare each distance data in the deviation distance list [E00, E01, E02, ..., E011] with the preset threshold D1, and determine the correction feature points A21, A28 corresponding to the distance data greater than the preset threshold D1 as feature points to be verified, forming a list to be verified [A21, A28]. The feature point A21 to be verified is deleted from the correction feature point list to obtain a screening correction list [A20, A22, ..., A211]. Based on a plurality of reference feature point pairs including a correction feature point and a template feature point with the minimum distance to a correction feature point, the template feature point corresponding to each screening feature point in the screening correction list is determined to form a selection template list [A01, A02, ..., A011]. The screening correction list is corrected based on the deviation data between the screening feature points in the screening correction list and the selected feature points in the selection template list to obtain a corrected screening list [A30, A32, ..., A311]. The distance data between the corrected screening feature points and the selected feature points in the corrected screening list is calculated to determine a plurality of matching feature points including a corrected screening feature point and a selected feature point with the minimum distance to a corrected screening feature point.Each matching feature point pair corresponds to a minimum distance, forming a deviation distance list [E10, E12, E13, ..., E111]. The minimum distances in the deviation distance list are summed up, that is, E10+E12+E13+...+E111, to obtain the verification summary deviation S2. The verification summary deviation S2 is less than the reference summary deviation S1, and the feature point A21 to be verified is deleted to obtain a new correction feature point list [A20, A22, ..., A211]. The feature point A28 to be verified is deleted from the new correction feature point list [A20, A22, ..., A27, A28, A29, ..., A211] to obtain a new screening correction list [A20, A22, ..., A27, A29, ..., A211]. According to the reference feature point pair, the template feature point corresponding to each screening feature point in the screening correction list is determined to form a new selection template list [A01, A02, ..., A08, A07, ..., A011]. The screening correction list is corrected based on the deviation data between the screened feature points in the new screening correction list and the selected feature points in the new selection template list to obtain a new corrected screening list [A40, A42, ..., A47, A49, ..., A411]. The distance data between the corrected screened feature points and the selected feature points in the new corrected screening list is calculated to determine multiple matching feature point pairs. Each matching feature point pair corresponds to a minimum distance, forming a deviation distance list [E20, E22, ..., E27, E29, ..., E211]. The minimum distances in the deviation distance list are summed, that is, E20+E22+...+E27+E29+...+E211, to obtain the verification summary deviation S3. The verification summary deviation S3 is greater than the reference summary deviation S1, and the feature point A28 to be verified is retained to obtain a retained correction point list [A20, A22, ..., A27, A28, A29, ..., A211]. Based on the retained correction point list and the template feature point list, it is determined that there is no feature point to be verified. Finally, the feature points in the retained correction point list [A20, A22, …, A27, A28, A29, …, A211] are deviated and restored to obtain the target matching feature points [A10, A12, …, A17, A18, A19, …, A111].
[0060] This specification provides an image feature point matching method. Figure 1a , the method may include the following steps:
[0061] S110, obtaining a list of detection feature points of the image to be detected.
[0062] The image to be detected corresponds to a template image, and the template image corresponds to a template feature point list. The image to be detected may be an image containing an object to be detected. The template image may be a standard image captured by the object to be detected.
[0063] Specifically, an image acquisition device is used to shoot the object to be detected to obtain an image to be detected. Then, a pre-trained target detection model is used to perform target detection on the image to be detected, and the target object is identified in the image to be detected, so as to determine the image detection frame corresponding to the target object in the image to be detected, such as the image detection frame can be the minimum circumscribed rectangle corresponding to the target object. Next, for each image detection frame, its center point is calculated. The center point of each image detection frame is used as a detection feature point to form a detection feature point list. Among them, the image acquisition device can be any one of a camera, a video camera, a fisheye camera, and a surveillance camera. The pre-trained target detection model can be a neural network model that meets the real-time detection speed and the production speed of the production line. For example, the preset trained target detection model can be constructed and trained based on YOLO, Faster R-CNN, etc.
[0064] In order to more accurately identify the target object in the image to be detected, a reference image is needed to improve the accuracy. The reference image corresponding to the image to be detected is recorded as the template image. The template image is a standard image taken of the object to be detected. The target object is marked by using a rectangular box in the template image. For each rectangular box, its center point is calculated. The center point of each rectangular box is used as a template feature point to form a template feature point list.
[0065] Exemplarily, the object to be detected may be a printed circuit board (PCB). On the printed circuit board, the target object may be a hole on the printed circuit board. Generally, the holes on the printed circuit board are located at the four corners of the board and some specific middle positions. The printed circuit board is placed in a viewfinder, and the industrial camera in the viewfinder is fixed directly above the printed circuit board. The lighting in the viewfinder is multi-directional. The printed circuit board is photographed using the industrial camera in the viewfinder to obtain an image to be detected.
[0066] In some embodiments, the pre-trained object detection model can be a deep convolutional neural network trained based on yolov5. Figure 1b , Figure 1bThis is a schematic diagram of the network structure of a deep convolutional neural network trained based on yolov5. The network is mainly composed of a focus module, a CBL module (Conv-Bn-LeakyRelu, a convolutional block with batch normalization and leaky corrected linear units), a CSP module (Cross Stage Partial, cross-stage local network) including CSP1_x and CSP2_x, and an SPP module (Spatial Pyramid Pooling). Among them, the focus module mainly includes four parallel slice layers for processing input images. The CBL module includes a convolution layer, a batch normalization layer, and an activation function. The CSP1_x module includes a CBL module and x residual connection units. The CSP2_x module includes x CBL modules. The SPP module mainly includes three maxpool layers.
[0067] Before obtaining a deep convolutional neural network trained based on yolov5, a data set for training needs to be obtained. Specifically, annotators are required to annotate the original image containing the object to be detected (such as a printed circuit board). The annotators find the target object in the original image (such as a hole on a printed circuit board) and use a rectangular frame to select the target object along the outer edge of the target object. The original image with label information including the target object and the corresponding rectangular frame is divided into a training set and a test set in a ratio of 8:2. It should be noted that in order to improve the robustness and generalization ability of the model, the original image can be digitized (such as denoising, image enhancement, image filtering), and the original image can be flipped at random angles and mirrors. In addition, in order to simulate different shooting conditions and lighting problems, the original image can also be randomly edge filled, randomly inverted, and random noise added. It should be emphasized that the above data processing process can be performed in an offline environment.
[0068] After determining the data set for training, in order to accelerate model training and reasoning, it is necessary to control the image size in the data set within a reasonable range (for example, the image size is controlled within 1200*1000), which can reduce the amount of calculation when the model extracts image features, thereby improving the speed of training and reasoning. Therefore, the target detection model to be trained is constructed according to the demand standards, and then the constructed target detection model to be trained is trained using the data set. When the model training stop condition is reached, the trained target detection model is obtained. Exemplarily, the training parameters of the target detection model to be trained can be as follows: Lr (learning rate) = 0.0025, momentum (momentum) = 0.0009, weight_decay (weight decay) = 0.0001, optimizer (optimizer) = SGD (stochastic gradient descent), epoch (number of iterations) = 60, batchsize (batch size) = 4.
[0069] For the trained target detection model, the performance of the model is evaluated using the divided 20% test set. The evaluation indicators may include box accuracy (such as Intersection over Union (IoU)). Box accuracy can be an indicator of the model's ability to accurately locate the target object. After the evaluation is completed, the evaluation indicator data corresponding to the target detection model will be labeled. The target detection model corresponding to the highest evaluation indicator data is selected from multiple trained target detection models as the pre-trained target detection model in practical applications.
[0070] S120 , correcting the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list.
[0071] The detection feature points may be feature points corresponding to an image detection box corresponding to a target object identified in the image to be detected by the target detection model. The template feature points may be feature points corresponding to a rectangular box corresponding to a target object identified in the template image. The correction feature point list may be a new feature point list formed by correcting or adjusting the detected detection feature points. The deviation data may be a quantification of the difference between the detection feature points and the template feature points.
[0072] Specifically, for any detected feature point in the detected feature point list, the deviation data between the detected feature point and the template feature point in the template feature point list is calculated. Then, the detected feature point is corrected using the deviation data to obtain the corrected feature point of the detected feature point. Each detected feature point in the detected feature point list is traversed, and the deviation data corresponding to each detected feature point is used to correct it to obtain the corrected feature point corresponding to each detected feature point. The corrected feature points corresponding to each detected feature point in the detected feature point list constitute the corrected feature point list.
[0073] S130 . Determine, in the correction feature point list, feature points to be verified that meet a preset distance screening condition according to the distance data between the correction feature points in the correction feature point list and the template feature points.
[0074] The feature point to be verified may be a feature point that is considered to be likely to deviate greatly from the template feature point. The preset distance screening condition may be a condition used to control the matching accuracy during the feature point matching process, for example, the preset distance screening condition may be a threshold.
[0075] Specifically, a preset distance filtering condition is set according to actual conditions and requirements. For any correction feature point in the correction feature point list, calculate the distance data between the correction feature point and each template feature point in the template feature point list. Compare the distance data between the correction feature point and each template feature point in the template feature point list, determine the minimum distance data therein, and compare the minimum distance data with the preset distance filtering condition. If the comparison result indicates that the minimum distance data meets the preset distance filtering condition, the correction feature point is used as the feature point to be verified. If the comparison result indicates that the minimum distance data does not meet the preset distance filtering condition, determine whether the next correction feature point is the feature point to be verified. Traverse each correction feature point in the correction feature point list, repeat the above operation, and determine the feature point to be verified that meets the preset distance filtering condition in the correction feature point list.
[0076] Exemplarily, since the deviation between the image to be detected and the template image is generally not too large, the preset distance screening condition can be greater than the threshold value D1. When the minimum distance data between a certain correction feature point and a template feature point is greater than the threshold value D1, it is considered that the correction feature point has no matching template feature point in the template image, and the correction feature point is used as a feature point to be verified. When the minimum distance data between a certain correction feature point and a template feature point is not greater than the threshold value D1, it is considered that the correction feature point has a matching template feature point in the template image, and it is determined whether the next correction feature point is a feature point to be verified.
[0077] S140 , screening and matching are performed between the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
[0078] The target matching feature point may be a detection feature point having a matching template feature point in the template feature point list.
[0079] Specifically, according to the pre-set screening rules, the correction feature point list and the template feature point list are screened using the feature points to be verified to obtain the corresponding screened lists. Then, the correction feature point list and the template feature point list are matched based on the pre-set matching rules, and the correction feature points that meet the requirements in the correction feature point list are determined according to the matching results. Then, the correction feature points that meet the requirements are used to determine the corresponding detection feature points in the detection feature point list as target matching feature points. The target matching feature points are the matching template feature points that exist in the template feature point list.
[0080] It should be noted that the pre-set filtering rules can be used to select correction feature points that meet the standards in the correction feature point list. The pre-set filtering rules can be selected and defined according to specific application scenarios and requirements. For example, the pre-set filtering rules can be to directly delete the feature points to be verified from the correction feature point list, or to retain the correction feature points greater than the distance threshold based on the distance threshold.
[0081] In the above implementation, first, a detection feature point list of an image to be detected is obtained, and the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list. Next, the detection feature point list is corrected based on the deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a correction feature point list. Then, according to the distance data between the correction feature points and the template feature points in the correction feature point list, the feature points to be verified that meet the preset distance screening condition are determined in the correction feature point list. Finally, based on the feature points to be verified, screening and matching are performed between the correction feature point list and the template feature point list to determine the target matching feature points in the detection feature point list. The deviation data corrects the detection feature point list to reduce the error between the feature points. In the correction feature point list, according to the distance data between the correction feature points and the template feature points, it is determined whether the feature points to be verified that need to be further verified can be used for feature point pairing. Then, according to the feature points to be verified and the template feature point list, screening and matching are performed to determine the feature points to be verified that need to be retained, which helps to improve the accuracy of feature point matching, thereby determining more accurate target matching feature points in the detection feature point list.
[0082] In some embodiments, see Figure 2 , based on the feature points to be verified, screening and matching between the correction feature point list and the template feature point list to determine the target matching feature points in the detection feature point list may include the following steps:
[0083] S210 , determining whether to delete the feature points to be verified from the correction feature point list by screening and matching the correction feature point list and the template feature point list, thereby obtaining a retained correction point list.
[0084] S220 , performing deviation restoration on the feature points in the retained correction point list to obtain target matching feature points.
[0085] The retained correction point list may be a list of correction feature points that need to be retained after feature point screening and matching.
[0086] In some cases, the position of the detection feature points in the image to be detected cannot be accurately identified due to the inclination between the image acquisition device and the object to be detected when the image acquisition device acquires the image to be detected, or due to factors such as poor image quality and changes in lighting conditions. Therefore, it is necessary to use the ideal or expected coordinates, i.e., template feature points, to filter and match the correction feature point list in order to obtain more accurate feature points.
[0087] Specifically, the correction feature point list and the template feature point list are screened according to the pre-set screening rules to obtain the corresponding filtered lists. Next, the correction feature point list and the template feature point list are matched based on the corresponding filtered lists, and the matching results are compared with the pre-set deletion criteria. Then, according to the comparison results, it is determined whether to delete the feature points to be verified from the correction feature point list to obtain the retained correction point list. Since it is necessary to match the feature points of the image to be detected, and any feature point in the retained correction point list is a feature point obtained after data correction. Therefore, it is necessary to perform deviation restoration on any feature point in the retained correction point list to obtain the detection feature point corresponding to the feature point in the image to be detected and use it as the target matching feature point. Traverse each feature point in the retained correction point list, repeat the above operation, and obtain the target matching feature point corresponding to each feature point in the retained correction point list.
[0088] It should be noted that the pre-set filtering rules can be used to select the correction feature points that meet the standards in the correction feature point list. The pre-set filtering rules can be selected and defined according to specific application scenarios and requirements. For example, the pre-set filtering rules can be to directly delete the feature points to be verified from the correction feature point list, or to retain the correction feature points greater than the threshold based on the distance threshold. The pre-set deletion criteria can be used to determine which matching results meet the requirements so that the feature points to be verified can be deleted from the correction feature point list. The pre-set deletion criteria can be selected and defined according to specific application scenarios and requirements. For example, the pre-set deletion criteria can filter the correction list and the template feature points that match each filtered feature point in the template feature point list to ensure that the geometric relationship is in line with expectations.
[0089] In the above implementation, by screening and matching between the correction feature point list and the template feature point list, it is determined whether to delete the feature points to be verified from the correction feature point list, and a retained correction point list is obtained. The feature points in the retained correction point list are subjected to deviation restoration to obtain the target matching feature points, so as to realize the correction of the image to be detected.
[0090] In some embodiments, see Figure 3 , by screening and matching between the correction feature point list and the template feature point list, determining whether to delete the feature point to be verified from the correction feature point list may include the following steps:
[0091] S310 , filtering the correction feature point list based on the feature points to be verified to obtain a filtered correction list.
[0092] The filtered correction list may be a list consisting of filtered correction feature points.
[0093] Specifically, according to the pre-set screening rules, the feature points to be verified are used to screen out the correction feature points that meet the screening criteria from the correction feature point list as screening feature points, forming a screening correction list corresponding to the feature points to be verified. The pre-set screening rules can be used to select the correction feature points that meet the criteria from the correction feature point list, and the pre-set screening rules can be selected and defined according to specific application scenarios and requirements. For example, the pre-set screening rules can be to directly delete the feature points to be verified from the correction feature point list, or to retain the correction feature points greater than the threshold according to the distance threshold.
[0094] S320 , selecting template feature points in the template feature point list according to the distance data between the filtered feature points and the template feature points in the filtered correction list to obtain a selected template list.
[0095] The selected template list may be a group of feature points selected from the template feature point list based on the filtered correction list.
[0096] Specifically, by determining the distance data between any screening feature point in the screening correction list and each template feature point in the template feature point list, taking the minimum value, and selecting the template feature point corresponding to the minimum distance data from the template feature point list as the selected feature point corresponding to the screening feature point. Traverse each screening feature point in the screening correction list, repeat the above operation, and determine the selected feature point corresponding to each screening feature point. The selected feature points corresponding to each screening feature point in the screening correction list constitute the selected template list.
[0097] In some implementations, since the screening feature points are screened out from the correction feature point list and the correction feature points in the correction feature point list correspond to the template feature points that match them, based on any screening feature point in the screening correction list, according to the correction feature point corresponding thereto, the template feature point that matches the correction feature point is determined as the selection feature point corresponding to the screening feature point.
[0098] S330 , calculating the distance between feature points based on the screened correction list and the selected template list to determine a plurality of matching feature point pairs.
[0099] Specifically, the distance data between any selected feature point in the screening correction list and each selected feature point in the selection template list is calculated. The distance data between the screening feature point and each selected feature point in the selection template list is compared to determine the minimum distance data, and the two feature points corresponding to the minimum distance data are used as a matching feature point pair. Each screening feature point in the screening correction list is traversed, and the above operation is repeated to form multiple matching feature point pairs.
[0100] S340 , summing the distance data between two feature points in the matching feature point pair to obtain a verification summary deviation.
[0101] Specifically, each matching feature point pair consists of two feature points. Each matching feature point pair is traversed to determine the distance data between the two feature points in each matching feature point pair. The distance data of each matching feature point pair is added to achieve the summation operation of the distance data and obtain the verification summary deviation.
[0102] S350: If the verification summary deviation is less than the reference summary deviation, delete the feature point to be verified.
[0103] S360: If the verification summary deviation is not less than the reference summary deviation, the feature point to be verified is not deleted.
[0104] The verification summary deviation can be used to evaluate the accuracy of the feature point matching to be verified. The reference summary deviation can be used as a standard or threshold to evaluate the indicator of the matching quality of the feature point to be verified.
[0105] Specifically, a reference summary deviation is pre-set to measure whether the feature point to be verified needs to be deleted. If the verification summary deviation is less than the reference summary deviation, it is considered that the distance between the feature point to be verified and the standard feature point, that is, the template feature point, is large, which affects the accuracy of feature point matching, so it is necessary to delete the feature point to be verified from the correction feature point list. If the verification summary deviation is not less than the reference summary deviation, it is considered that the distance between the feature point to be verified and the standard feature point, that is, the template feature point, is close, which does not affect the accuracy of feature point matching, so it is not necessary to delete the feature point to be verified from the correction feature point list.
[0106] In the above implementation, the correction feature point list is screened based on the feature points to be verified to obtain a screened correction list, the template feature points in the template feature point list are selected according to the distance data between the screened feature points and the template feature points in the screened correction list to obtain a selected template list, the distance between the feature points is calculated based on the screened correction list and the selected template list, a plurality of matching feature point pairs are determined, the distance data between two feature points in the matching feature point pairs are summed to obtain a verification summary deviation, if the verification summary deviation is less than the reference summary deviation, the feature point to be verified is deleted, if the verification summary deviation is not less than the reference summary deviation, the feature point to be verified is not deleted, thereby improving the accuracy of feature point matching.
[0107] In some embodiments, see Figure 4 , calculating the distance between feature points based on the screening correction list and the selection template list, and determining multiple matching feature point pairs, can include the following steps:
[0108] S410 , correcting the screening correction list based on deviation data between the screening feature points in the screening correction list and the selected feature points in the selection template list to obtain a corrected screening list.
[0109] S420 , determining a plurality of matching feature point pairs according to distance data between the corrected filtered feature points and the selected feature points in the corrected filtered list.
[0110] The matching feature point pair includes a corrected screening feature point and a selected feature point having a minimum distance with a corrected screening feature point. The corrected screening list may be a list obtained after data correction is performed on the screening correction list. The corrected screening feature point may be a screening feature point after data correction.
[0111] In some cases, the image acquisition device cannot accurately identify the position of the detection feature points in the image to be detected due to the inclination between the image acquisition device and the object to be detected when the image acquisition device acquires the image to be detected, or due to factors such as poor image quality and changes in lighting conditions. Therefore, it is necessary to use ideal or expected coordinates, that is, select feature points to perform coordinate correction on the selected feature points in order to obtain more accurate feature points.
[0112] Specifically, for any screening feature point in the screening correction list, the deviation data between the screening feature point and the selected feature point in the selection template list is calculated. Then, the screening feature point is corrected using the deviation data to obtain a corrected screening feature point after the correction of the screening feature point. Each screening feature point in the screening correction list is traversed, and the deviation data corresponding to each screening feature point is used to correct it to obtain a corrected screening feature point corresponding to each screening feature point. The corrected screening feature points corresponding to each screening feature point in the screening correction list constitute a corrected screening list.
[0113] Calculate the distance data between any corrected screening feature point in the corrected screening list and each selected feature point in the selected template list. Compare the distance data between the corrected screening feature point and each selected feature point in the selected template list, determine the smallest distance data, and use the selected feature point corresponding to the smallest distance data as the feature point that matches the corrected screening feature point, thereby forming a matching feature point pair with the corrected screening feature point. Traverse each corrected screening feature point in the corrected screening list, repeat the above operation, determine the selected feature point that matches each corrected screening feature point, form a matching feature point pair corresponding to each corrected screening feature point, and thus obtain multiple matching feature point pairs.
[0114] In the above implementation, the filter correction list is corrected based on the deviation data between the filter feature points in the filter correction list and the selected feature points in the selection template list to obtain a corrected filter list, and multiple matching feature point pairs are determined based on the distance data between the corrected filter feature points and the selected feature points in the corrected filter list, thereby providing a data basis for subsequently determining whether to delete the feature points to be verified from the correction feature point list.
[0115] In some embodiments, see Figure 5 , the reference summary deviation is determined by:
[0116] S510 . Determine a plurality of reference feature point pairs according to distance data between the correction feature points and the template feature points in the correction feature point list.
[0117] The reference feature point pair includes a calibration feature point and a template feature point having a minimum distance with the calibration feature point.
[0118] Specifically, the distance data between any correction feature point in the correction feature point list and each template feature point in the template feature point list is calculated. The distance data between the correction feature point and each template feature point in the template feature point list is compared to determine the minimum distance data, and the template feature point corresponding to the minimum distance data is used as the feature point matching the correction feature point, thereby forming a reference feature point pair with the correction feature point. Each correction feature point in the correction feature point list is traversed, and the above operation is repeated to determine the template feature point matching each correction feature point, and form a reference feature point pair corresponding to each correction feature point, thereby obtaining multiple reference feature point pairs.
[0119] S520: Construct a deviation distance list based on the minimum distance of each reference feature point pair.
[0120] S530: Sum the minimum distances in the deviation distance list to obtain a reference summary deviation.
[0121] The deviation distance list may be a list consisting of distance data between the correction feature point and the template feature point in each reference feature point pair.
[0122] Specifically, each reference feature point pair consists of a correction feature point and a template feature point. According to any reference feature point pair, the distance data between the correction feature point and the template feature point in the feature point pair is determined as the minimum distance of the reference feature point pair. Each reference feature point is traversed, and the distance data between the correction feature point and the template feature point in each reference feature point pair is determined as the minimum distance of each reference feature point pair. The minimum distance of each reference feature point pair is constructed into a list as a deviation distance list. By adding the minimum distance of each reference feature point pair in the deviation distance list, the summation operation of the minimum distance is realized to obtain the reference summary deviation.
[0123] In the above implementation, multiple reference feature point pairs are determined based on the distance data between the correction feature points and the template feature points in the correction feature point list, a deviation distance list is constructed based on the minimum distance of each reference feature point pair, and the minimum distances in the deviation distance list are summed to obtain a reference summary deviation, thereby providing a data basis for subsequently determining whether to delete the feature points to be verified from the correction feature point list.
[0124] In some implementations, screening the correction feature point list based on the feature point to be verified to obtain the screened correction list may include: deleting the feature point to be verified from the correction feature point list to obtain the screened correction list.
[0125] Specifically, since the feature point to be verified is screened out from the correction feature point list, there is a correction feature point in the correction feature point list that is consistent with the feature point to be verified. The correction feature point list is traversed, and the correction feature point that is consistent with the feature point to be verified is determined in the correction feature point list, and the correction feature point is deleted from the correction feature point list. After deleting the correction feature point, the remaining correction feature points in the correction feature point list constitute the screened correction list.
[0126] In the above implementation, the feature points to be verified are deleted from the correction feature point list to obtain a screened correction list, which provides a data basis for subsequently determining a list of retained correction points, so as to improve the accuracy of feature point matching.
[0127] In some embodiments, see Figure 6 , there is at least one feature point to be verified, and the at least one feature point to be verified constitutes a list to be verified. By screening and matching between the correction feature point list and the template feature point list, determining whether to delete the feature point to be verified from the correction feature point list, and obtaining the retained correction point list, the following steps may be included:
[0128] S610 , traverse the feature points to be verified in the list to be verified, and filter the correction feature point list based on any feature point to be verified in the list to be verified to obtain a filtered correction list.
[0129] S620: Use the filtered feature points in the filtered correction list to match the template feature points in the template feature point list that correspond to the filtered feature points, and determine whether to delete any feature point to be verified from the correction feature point list.
[0130] Specifically, the list to be verified includes at least one feature point to be verified. According to a preset screening rule, any feature point to be verified in the list to be verified is used to screen out the correction feature points that meet the standard from the correction feature point list as screening feature points, so as to form a screening correction list corresponding to the feature point to be verified. According to any screening feature point in the screening correction list corresponding to the feature point to be verified, the template feature point that matches it in the template feature point list is determined. Each screening feature point in the screening correction list corresponding to the feature point to be verified is traversed to determine the template feature point that matches each screening feature point in the template feature point list. The screening correction list corresponding to the feature point to be verified is used to match the template feature point that matches each screening feature point in the template feature point list, and determine whether the matching result meets the preset deletion standard. If the matching result does not meet the preset deletion standard, the feature point to be verified is not deleted from the correction feature point list; if the matching result meets the preset deletion standard, the feature point to be verified is deleted from the correction feature point list, and a corrected feature point list corresponding to the feature point to be verified is obtained. The corrected feature point list corresponding to the feature point to be verified is used as the corrected feature point list of the next feature point to be verified, and then the above operation is repeated to determine whether to delete the next feature point to be verified from the corrected feature point list. Each feature point to be verified in the list to be verified is traversed, and the above operation is repeated to determine whether to delete the feature point to be verified from the corrected feature point list.
[0131] Exemplarily, based on any feature point to be verified in the list to be verified, the remaining correction feature points except the feature point to be verified are screened out from the correction feature point list as screening feature points to form a screening correction list corresponding to the feature point to be verified.
[0132] It should be noted that the pre-set filtering rules can be used to select the correction feature points that meet the standards in the correction feature point list. The pre-set filtering rules can be selected and defined according to specific application scenarios and requirements. For example, the pre-set filtering rules can be to directly delete the feature points to be verified from the correction feature point list, or to retain the correction feature points greater than the threshold based on the distance threshold. The pre-set deletion criteria can be used to determine which matching results meet the requirements so that the feature points to be verified can be deleted from the correction feature point list. The pre-set deletion criteria can be selected and defined according to specific application scenarios and requirements. For example, the pre-set deletion criteria can filter the correction list and the template feature points that match each filtered feature point in the template feature point list to ensure that the geometric relationship is in line with expectations.
[0133] In the above implementation, the feature points to be verified in the list to be verified are traversed, and based on any feature point to be verified in the list to be verified, the correction feature point list is screened to obtain a screened correction list, and the screened feature points in the screened correction list are matched with the template feature points in the template feature point list corresponding to the screened feature points to determine whether to delete any feature point to be verified from the correction feature point list. By traversing the feature points to be verified and determining whether to delete certain verification feature points based on the matching results, feature points that do not match the template feature points or have a low matching degree can be removed, thereby improving the accuracy of feature point matching.
[0134] In some embodiments, the deviation data includes a minimum horizontal axis coordinate deviation and a minimum vertical axis coordinate deviation between the detection feature point and the template feature point. Correcting the detection feature point list based on the deviation data between the detection feature point in the detection feature point list and the template feature point in the template feature point list to obtain a corrected feature point list may include: performing coordinate correction on the detection feature point using the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation to obtain a corrected feature point list.
[0135] The minimum horizontal axis coordinate deviation may be the minimum difference between the actual horizontal axis coordinate of the feature point, i.e., the horizontal axis coordinate of the detected feature point, and the ideal or expected horizontal axis coordinate, i.e., the horizontal axis coordinate of the template feature point, during the process of detecting the feature point. The minimum vertical axis coordinate deviation may be the minimum difference between the actual vertical axis coordinate of the feature point, i.e., the vertical axis coordinate of the detected feature point, and the ideal or expected vertical axis coordinate, i.e., the vertical axis coordinate of the template feature point, during the process of detecting the feature point.
[0136] In some cases, the position of the detection feature points in the image to be detected cannot be accurately identified due to the inclination between the image acquisition device and the object to be detected when the image acquisition device acquires the image to be detected, or due to factors such as poor image quality and changes in lighting conditions. Therefore, it is necessary to use the ideal or expected coordinates, that is, the coordinates of the template feature points, to calibrate the coordinates of the detection feature points in order to obtain more accurate coordinates of the feature points.
[0137] Specifically, for any detected feature point in the detected feature point list, the horizontal coordinate deviation between the horizontal coordinate of the detected feature point and the horizontal coordinate of each template feature point in the template feature point list and the vertical coordinate deviation between the vertical coordinate of the detected feature point and the vertical coordinate of each template feature point in the template feature point list are calculated. The horizontal coordinate deviation between the detected feature point and each template feature point in the template feature point list is compared, and the smallest horizontal coordinate deviation is determined as the minimum horizontal coordinate deviation. The vertical coordinate deviation between the detected feature point and each template feature point in the template feature point list is compared, and the smallest vertical coordinate deviation is determined as the minimum vertical coordinate deviation. Then, the coordinates of the detected feature point are corrected using the obtained minimum horizontal coordinate deviation and the minimum vertical coordinate deviation, and the corrected coordinates of the detected feature point are obtained as the corrected feature point. Each detected feature point in the detected feature point list is traversed, and the coordinates are corrected using the minimum horizontal coordinate deviation and the minimum vertical coordinate deviation corresponding to each detected feature point, so as to obtain the corrected feature point corresponding to each detected feature point. The corrected feature points corresponding to each detected feature point in the detected feature point list constitute the corrected feature point list.
[0138] Exemplarily, the horizontal axis coordinate of any detected feature point is subtracted from the horizontal axis coordinate of each template feature point in the template feature point list to obtain the horizontal axis coordinate deviation between the detected feature point and each template feature point in the template feature point list, and the minimum value is taken as the minimum horizontal axis coordinate deviation. The vertical axis coordinate of any detected feature point is subtracted from the vertical axis coordinate of each template feature point in the template feature point list to obtain the vertical axis coordinate deviation between the detected feature point and each template feature point in the template feature point list, and the minimum value is taken as the minimum vertical axis coordinate deviation. Then, the minimum horizontal axis coordinate deviation is subtracted from the horizontal axis coordinate of the detected feature point, and the minimum vertical axis coordinate deviation is subtracted from the vertical axis coordinate of the detected feature point to achieve coordinate correction of the detected feature point, and obtain the correction feature point corresponding to the detected feature point.
[0139] In the above implementation, the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation are used to perform coordinate correction on the detected feature points to obtain a correction feature point list, so as to reduce errors and improve the accuracy of coordinates.
[0140] This specification also provides an image feature point matching method. For example, see Figure 7 , the image feature point matching method may include the following steps:
[0141] S702: Obtain a list of detection feature points of the image to be detected.
[0142] The image to be detected corresponds to a template image, and the template image corresponds to a template feature point list.
[0143] S704 , coordinate correction is performed on the detected feature points using the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation between the detected feature points in the detected feature point list and the template feature points in the template feature point list to obtain a corrected feature point list.
[0144] S706: Determine a plurality of reference feature point pairs according to distance data between the correction feature points and the template feature points in the correction feature point list.
[0145] The reference feature point pair includes a calibration feature point and a template feature point having a minimum distance with the calibration feature point.
[0146] S708: Construct a deviation distance list based on the minimum distance of each reference feature point pair.
[0147] S710 . Sum the minimum distances in the deviation distance list to obtain a reference summary deviation.
[0148] S712: Determine, in the correction feature point list, feature points to be verified that meet a preset distance screening condition according to the distance data between the correction feature points in the correction feature point list and the template feature points.
[0149] There is at least one feature point to be verified, and the at least one feature point to be verified constitutes a list to be verified.
[0150] S714 , traverse the feature points to be verified in the list to be verified, and based on any feature point to be verified in the list to be verified, delete the feature point to be verified from the correction feature point list to obtain a screening correction list.
[0151] S716 , selecting template feature points in the template feature point list according to the distance data between the filtered feature points and the template feature points in the filtered correction list to obtain a selected template list.
[0152] S718: Correct the screening and correction list based on the deviation data between the screening feature points in the screening and correction list and the selected feature points in the selection template list to obtain a corrected screening list.
[0153] S720: Determine a plurality of matching feature point pairs according to distance data between the corrected filtered feature points and the selected feature points in the corrected filtered list.
[0154] The matching feature point pair includes a corrected screened feature point and a selected feature point having a minimum distance to the corrected screened feature point.
[0155] S722. Sum the distance data between two feature points in the matching feature point pair to obtain a verification summary deviation.
[0156] S724. If the verification summary deviation is less than the reference summary deviation, the feature points to be verified are deleted. If the verification summary deviation is not less than the reference summary deviation, the feature points to be verified are not deleted, and a list of retained correction points is obtained.
[0157] S726, performing deviation restoration on the feature points in the retained correction point list to obtain target matching feature points.
[0158] This specification provides an image feature point matching device 800, see Figure 8 The image feature point matching device 800 includes: a feature point list acquisition module 810, a feature point list correction module 820, a feature point screening module 830, and a feature point matching module 840.
[0159] The feature point list acquisition module 810 is used to acquire a detection feature point list of the image to be detected; wherein the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list;
[0160] A feature point list correction module 820, configured to correct the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list;
[0161] A feature point screening module 830, configured to determine, in the correction feature point list, feature points to be verified that meet a preset distance screening condition according to distance data between the correction feature points in the correction feature point list and the template feature points;
[0162] The feature point matching module 840 is used to screen and match the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
[0163] For a detailed description of the image feature point matching device, please refer to the description of the image feature point matching method above, which will not be repeated here.
[0164] An embodiment of the present specification provides a chip including a storage unit and a processing unit. The storage unit stores a computer program. When the processing unit executes the computer program, the steps of the method of any of the above embodiments are implemented.
[0165] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 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, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image feature point matching method is implemented. The display screen of the computer device 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 covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0166] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution disclosed in this specification, and does not constitute a limitation on the computer device to which the solution disclosed in this specification is applied. Specifically, the computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] An embodiment of the present specification provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method steps in the above embodiment are implemented.
[0168] An embodiment of the present specification provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method in any of the above embodiments are implemented.
[0169] The embodiments of this specification provide a computer program product, which includes instructions. When the instructions are executed by a processor of a computer device, the computer device can perform the steps of any method of the above embodiments.
[0170] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
Claims
1. A method for matching image feature points, characterized in that: The method comprises: Obtain a detection feature point list of an image to be detected; wherein the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list; Correcting the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list; Determining, in the correction feature point list, feature points to be verified that meet a preset distance screening condition according to distance data between the correction feature point in the correction feature point list and the template feature point; Screening and matching are performed between the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
2. The method according to claim 1, characterized in that The screening and matching between the correction feature point list and the template feature point list based on the feature point to be verified to determine the target matching feature point in the detection feature point list includes: By screening and matching the correction feature point list with the template feature point list, determining whether to delete the feature point to be verified from the correction feature point list, and obtaining a retained correction point list; The feature points in the retained correction point list are subjected to deviation restoration to obtain the target matching feature points.
3. The method according to claim 2, characterized in that The determining whether to delete the feature point to be verified from the correction feature point list by screening and matching the correction feature point list and the template feature point list includes: Filtering the correction feature point list based on the feature points to be verified to obtain a filtered correction list; Selecting template feature points in the template feature point list according to the distance data between the screened feature points in the screened correction list and the template feature points to obtain a selected template list; Calculating the distance between feature points based on the screening correction list and the selection template list to determine a plurality of matching feature point pairs; Summing the distance data between two feature points in the matching feature point pair to obtain a verification summary deviation; If the verification summary deviation is less than the reference summary deviation, deleting the feature point to be verified; If the verification summary deviation is not less than the reference summary deviation, the feature point to be verified is not deleted.
4. The method according to claim 3, characterized in that The calculating the distance between feature points based on the screening correction list and the selection template list to determine a plurality of matching feature point pairs includes: Correcting the screening correction list based on deviation data between the screening feature points in the screening correction list and the selected feature points in the selection template list to obtain a corrected screening list; According to the distance data between the corrected filtered feature points and the selected feature points in the corrected filtered list, a plurality of matching feature point pairs are determined; wherein the matching feature point pairs include a corrected filtered feature point and a selected feature point having a minimum distance to the corrected filtered feature point.
5. The method according to claim 3, characterized in that: The reference aggregate deviation is determined by: Determine a plurality of reference feature point pairs according to the distance data between the correction feature points in the correction feature point list and the template feature points; wherein the reference feature point pairs include a correction feature point and a template feature point having a minimum distance to the correction feature point; Constructing a deviation distance list based on the minimum distance of each reference feature point pair; The minimum distances in the deviation distance list are summed to obtain the reference summary deviation.
6. The method according to claim 3, characterized in that The step of screening the correction feature point list based on the feature point to be verified to obtain a screened correction list includes: The feature points to be verified are deleted from the correction feature point list to obtain the screened correction list.
7. The method according to any one of claims 2 to 6, characterized in that: There is at least one feature point to be verified, and the at least one feature point to be verified constitutes a list to be verified; the step of screening and matching between the correction feature point list and the template feature point list to determine whether to delete the feature point to be verified from the correction feature point list to obtain a retained correction point list includes: Traversing the feature points to be verified in the list to be verified, and filtering the correction feature point list based on any feature point to be verified in the list to be verified to obtain a filtered correction list; The screened feature points in the screened correction list are matched with the template feature points in the template feature point list corresponding to the screened feature points to determine whether to delete any of the feature points to be verified from the correction feature point list.
8. The method according to any one of claims 1 to 6, characterized in that: The deviation data includes the minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation between the detection feature point and the template feature point; the detection feature point list is corrected based on the deviation data between the detection feature point in the detection feature point list and the template feature point in the template feature point list to obtain the corrected feature point list, including: The minimum horizontal axis coordinate deviation and the minimum vertical axis coordinate deviation are used to perform coordinate correction on the detected feature points to obtain the corrected feature point list.
9. An image feature point matching device, characterized in that: The device comprises: A feature point list acquisition module is used to acquire a detection feature point list of an image to be detected; wherein the image to be detected corresponds to a template image, and the template image corresponds to a template feature point list; A feature point list correction module, used for correcting the detection feature point list based on deviation data between the detection feature points in the detection feature point list and the template feature points in the template feature point list to obtain a corrected feature point list; A feature point screening module, used to determine the feature points to be verified that meet the preset distance screening conditions in the correction feature point list according to the distance data between the correction feature points in the correction feature point list and the template feature points; The feature point matching module is used to screen and match the correction feature point list and the template feature point list based on the feature point to be verified, so as to determine the target matching feature point in the detection feature point list.
10. A computer device, characterized in that: The method comprises a processor and a memory, wherein the processor is used to execute a computer program in the memory, and the computer program can execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Used to store a computer program, which can execute the method according to any one of claims 1 to 8.
12. A chip comprising a storage unit and a processing unit, wherein the storage unit stores a computer program, characterized in that: When the processing unit executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Image matching method and device
CN103955931A
Image feature matching method and device, equipment and storage medium
CN111291768A
Feature point matching method and device, intelligent terminal and computer readable storage medium
CN112819095A
Target positioning method and device, equipment and medium
CN117333686A
Head pose tracking using a depth camera
US20130201291A1
