A feature point matching method and system based on a local vector consistency assumption

By using a feature point matching method based on the local vector consistency assumption, and combining ORB and KNN algorithms with gridding and geometric consistency evaluation, the problems of low accuracy and efficiency in feature matching are solved, and efficient and stable feature point matching is achieved.

CN120976586BActive Publication Date: 2026-07-14TONGJI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TONGJI UNIV
Filing Date
2025-07-31
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy and efficiency in feature matching, especially when dealing with changes in lighting, viewing angle, and large-scale datasets.

Method used

A feature point matching method based on the local vector consistency assumption is adopted. Feature points are extracted by ORB algorithm, KNN algorithm is used for preliminary matching, and a two-dimensional grid structure is constructed to map feature points into the grid. Geometric consistency evaluation method is used to eliminate mismatched pairs and retain correct matching pairs.

Benefits of technology

It improves the accuracy and efficiency of feature matching, enhances the stability of the algorithm under lighting changes and image deformation scenarios, reduces computational complexity, and improves the robustness and real-time performance of matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976586B_ABST
    Figure CN120976586B_ABST
Patent Text Reader

Abstract

The application relates to a feature point matching method and system based on a local vector consistency assumption. Firstly, the gray-scale images of a first image and a second image are input, features are extracted by means of an ORB algorithm, and the feature point descriptor sets of the two images are obtained; then, the two sets are processed by using a KNN algorithm, and the matching pairs of the feature points of the two images are obtained; then, a two-dimensional grid structure is constructed, all the feature points are mapped into the two-dimensional grid structure, and the index coordinates of the feature points are obtained; finally, the matching pairs are evaluated by using a geometric consistency evaluation method according to the index coordinates, the false matching pairs are removed, the correct matching pairs are reserved, and the feature point matching is completed. Compared with the prior art, the application has the advantages of high accuracy and high matching efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a feature point matching method and system based on the local vector consistency assumption. Background Technology

[0002] Feature matching is a key technology in computer vision and image processing. It achieves object recognition, localization, or alignment by extracting and comparing salient features in images or data. In the feature matching process, representative features, such as corners, edges, and textures, are first extracted from the image or data to be matched. These features are then described and encoded for subsequent comparison and matching. Feature matching has wide applications in various fields. In computer vision, it is often used for tasks such as image stitching, object tracking, and 3D reconstruction. In robot navigation, feature matching helps robots recognize their environment and perform precise localization. Currently, with the development of deep learning technology, the ability to extract and describe features has been greatly improved, resulting in a significant improvement in the performance of feature matching in complex scenes. However, some shortcomings still exist. For example, the stability and accuracy of feature matching may be affected by complex conditions such as changes in lighting, viewpoint, or occlusion. Furthermore, the computational efficiency of feature matching for large-scale datasets is also a problem that urgently needs to be solved.

[0003] RANSAC (Random Sample Consensus) is a classic parameter estimation and model fitting algorithm that finds the best-fit model for a given dataset through random sampling and hypothesis testing. The RANSAC algorithm works as follows: A set of samples is randomly selected from the dataset as inliers, and these samples are used to estimate the model parameters. Based on the estimated model, the fitting error between other data points and the model is calculated, and these are classified as inliers or outliers. These two steps are repeated multiple times, and the model with the most inliers is selected as the optimal model. The parameters of the optimal model are then re-estimated using all inliers. Because the RANSAC algorithm effectively removes outliers and noise from the dataset through random sampling and hypothesis testing, it is widely used in image feature matching. However, since the RANSAC algorithm finds the optimal model through random sampling and iterative processes, its computational complexity is high when dealing with large-scale datasets, and its robustness is low in scenarios with uneven feature point distribution.

[0004] Another algorithm is SIFT, which first performs scale-space extremum detection. This involves Gaussian smoothing and differencing the image at different scales to detect local extrema in multi-scale space. Then, based on these local extrema, the location and scale of keypoints are determined using the Hessian matrix, and points with low contrast and weak boundary responses are removed. Subsequently, a principal direction is assigned to each keypoint for subsequent descriptor generation. Finally, feature descriptors are generated using image gradients near the keypoints for subsequent feature matching. SIFT can extract features from images of different sizes, overcoming changes in image scale. It also possesses a degree of rotation invariance, overcoming interference from image rotation. SIFT is a classic and effective image feature extraction and matching method with advantages such as multi-scale representation, rotation invariance, and robustness. While SIFT, as a classic method for image feature extraction and matching, has many advantages, its computational complexity is high, and its stability is somewhat lacking when facing image deformation and changes in illumination.

[0005] For example, the invention patent with publication number CN119722758A discloses an image registration method based on improved ORB feature extraction and grid feature matching. It uses an improved FAST algorithm to extract feature points from the image to be stitched; it establishes BRIEF descriptors using the concept of BRIEF descriptors to obtain directional BRIEF descriptors; it constructs a triangular grid with feature points as vertices based on the feature point set of the image to be stitched; it determines the similarity of triangles based on the triangular grid to obtain similar triangles composed of feature points; it uses Hamming distance to pair the vertices of similar triangles to obtain the best matching feature point pairs; and it uses the SVD method to obtain the affine matrix parameters. However, it still has the possibility of mismatches, meaning the accuracy of feature matching still needs improvement.

[0006] In summary, current feature matching suffers from low accuracy and inefficient matching processes. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a feature point matching method and system based on the local vector consistency assumption.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] According to one aspect of the present invention, a feature point matching method based on the local vector consistency assumption is provided, the method steps including:

[0010] S1. Input the grayscale images of the first image and the second image, and use the ORB algorithm to extract features from the grayscale images respectively, and output the feature point descriptor set of the first image and the feature point descriptor set of the second image.

[0011] S2. Based on the first image feature point descriptor set and the second image feature point descriptor set, the KNN algorithm is used to obtain matching pairs between feature points in the two images;

[0012] S3. Construct a two-dimensional mesh structure and map all feature points into the two-dimensional mesh structure, then output the index coordinates of each feature point;

[0013] S4. Based on the index coordinates of each feature point, the matching pairs are evaluated using the geometric consistency evaluation method. Mismatched pairs are eliminated, and correct matching pairs are retained, thereby completing the feature point matching.

[0014] As a preferred technical solution, the ORB algorithm in S1 uses the FAST algorithm to detect feature points. The specific process of feature extraction using it is as follows: First, a pixel P is selected as the center, and the brightness of pixel P is I. P And set a preset threshold T, with pixel P as the center, select 16 pixels on a feature point circle with a preset radius of 3. If the brightness of 12 consecutive points on the selected feature point circle is greater than I, P +T or less than I P If -T, then pixel P is a feature point; at this time, the direction of the feature point is determined by the method of moments, and point pairs are randomly selected within the feature point circle. The gray values ​​of these point pairs are combined into a binary string, which is the descriptor of the feature point P.

[0015] As a preferred technical solution, when determining the direction of a feature point using the moment method, the moments of the feature point are first calculated, then the centroid of the feature point is calculated using the moments, and the geometric center of pixel P is connected to the centroid to obtain the direction vector of the feature point. The angle of the feature point can then be calculated using the following formula:

[0016]

[0017] Where, m pq Let (p, q) be the (p+q)th order moment of the feature point; (x, y) be the two-dimensional coordinates of the feature point pixel; I(x, y) be the gray value of the image at the (x, y) coordinates; p and q are order parameters, representing the weighting order of (x, y); P is the target pixel, i.e., the feature point; X and Y are the x and y coordinates of the feature point, respectively; C is the centroid; m 00 m is the zeroth moment of the image; 01 m is the first y-moment of the image; 10 θ is the first x-moment of the image; θ is the angle of the feature point.

[0018] As a preferred technical solution, in S2, during the process of obtaining matching pairs of feature points in two images using the KNN algorithm, the similarity between feature descriptors is measured by calculating the Euclidean distance. The Euclidean distance formula is:

[0019]

[0020] Where c is the calculated Euclidean distance value; the smaller the distance, the more similar the two descriptors are; n is the dimension of the descriptor, corresponding to the length of the binary string; a i b is the i-th element of a feature point descriptor in the first image; i Let i be the i-th element of a feature point descriptor in the second image.

[0021] As a preferred technical solution, the two-dimensional grid structure in S3 is constructed based on the first image. During construction, the grid dimension parameters are calculated according to the dimensions of the first image, and the two-dimensional grid structure has edge white space in the vertical and horizontal directions of the image respectively.

[0022] As a preferred technical solution, the grid dimension parameters include the number of grids divided in the height direction and the number of grids divided in the width direction, and the specific formula is as follows:

[0023] M h =((H) img %G size )*0.5)+1;

[0024] M ω =((W) img %G size )*0.5)+1;

[0025] Among them, M h and M w These represent the number of grid cells divided in the height and width directions, respectively; H img and W img These represent the height and width of the first image's grayscale value, respectively; G size This is the grid size.

[0026] As a preferred technical solution, in S3, all feature points are mapped to a two-dimensional mesh structure, and the formula for calculating the output feature point index coordinates is as follows:

[0027] x i =floor(xM) ω ) / G size ;

[0028] y i =(yM h ) / G size ;

[0029] Among them, (x i ,y i ) represents the index coordinates of the feature point.

[0030] As a preferred technical solution, the specific steps in S4 for evaluating the matching pair using the geometric consistency evaluation method include:

[0031] S41. Calculate the vectors from all feature points in the first image to the matching feature points in the second image, and sum them to obtain the average metric of geometric consistency.

[0032] S42. Use preset reference values ​​to linearly adjust the modulus of the average metric to obtain the geometric consistency index.

[0033] S43. Calculate the cross product of the vectors of each feature point in the first image and its corresponding feature point in the second image to obtain the cross product result of each matching pair.

[0034] S44. If the cross product of a matching pair is greater than the geometric consistency index, the matching pair is judged as a mismatch and removed; otherwise, the feature pair is judged as a correct match and retained.

[0035] As a preferred technical solution, the specific calculation formulas for the average metric value and geometric consistency index of geometric consistency are as follows:

[0036]

[0037] λ = |cons| / len;

[0038] Where cons is the average metric of geometric consistency; n is the total number of matching pairs; [x pk y pk [x] represents the vector connecting the desired matching feature points; pi, y pi ] represents the line vector connecting matching feature points within other groups; λ is the normalized geometric consistency index; len is the reference length.

[0039] According to another aspect of the present invention, a feature point matching system based on the local vector consistency assumption is provided. The system includes a feature extraction module, a feature matching module, a gridding module, and a mismatch identification and processing module.

[0040] The feature extraction module uses the ORB algorithm to extract features from the input grayscale image and outputs a first set of image feature point descriptors and a second set of image feature point descriptors.

[0041] The feature matching module uses the KNN algorithm to obtain matching pairs between feature points in the two images based on the first image feature point descriptor set and the second image feature point descriptor set.

[0042] The meshing module is used to construct a two-dimensional mesh structure, map all feature points to the two-dimensional mesh structure, and output the index coordinates of each feature point.

[0043] The mismatch identification and processing module evaluates the matching pairs based on the index coordinates of each feature point using a geometric consistency assessment method, eliminates mismatched pairs, and retains correct matching pairs, thereby completing the feature point matching.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1. In this invention, feature extraction and matching are performed first, then feature points are mapped onto a two-dimensional grid structure. Finally, a geometric consistency evaluation method is used to evaluate the matching pairs, eliminating mismatched pairs and retaining correct ones. This allows for efficient feature extraction via the ORB algorithm, initial matching via the KNN algorithm, spatial discretization via gridding, and elimination of mismatches via geometric consistency evaluation. The multi-step synergy preserves the real-time performance of ORB and the matching efficiency of KNN, while improving matching accuracy through local spatial constraints and geometric consistency checks. It fully utilizes the local distribution consistency characteristics of effective feature matching, adopts gridded local management for extracted feature points, and identifies and eliminates mismatches based on the consistency prior conditions between local feature matches, thereby improving the accuracy of feature matching. The overall method has high matching efficiency and accuracy, and is suitable for scenarios requiring real-time performance and robustness.

[0046] 2. This invention constructs a grid structure and maps all feature points to it, focusing on matching feature points within the grid. This allows the algorithm to capture the distribution characteristics of feature points in local areas, achieving more refined feature point determination within each grid, thus enhancing the algorithm's stability against image deformation and lighting changes. It achieves regionalized organization and management of feature points, significantly improving matching efficiency and accuracy. Grid division allows for rapid location of feature points within specific regions, greatly reducing the search range and effectively lowering computational complexity. Grid division and local angle calculation improve matching accuracy and stability. This invention uses local grid matching, where each feature point is matched only with feature points in its corresponding matching grid. By constructing index coordinates and pre-calculating and storing information for each grid and the feature points within it, the search range is reduced and efficiency is improved.

[0047] 3. In this invention, the image space is discretized by constructing a two-dimensional grid structure, which transforms global matching into a matching problem in local space and reduces the interference of irrelevant feature points. The edge blanking design ensures full grid coverage, which improves the accuracy of capturing the relative positional relationship of feature points in local space. This not only improves the efficiency of subsequent calculations but also enhances the robustness of matching.

[0048] 4. In this invention, the average metric value is obtained by vector accumulation, the consistency index is obtained by linear adjustment, and the matching pairs are checked by cross product. A complete geometric consistency evaluation logic is formed through multiple steps, which can effectively identify mismatched pairs that deviate from the overall geometric law, significantly improve the purity of the matching results, and ensure that the retained matching pairs have high spatial consistency. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the steps of a feature point matching method in this invention;

[0050] Figure 2 This is a flowchart of the feature point matching process in this invention;

[0051] Figure 3 This is a schematic diagram of feature point matching in the embodiment;

[0052] Figure 4 This is a schematic diagram of the feature point orientation in the embodiment;

[0053] Figure 5 This is a schematic diagram of image meshing processing in the embodiment;

[0054] Figure 6 This is a schematic diagram of intra-group feature matching in the embodiment;

[0055] Figure 7a This is the ORB feature matching map in the embodiment;

[0056] Figure 7b The figure shows the experimental results of the optimization in the example. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0058] This scheme proposes an innovative feature matching method that significantly optimizes performance in terms of illumination variation, viewpoint variation, and computational efficiency. First, the method utilizes the ORB (Oriented Fast and Rotated BRIEF) algorithm to efficiently extract feature points and descriptors from two images. Then, all feature points from both images are stored. Next, for each feature point in the query image, the KNN (K-Nearest Neighbors) algorithm is used to find the K most similar feature points in the stored feature point database. Then, a local grid partitioning strategy is employed to filter out effective feature points. Furthermore, the cross product relationship of feature point vectors and geometric information matching techniques are introduced to improve matching accuracy.

[0059] The ORB (Oriented FAST and Rotated BRIEF) algorithm is a method that uses the FAST algorithm to extract keypoints and the BRIEF (Binary Robust Independent Elementary Features) algorithm to construct feature descriptors. In the ORB algorithm, the FAST algorithm is first used to detect keypoints in the image. The FAST algorithm determines whether a pixel is a corner by comparing the brightness values ​​of its surrounding neighborhood with the brightness value of that pixel. That is, if a pixel has a sufficient number of neighboring pixels with significantly different values, it is considered a corner. Next, on the extracted keypoints, the ORB algorithm uses the BRIEF algorithm to calculate the orientation of each feature point and samples a set of binary descriptors along that orientation. The BRIEF algorithm is a fast feature description method that generates a binary string as a feature descriptor by comparing pixel pairs in the area surrounding the feature point. To enhance the robustness and rotation invariance of the ORB algorithm, a rotation invariance mechanism is introduced. Specifically, the ORB algorithm rotates the sampling points according to the orientation of the feature points to achieve better rotation invariance. In summary, the ORB algorithm combines the advantages of the FAST and BRIEF algorithms, enabling efficient extraction of key points and generation of descriptors from images. Therefore, it is widely used in fields such as real-time object recognition and SLAM (Simultaneous Localization and Mapping).

[0060] The KNN (K-Nearest Neighbors) algorithm works by classifying a sample within a feature space. If the majority of the K nearest neighbors (i.e., the closest neighbors in the feature space) belong to a particular class, then that sample also belongs to that class. KNN calculates the distance between feature points; shorter distances indicate higher similarity, and vice versa. It then uses cross-validation, splitting the sample data into training and validation sets according to a certain ratio. Starting with a small value for K, the algorithm gradually increases the value of K, calculates the variance of the validation set, and finally finds a suitable value for K. By considering the distance between feature points and the selection of the K value, feature points are divided into different regions. It has wide applications in many practical problems, especially performing well on small and medium-sized datasets.

[0061] This scheme makes full use of the consistent characteristics of local distribution of effective feature matching, adopts grid-based local management of extracted feature points, and identifies and eliminates feature mismatches through the consistent prior conditions between local feature matches, thereby improving the accuracy of feature matching.

[0062] This scheme uses local grid matching, where each feature point is matched only with feature points in its corresponding matching grid. Furthermore, this method pre-calculates and stores the information of each grid and the feature points within the grid, thereby reducing the search range and improving efficiency.

[0063] Example 1

[0064] In this embodiment, a feature point matching method based on the local vector consistency assumption is adopted, and the method steps are as follows: Figure 1 As shown, it specifically includes;

[0065] S1. Input the grayscale images of the first image and the second image, and use the ORB algorithm to extract features from the grayscale images respectively, and output the feature point descriptor set of the first image and the feature point descriptor set of the second image.

[0066] S2. Based on the first image feature point descriptor set and the second image feature point descriptor set, the KNN algorithm is used to obtain the best matching pair between feature points in the two images;

[0067] S3. Construct a two-dimensional mesh structure and map all feature points into the two-dimensional mesh structure, then output the index coordinates of each feature point;

[0068] S4. Based on the index coordinates of each feature point, the matching pairs are evaluated using the geometric consistency evaluation method. Mismatched pairs are eliminated, and correct matching pairs are retained, thus completing the feature point matching.

[0069] like Figure 2The diagram shown is a flowchart of the implementation of this method. In this process, the input grayscale image is first processed by the ORB algorithm for feature extraction. First, the ORB algorithm uses the FAST algorithm to detect feature points, initially determining a target pixel P as the center of a circle, with pixel P having a brightness of I. p Set a threshold T, and select 16 pixels on a circle with a radius of 3 centered on pixel P. Within the selected circle, 12 consecutive pixels have a brightness greater than I. p +T or less than I p If -T, then pixel P can be considered a feature point. For example... Figure 3 The image shown is a schematic diagram illustrating the matching of feature points.

[0070] The orientation of the feature points is then determined and represented using the method of moments:

[0071]

[0072] Where, m pq I(x, y) is the (p+q)th order moment of the feature point; (x, y) is the two-dimensional coordinate of the feature point pixel; I(x, y) is the gray value of the image at the (x, y) coordinate; p and q are order parameters, representing the weighting order of (x, y); P is the target pixel, i.e., the feature point; X and Y are the x and y coordinates of the feature point, respectively.

[0073] And the centroid is:

[0074]

[0075] Where C is the centroid; m 00 m is the zeroth moment of the image; 01 m is the first y-moment of the image; 10 Let x be the first x-moment of the image.

[0076] Connecting the geometric center O of the image patch with its centroid C yields a direction vector. like Figure 4 As shown;

[0077] The angle of the feature point is then defined as:

[0078]

[0079] Subsequently, point pairs are randomly selected within the feature point circle, and the magnitudes of the gray values ​​of these point pairs are combined into binary strings. These binary strings are the descriptors of the feature.

[0080] To identify matching feature points between two images, the feature point descriptors extracted by the ORB algorithm are first stored. Then, for each feature point in the query image, the KNN algorithm is used to find the K most similar feature points in the descriptor data. This process measures the similarity between feature descriptors by calculating the Euclidean distance, the formula of which is:

[0081]

[0082] Where c is the calculated Euclidean distance value; the smaller the distance, the more similar the two descriptors are; n is the dimension of the descriptor, corresponding to the length of the binary string; a i b is the i-th element of the descriptor of a feature point in the original image; i Let i be the i-th element of the descriptor of a feature point in the target image.

[0083] This method effectively eliminates noise interference and enhances the accuracy and stability of the matching process by filtering the number of feature points within a grid, retaining only grids with a certain threshold of feature points. Furthermore, by introducing angle calculations for local points and utilizing the angle information between vectors, matching points are further filtered, achieving more precise matching.

[0084] In this method, K=3 is selected as the number of feature points most similar to the target feature points. After filtering, the best matching pair between feature points in the two images is obtained.

[0085] Next, to achieve efficient management and processing of feature points, a spatial partitioning strategy based on image size and adaptive grid size is adopted. Specifically, firstly, a two-dimensional grid structure covering the entire image region is initialized according to the given image dimension and preset grid dimension parameters. This structure aims to discretize the continuous space of the image into several small region units (i.e., grid units) so that feature points can be effectively allocated to the corresponding grid units according to their spatial location. The core idea of ​​this method is to transform the problem of global feature point recognition and matching into a smaller, controllable local space through spatial discretization. This not only significantly improves the computational efficiency in subsequent steps, such as feature matching and its geometric consistency verification, but also helps to improve the accuracy and robustness of the matching process. This is because the relative positional relationships between feature points are easier to accurately capture and utilize within a smaller local region. Therefore, to create the grid in the vertical (height) and horizontal (width) directions of the image, the required margin is used to ensure that the grid can uniformly cover the entire image, as shown in the following formula:

[0086] M h =((H) img %G size)*0.5)+1;

[0087] M ω =((W) img %G size )*0.5)+1;

[0088] Among them, M h and M w These represent the number of grid cells divided in the height and width directions, respectively; H img and W img G represents the height and width of a grayscale image; size Indicates the grid size; the image meshing effect is as follows: Figure 5 As shown.

[0089] Subsequently, to achieve efficient management and processing of feature points, a feature point spatial allocation strategy was implemented. This strategy maps each detected feature point to a corresponding cell in a predefined two-dimensional grid structure based on its coordinate position. This process involves calculating the pixel coordinates of the feature points and, based on these coordinates and the grid size parameters, determining the specific grid cell to which each feature point belongs. Specifically, for example, given the coordinates (x, y) of a feature point, the cell size G of the grid... size First, the offsets of the feature point relative to the image origin in the horizontal and vertical directions are calculated. Then, by dividing these offsets by the corresponding grid cell size and rounding, the index (x, y) of the grid cell containing the feature point can be obtained. i ,y i ),in:

[0090] x i =floor(xM) ω ) / G size ;

[0091] y i =(yM h ) / G size ;

[0092] To improve the accuracy of feature matching and effectively eliminate erroneous matches, this method is based on geometric consistency evaluation. The core of this evaluation method lies in deeply analyzing the vector relationships between each matching pair and other matching pairs within its own grid and adjacent grids. Specifically, this is achieved by calculating the cross product of vectors and comparing their lengths. For example... Figure 6 The diagram illustrates intra-group feature matching. For each matching feature point, its position within the grid is determined. For example... Figure 6 As shown, assuming the matching point in the original image group is B, and the feature point matching it in the target image group is B′, then B(x, y) and B′(x) are obtained. i y iThe coordinates of the two feature points are used to obtain the vector. Then, by calculating the magnitude of the vector, i.e. Let represent the distance between two matching points. Similarly, calculate the vectors of other feature points that match its feature points, and then by summing this ratio of all relevant vector pairs, we can obtain a measure of overall geometric consistency, as shown in the following formula:

[0093]

[0094] λ = |cons| / len;

[0095] Where cons is the average metric of geometric consistency; n is the total number of matching pairs; [x pk y pk [x] represents the vector connecting the desired matching feature points; pi, y pi ] represents the line vector connecting matching feature points within other groups; λ is the geometric consistency index; len is a preset reference value.

[0096] Experimental analysis and verification showed that the best results were achieved when λ < 0.05. The core idea is to use the vector cross product to evaluate the geometric consistency of feature points in an image. Specifically, by calculating the vector cross product of a feature point and its corresponding feature point within the matching grid, the geometric relationship between the two points can be determined. A threshold is set; if the cross product result is below this threshold, the two feature points are considered geometrically consistent. Experiments show that when the threshold is set to 0.05, the algorithm can effectively identify and exclude mismatched feature points. This method not only improves the accuracy of feature point matching but also enhances the robustness of the algorithm in complex scenarios.

[0097] In this embodiment, to verify the significant effect of this method in feature matching, two images were selected as experimental scenarios for verification. For example... Figure 7a The image shows the results of feature matching using the ORB algorithm, which contains a large number of false matches; for example... Figure 7b As shown, the matching results optimized using this method have eliminated all mismatched feature pairs. This comparative experiment demonstrates the effectiveness of the proposed method in identifying and eliminating mismatches.

[0098] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A feature point matching method based on the local vector consistency assumption, characterized in that, The method steps include: S1. Input the grayscale images of the first image and the second image, and use the ORB algorithm to extract features from the grayscale images respectively, and output the feature point descriptor set of the first image and the feature point descriptor set of the second image. S2. Based on the first image feature point descriptor set and the second image feature point descriptor set, the KNN algorithm is used to obtain matching pairs between feature points in the two images; S3. Construct a two-dimensional mesh structure and map all feature points into the two-dimensional mesh structure, then output the index coordinates of each feature point; S4. Based on the index coordinates of each feature point, the matching pairs are evaluated using the geometric consistency evaluation method. Mismatched pairs are eliminated and correct matching pairs are retained, thereby completing the feature point matching. The specific steps for evaluating the matching pairs using the geometric consistency evaluation method in S4 include: S41. Calculate the vectors from all feature points in the first image to the matching feature points in the second image, and sum them to obtain the average metric of geometric consistency. S42. Use preset reference values ​​to linearly adjust the modulus of the average metric to obtain the geometric consistency index. S43. Calculate the cross product of the vectors of each feature point in the first image and its corresponding feature point in the second image to obtain the cross product result of each matching pair. S44. If the cross product of a matching pair is greater than the geometric consistency index, the matching pair is judged as a mismatch and removed; otherwise, the feature pair is judged as a correct match and retained. The specific calculation formulas for the average metric and geometric consistency index of the aforementioned geometric consistency are as follows: ; ; in, cons This is the average measure of geometric consistency. n To match the total number of pairs; x pk, y pk [ is the vector connecting the matching feature points;] x pi, y pi [ ] is the vector connecting matching feature points within other groups; λ A normalized geometric consistency index; len This is a reference length.

2. The feature point matching method based on the local vector consistency assumption according to claim 1, characterized in that, The ORB algorithm in S1 uses the FAST algorithm to detect feature points. The specific process of feature extraction using it is as follows: First, select a pixel. P With the center of the circle, P The brightness of the pixel is I P And set a preset threshold. T In pixels P Centered on a feature point circle with a preset radius of 3, select 16 pixels. If 12 consecutive pixels on the selected feature point circle have a brightness greater than 3, then the selection is considered successful. I P +T or less I P -T Then the pixel P For feature points; At this point, the direction of the feature point is determined by the method of moments, and point pairs are randomly selected within the feature point circle. The gray values ​​of these point pairs are combined into a binary string, which represents the feature point. P The descriptor.

3. The feature point matching method based on the local vector consistency assumption according to claim 2, characterized in that, When determining the direction of feature points using the method of moments, the moments of the feature points are first calculated, then the centroid of the feature points is calculated using the moments, and finally the pixels are connected. P The geometric center and centroid of the feature point are obtained, which gives the direction vector of the feature point. The angle of the feature point can be calculated using the following formula: ; ; ; in, m pq For feature points ( p + q ) order moment; ( x , y () represents the two-dimensional coordinates of the feature point pixel; I ( x , y ) is the image in ( x , y The grayscale value at the coordinate; p , q It is the order parameter, indicating the order of ( x , y The weighted order of ) ; P is the target pixel, i.e., the feature point; X , Y They are feature points x coordinates and y Coordinates; C is the centroid; m 00 The zeroth moment of the image; m 01 For the first order of the image y Rectangle; m 10 For the first order of the image x Rectangle; θ The angle of the feature point.

4. The feature point matching method based on the local vector consistency assumption according to claim 1, characterized in that, In step S2, during the process of obtaining matching pairs of feature points in two images using the KNN algorithm, the similarity between feature descriptors is measured by calculating the Euclidean distance. The Euclidean distance formula is as follows: ; in, c The calculated Euclidean distance value indicates that the smaller the distance, the more similar the two descriptors are. n The dimension of the descriptor corresponds to the length of the binary string; a i Let i be the i-th element of a feature point descriptor in the first image; b i Let i be the i-th element of a feature point descriptor in the second image.

5. The feature point matching method based on the local vector consistency assumption according to claim 1, characterized in that, The two-dimensional grid structure in S3 is constructed based on the first image. During construction, the grid dimension parameters are calculated according to the dimensions of the first image, and the two-dimensional grid structure has edge white space in the vertical and horizontal directions of the image.

6. The feature point matching method based on the local vector consistency assumption according to claim 5, characterized in that, The grid dimension parameters include the number of grids in the height direction and the number of grids in the width direction, and the specific formula is as follows: ; ; in, M h and M w These represent the number of grid cells divided in the height and width directions, respectively. and These are the height and width of the grayscale image of the first image, respectively. This is the grid size.

7. The feature point matching method based on the local vector consistency assumption according to claim 6, characterized in that, In step S3, all feature points are mapped to a two-dimensional mesh structure, and the formula for calculating the output feature point index coordinates is as follows: ; ; in,( x i , y i ) represents the index coordinates of the feature point.

8. A feature point matching system based on the local vector consistency assumption, characterized in that, The system operates using a feature point matching method based on the local vector consistency assumption as described in any one of claims 1-7. The system includes a feature extraction module, a feature matching module, a gridding module, and a mismatch identification and processing module. The feature extraction module uses the ORB algorithm to extract features from the input grayscale image and outputs a first set of image feature point descriptors and a second set of image feature point descriptors. The feature matching module uses the KNN algorithm to obtain matching pairs between feature points in two images based on the first image feature point descriptor set and the second image feature point descriptor set. The meshing module is used to construct a two-dimensional mesh structure, map all feature points to the two-dimensional mesh structure, and output the index coordinates of each feature point. The mismatch identification and processing module evaluates the matching pairs based on the index coordinates of each feature point using a geometric consistency evaluation method, eliminates mismatched pairs, and retains correct matching pairs, thereby completing feature point matching.