CN115527050A - Image feature matching method, computer device and readable storage medium - Google Patents

Image feature matching method, computer device and readable storage medium Download PDF

Info

Publication number
CN115527050A
CN115527050A CN202211505976.5A CN202211505976A CN115527050A CN 115527050 A CN115527050 A CN 115527050A CN 202211505976 A CN202211505976 A CN 202211505976A CN 115527050 A CN115527050 A CN 115527050A
Authority
CN
China
Prior art keywords
matched
image
matching
feature
key points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211505976.5A
Other languages
Chinese (zh)
Inventor
祝渊
黄皓恬
杨远航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest University of Science and Technology
Original Assignee
Southwest University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest University of Science and Technology filed Critical Southwest University of Science and Technology
Priority to CN202211505976.5A priority Critical patent/CN115527050A/en
Publication of CN115527050A publication Critical patent/CN115527050A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Abstract

The application discloses an image feature matching method, computer equipment and a readable storage medium, and relates to the field of computer vision. The method comprises the steps of obtaining images to be matched, wherein the images to be matched are paired images which are partially overlapped; performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched; performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched; performing feature fusion processing on the first key point to be matched and a second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched; and carrying out matching estimation processing on the third key points to be matched to obtain a prediction basis matrix. The embodiment of the application can effectively improve the matching accuracy of the image matching algorithm, improve the performance of the image matching algorithm and save manpower, material resources and financial resources.

Description

Image feature matching method, computer device, and readable storage medium
Technical Field
The present application relates to the field of computer vision technologies, and in particular, to an image feature matching method, a computer device, and a readable storage medium.
Background
With the continuous update and rapid development of computer vision technology in recent years, image matching technology, which is an important branch of modern computer vision, is also considered as an extremely important basic research. The specific processing flow of the image feature matching comprises a real-time processing stage and a non-real-time processing stage. And image feature extraction is completed in a non-real-time processing stage, feature analysis, a matching strategy and related parameters are formulated, and efficient image matching and accurate projection model establishment based on the feature analysis, the matching strategy and the related parameters are completed in a real-time stage. In complex scenarios, the performance of image feature matching algorithms can be challenged by many factors, such as: imaging conditions or external object interference, as well as differences in the surrounding environment, can result in a large number of false matches, degrading the performance of the image matching algorithm. Therefore, the features are manually extracted to improve the matching accuracy, which is time-consuming and labor-consuming.
Disclosure of Invention
The image feature matching method, the computer device and the readable storage medium are provided, so that the matching accuracy of an image matching algorithm can be effectively improved, the performance of the image matching algorithm is improved, and manpower, material resources and financial resources are saved.
The technical scheme of the embodiment of the application is as follows:
in a first aspect, the present application provides an image feature matching method, including:
acquiring images to be matched, wherein the images to be matched are paired images which are partially overlapped;
performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched;
performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched;
performing feature fusion processing on the first key point to be matched and a second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched;
and carrying out matching estimation processing on the third key points to be matched to obtain a prediction basis matrix.
According to some embodiments of the present application, the performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched includes:
performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of fourth key points to be matched;
and performing confidence calculation on the multiple pairs of the fourth key points to be matched, and selecting the front K1 pair with the highest confidence score to the fourth key points to be matched to obtain multiple pairs of the first key points to be matched.
According to some embodiments of the present application, the performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched includes:
performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of fifth key points to be matched;
and performing confidence calculation on the multiple pairs of the fifth key points to be matched, and selecting the K1 pair of the fifth key points to be matched before the highest confidence score to obtain multiple pairs of the second key points to be matched.
According to some embodiments of the application, before the obtaining of the image to be matched, which is a pair of partially overlapped images, the method further comprises:
acquiring initial matching images which are paired images partially overlapped;
and carrying out image enhancement processing on the initial matching image to obtain the image to be matched.
According to some embodiments of the present application, after the performing the matching estimation processing on the third to-be-matched keypoint to obtain the prediction basis matrix, the method further includes: and calculating the accuracy of the prediction basis matrix and a preset real basis matrix to obtain the matching accuracy so as to evaluate the feature matching result.
According to some embodiments of the present application, the performing matching estimation processing on the third to-be-matched keypoint to obtain a prediction basis matrix includes: and performing matching estimation processing on the third key point to be matched by using a preset estimator to obtain the prediction basis matrix.
According to some embodiments of the application, the preset feature matching model is obtained by:
obtaining an image matching dataset comprising a plurality of pairs of image data having an overlap;
obtaining an initial feature matching model;
performing feature extraction on each pair of image data by using the initial feature matching model to obtain a first extraction feature set;
calculating a loss function based on the first extraction feature set to obtain a value of the first loss function;
training the initial feature matching model based on the value of the first loss function, and obtaining the feature matching model under the condition that the value of the first loss function meets a preset condition.
According to some embodiments of the application, the preset geometric density model is obtained by:
obtaining an initial geometric density model;
performing feature extraction on each pair of image data by using the initial geometric density model to obtain a second extraction feature set;
calculating a loss function based on the second extraction set characteristics to obtain a value of a second loss function;
and training the initial geometric density model based on the value of the second loss function, and obtaining the geometric density model under the condition that the value of the second loss function meets a preset condition.
In a second aspect, the present application provides a computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by one or more of the processors, cause the one or more processors to perform the steps of any one of the methods described above in the first aspect.
In a third aspect, the present application also provides a computer-readable storage medium, which can be read by and written to by a processor, the storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of any of the methods described above in the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
the embodiment of the application provides an image feature matching method, computer equipment and a readable storage medium, wherein the image feature matching method comprises the following steps: the method comprises the steps that images to be matched are obtained, and the images to be matched are paired images which are partially overlapped; then, performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched; then, performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched; subsequently, feature fusion processing is carried out on the first key point to be matched and the second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched, and the obtained third key points to be matched have better matching effect due to lower correlation of the first key point to be matched and the second key point to be matched; and performing matching estimation processing on the third key point to be matched to obtain a prediction basis matrix, and performing image matching by using the preset basis matrix has higher matching precision. Compared with the prior art that the features are extracted manually, the method and the device have the advantages that the key points extracted by the two different models are fused, so that the matching accuracy of the image matching algorithm can be effectively improved in a complex scene, the performance of the image matching algorithm is improved, and manpower, material resources and financial resources are saved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of an image feature matching method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a sub-step of step S120 in FIG. 1;
FIG. 3 is a schematic flow chart illustrating a sub-step of step S130 in FIG. 1;
FIG. 4 is a schematic flowchart of an image feature matching method according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a feature matching model obtaining method according to an embodiment of the present application;
FIG. 6 is a schematic flowchart of a method for obtaining a geometric density model according to an embodiment of the present application;
FIG. 7 is a schematic overall flow chart of an image feature matching method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an image feature matching apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is to be noted that, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
In the related art, the performance of the image feature matching algorithm is challenged by many factors, such as: the local or global change of a scene is caused by the change of visual angles, illumination, fuzzy change and the existence of interferents to cause local shielding, and the quality of image matching is influenced, so that the characteristic of good feature extraction, such as differentiability, stability, invariance and the like, is very important. On the other hand, there may be a situation that the matching object is not different from the surrounding scene to a large extent, resulting in repeated appearance of some sub-regions on the image, which have similarity in shape, texture, and so on, and this situation may result in a large number of false matches, i.e., the resolution of local features of the image is reduced due to the similar structure problem. In order to solve the above problems, an image matching algorithm based on deep learning is proposed, which, although it performs well in each paper data set, lacks robustness and stability in practical application, and needs to improve the accuracy and robustness of feature points to illumination, view angle change, local occlusion, and fuzzy change under the condition of utilizing the strong feature learning capability of a deep network.
Based on this, an embodiment of the present application provides an image feature matching method, a computer device, and a readable storage medium, where the image feature matching method includes: the method comprises the steps that images to be matched are obtained, and the images to be matched are paired and partially overlapped; then, performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched, wherein the preset feature matching model can perform coarse-grained and fine-grained step-by-step matching, and the existing indoor and outdoor data sets reach a higher level; then, performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched, and reasoning out feature vectors by using the preset geometric density model to facilitate global matching; then, feature fusion processing is carried out on the first key point to be matched and the second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched, and the obtained third key points to be matched have better matching effect due to lower correlation between the first key point to be matched and the second key point to be matched; and performing matching estimation processing on the third key point to be matched to obtain a prediction basis matrix, and performing image matching by using the preset basis matrix has higher matching precision. Compared with the prior art that the features are extracted manually, the method and the device have the advantages that the key points extracted by the two different models are fused, so that the matching accuracy of the image matching algorithm can be effectively improved in a complex scene, the performance of the image matching algorithm is improved, and manpower, material resources and financial resources are saved.
In one embodiment, the image feature matching method is suitable for image matching in a complex scene or image matching in a simple scene, so that the matching accuracy of the image matching algorithm can be effectively improved, and the performance of the image matching algorithm is improved. The image feature matching method can be applied to other fields such as military field, image processing field, automatic driving field and the like, and is not described herein any more and has wide application range.
The image feature matching method, the computer device, and the readable storage medium provided in the embodiments of the present application are explained below with reference to the drawings.
Referring to fig. 1, fig. 1 shows a schematic flow chart of an image feature matching method provided in an embodiment of the present application. The image feature matching method includes, but is not limited to, step S110, step S120, step S130, step S140, and step S150.
Step S110, images to be matched are obtained, and the images to be matched are paired and partially overlapped images.
In one embodiment, the images to be matched are pairs of images with partial coincidence, i.e. two images are not identical, and a part of the image content is visually identical, possibly because the camera takes a different angle or the building is in a different scene. The images to be matched may be a pair or a plurality of pairs, the overlapping rate of the two images exceeds 10%, each image to be matched may obtain two images taken by different vision through the image matching challenge platform, or may be manually taken, and the paired partially overlapped images may be obtained, which is not described herein again. By obtaining the image to be matched, the method is beneficial to carrying out more accurate image matching processing on the subsequent image to be matched.
As shown in fig. 4, before acquiring the images to be matched, the images to be matched are pairs of partially overlapped images, the image feature matching method further includes, but is not limited to, the following steps:
step S210, an initial matching image is obtained, where the initial matching image is a pair of partially overlapped images.
In an embodiment, an initial matching image is obtained, the initial matching image has partially overlapped images in pairs, the overlapping rate of the two images exceeds 10%, the initial matching image can be a pair of images or multiple pairs of images, and the obtaining of the initial matching image is beneficial to obtaining images to be matched subsequently.
And step S220, performing image enhancement processing on the initial matching image to obtain an image to be matched.
In an embodiment, according to the initial matching image obtained in step S210, image enhancement processing may be performed on the initial matching image, that is, scaling processing, flipping processing, and the like are performed on the initial matching image to obtain an image to be matched, so that the number of images can be increased, and thus the verification model has a better generalization capability, and the matching accuracy is higher. The initial matching image can also be directly used as an image to be matched for image matching processing. Therefore, the image to be matched may be an initial image obtained by performing image matching, or may be an image obtained by preprocessing the initial image.
And step S120, performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched.
As shown in fig. 2, the method for extracting features of an image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched includes, but is not limited to, the following steps:
and step S121, performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of fourth key points to be matched.
In one embodiment, the predetermined Feature Matching model may be a Detector-Free Local Feature Matching with transforms (LoFTR) based on transforms, may be a self-attentive LoFTR, or may be a LoFTR-based variant model. The LoFTR model is taken as an example to describe in detail below, and the LoFTR model is used to perform feature extraction processing on the image to be matched to obtain a plurality of pairs of fourth key points to be matched. Because the images to be matched are the images with the overlapped parts in pairs, the fourth key points to be matched come from the points of the overlapped parts, and the more the points of the overlapped parts of the images are, the more the obtained key points to be matched can be. By obtaining the fourth key point to be matched, the subsequent confidence calculation is facilitated, and a better key point to be matched is obtained.
And step S122, performing confidence calculation on a plurality of pairs of fourth key points to be matched, and selecting the front K1 pair of fourth key points to be matched with the highest confidence score to obtain a plurality of pairs of first key points to be matched.
In an embodiment, a plurality of pairs of fourth key points to be matched are obtained according to the step S121, the confidence coefficient calculation is performed on the plurality of pairs of fourth key points to be matched to obtain a confidence coefficient matrix, and the first K1 pair of fourth key points to be matched with the highest confidence coefficient score is selected according to a preset confidence coefficient threshold value to obtain a plurality of pairs of first key points to be matched. The confidence degrees of the key points can be ranked first, the higher the confidence degree is, the better the matching effect is, the higher the confidence degree is, the lower the confidence degree is, the matching point pairs are screened out, the matching key points which are not obvious or do not act on the image matching are filtered out, and therefore the accuracy of the image matching can be improved for the first key point to be matched. Wherein, K1 may be the first 50% or other values, which are not described herein; the fourth key point to be matched is a paired point directly obtained through LoFTR; the first to-be-matched key point is a paired point obtained by the fourth to-be-matched key point through confidence coefficient calculation.
As shown in fig. 5, the preset feature matching model is obtained through the following steps:
in step S310, an image matching data set is obtained, the image matching data set including a plurality of pairs of image data having an overlap.
In one embodiment, an image matching dataset is obtained, the image matching dataset comprising a plurality of pairs of image data having an overlap, the image matching dataset comprising a training set and a test set, the training set comprising four files and labeled with a label for differentiation. In the training set, a first file comprises four columns of data including an image file name, camera internal parameters, a rotation matrix R and a translation vector t; the second file comprises character strings for identifying a pair of images, the overlapping rate of the pair of images and three columns of data of a real basic matrix; the third file includes a scale factor for each scene, usable to convert depth to meters; the fourth file includes a collection of images taken near the same location. The test set has three pairs of images and can be processed by image enhancement (flipping, scaling, etc.) to augment the test set. The camera internal parameter is a 3 multiplied by 3 matrix K, and a one-dimensional vector is generated through row main index expansion; the rotation matrix R is a 3 multiplied by 3 matrix and is spread into a one-dimensional vector through a row main index; a string identifying a pair of images is encoded by two image names separated by a hyphen, illustratively, key1-key2, key1 being the left slice and key2 being the right slice; the overlapping rate of the two images exceeds 10%, and enough points can be found to calculate the relative poses of the two images. The method is beneficial to performing model training subsequently by using the image matching data set to obtain a feature matching model.
Step S320, an initial feature matching model is obtained.
In one embodiment, the initial Feature Matching model may be transform-based Detector-Free Local Feature Matching with transforms (LoFTR), may be self-attentive LoFTR, or may be a LoFTR-based variant model. The initial feature matching model can enlarge the receptive field range and fully extract the image features.
Step S330, feature extraction is carried out on each pair of image data by using the initial feature matching model to obtain a first extraction feature set.
In an embodiment, each pair of image data is subjected to feature extraction by using an initial feature matching model, and the image data input into the initial feature matching model processes one pair of image data at a time, or processes multiple pairs of image data at a time. The initial feature matching model comprises a local feature extraction module and a local feature conversion module, coarse granularity matching is established, coarse granularity is converted into fine granularity, for example, a pair of image data is taken as an example, the local feature extraction module of the initial feature matching model firstly carries out local feature extraction on the image data, features with different resolutions are extracted from the two images, coarse granularity extraction and fine granularity extraction are realized, a feature map of the coarse granularity can be expanded into a one-dimensional vector feature map, and position codes are added. The coarse granularity extraction can be rough-level features at the 1/8 position of the image data dimension, the fine granularity extraction can be rough-level features at the 1/2 position of the image data dimension, and the local feature extraction adopts a convolutional neural network and can fully extract local features. After the local feature extraction, the local features related to the position and the context are extracted through a local feature conversion module, the features are converted into a feature representation form easy to match, and coarse-grained matching is carried out in the local feature conversion module. After coarse-grained matching is established, the coarse-grained to fine-grained modules are used for refining the matching to the resolution of an original image, for each coarse-grained matching, the position of the coarse-grained to fine-grained feature map is determined firstly on the fine-grained feature map by using a correlation method, then a pair of local windows with the size of w multiplied by w is cut, a local feature map is generated, vector calculation is carried out, and finally a fine-grained matching item is generated. And forming a coarse-grained matching item and a fine-grained matching item through coarse-grained extraction and fine-grained extraction, further obtaining a first extraction characteristic set, and facilitating subsequent loss function calculation by utilizing the first extraction characteristic set. The first extraction characteristic set is a set of matching points obtained by performing characteristic extraction on each pair of image data by using an initial characteristic matching model.
Step S340, calculating a loss function based on the first extraction feature set to obtain a value of the first loss function.
In an embodiment, the first extracted feature set obtained according to step S330 includes coarse-grained extracted features and fine-grained extracted features, loss function calculation is performed respectively to obtain a coarse-grained loss value and a fine-grained loss value, and the coarse-grained loss value and the fine-grained loss value are added to obtain a first loss function value, which is beneficial to subsequent model training. The coarse-grained loss value is calculated by using a log-likelihood loss function and a softmax function, and coarse-grained characteristic loss calculation can be performed, which is not described herein; the value of the fine-grained loss is calculated by adopting an L2 loss function, and can also be calculated by adopting an L1 loss function, and the fine-grained characteristic loss can be calculated, which is not described herein; the value of the first loss function is the value of the loss function of the LoFTR model.
And S350, training the initial feature matching model based on the value of the first loss function, and obtaining the feature matching model under the condition that the value of the first loss function meets the preset condition.
In an embodiment, the initial feature matching model is trained by using the obtained value of the first loss function, and the weight value and the offset value are updated through back propagation, and a gradient descent algorithm may be used for optimization in the back propagation process, where the gradient descent algorithm may be a batch gradient descent algorithm, a random gradient descent algorithm, or a small batch gradient descent algorithm, and details are not described here. After iterative training, a feature matching model is obtained under the condition that the value of the first loss function meets a preset condition, or the feature matching model is obtained under the condition that the iterative training reaches a preset maximum training frequency. The obtained feature matching model is directly used for carrying out feature extraction processing on the image to be matched, repeated training is avoided, and the matching processing speed is increased.
And step S130, performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched.
As shown in fig. 3, the feature extraction processing is performed on the image to be matched by using the preset geometric density model to obtain a plurality of pairs of second key points to be matched, including but not limited to the following steps:
step S131, performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of fifth key points to be matched.
In one embodiment, the predetermined Geometric density model may be a Deep kernel density Geometric Matching (DKM) or a simple Geometric Matching model. The DKM model is taken as an example to describe in detail below, and the DKM model is used to perform feature extraction processing on the image to be matched, so as to obtain a plurality of pairs of fifth key points to be matched. Because the images to be matched are paired images with overlapped parts, the fifth key point to be matched comes from the point of the overlapped part, and the more the points of the overlapped part of the images are, the more the obtained key points to be matched are possibly. By obtaining the fifth to-be-matched key point, the subsequent confidence calculation is facilitated, and a better to-be-matched key point is obtained.
And S132, performing confidence calculation on the multiple pairs of the fifth key points to be matched, and selecting the front K1 pair of the fifth key points to be matched with the highest confidence score to obtain multiple pairs of the second key points to be matched.
In an embodiment, a plurality of pairs of fifth to-be-matched key points are obtained according to the step S131, confidence calculation is performed on the plurality of pairs of fifth to-be-matched key points to obtain a confidence matrix, and according to a preset confidence threshold, the first K1 pair of fifth to-be-matched key points with the highest confidence score is selected to obtain a plurality of pairs of second to-be-matched key points. The confidence degrees of the key points can be ranked first, the higher the confidence degree is, the better the matching effect is, the higher the confidence degree is, the lower the confidence degree is, the matching point pairs are screened out, the matching key points which are not obvious or do not act on the image matching are filtered out, and therefore the accuracy of the image matching can be improved by the second key points to be matched. Wherein, K1 may be the first 50% or other values, which are not described herein; the fifth key point to be matched is a paired point directly obtained through a geometric density model; the second to-be-matched key point is a pair of points obtained by the fifth to-be-matched key point through confidence degree calculation.
As shown in fig. 6, the preset geometric density model is obtained by the following steps:
step S410, an initial geometric density model is obtained.
In one embodiment, the initial Geometric density model may be a Deep kernel density Geometric Matching (DKM) or a simple Geometric Matching model. The initial geometric density model can extract global features, has a low repetition rate with features extracted by LoFTR, and is beneficial to supplement of LoFTR extraction features.
Step S420, performing feature extraction on each pair of image data by using the initial geometric density model to obtain a second extraction feature set.
In one embodiment, a multi-scale feature pyramid is extracted through an initial geometric density model, then a global matcher is used for estimating a global rough corresponding relation from depth features, then refinement is carried out, dense matching is built for deducing scene geometry, a second extraction feature set is obtained, and loss function calculation is carried out by using the second extraction feature set subsequently. The first extraction characteristic set is a set of matching points obtained by performing characteristic extraction on each pair of image data by using the initial geometric density model.
Step S430, calculating a loss function based on the second extracted feature set to obtain a value of the second loss function.
In an embodiment, based on the second extracted feature set, a separate loss is used for each scale, and the sum of each scale is performed to obtain a value of the second loss function, which is beneficial to performing subsequent model training. Wherein the value of the second loss function is the value of the DKM model loss function.
Step S440, training the initial geometric density model based on the value of the second loss function, and obtaining the geometric density model under the condition that the value of the second loss function meets the preset condition.
In an embodiment, the initial geometric density model is trained using the obtained values of the first loss function, and the values of the weights and the values of the biases are updated by back propagation. After iterative training, the geometric density model is obtained under the condition that the value of the second loss function meets the preset condition, or the geometric density model is obtained under the condition that the iterative training reaches the preset maximum training times. The obtained geometric density model is directly used for carrying out feature extraction processing on the image to be matched, repeated training is avoided, and the matching processing speed is increased.
Step S140, performing feature fusion processing on the first to-be-matched keypoint and the second to-be-matched keypoint corresponding to the first to-be-matched keypoint to obtain a plurality of pairs of third to-be-matched keypoints.
In an embodiment, a first key point to be matched is obtained through a preset feature matching model, a second key point to be matched is obtained through a preset geometric density model, a LoFTR model obtains feature descriptors of two images based on a transducer self and cross attention layer, a DKM model regards an image dense geometric matching task as a continuity probability regression task, a feature vector of a space coordinate is deduced by adopting a depth kernel estimation and Gaussian process, starting points and processing thought coincident points of the two models are few, the correlation of matching points obtained by adopting the two different methods is lower, K1 key points are taken before the first key point to be matched and the second key point to be matched, and the first key point to be matched corresponds to the second key point to be matched. And performing feature fusion processing on the first key point to be matched and a second key point to be matched corresponding to the first key point to be matched, wherein the feature fusion processing is feature splicing processing, so that a plurality of pairs of third key points to be matched are obtained. By carrying out the characteristic splicing processing, more abundant characteristics can be obtained so as to improve the matching accuracy.
And S150, performing matching estimation processing on the third key point to be matched to obtain a prediction basis matrix.
In an embodiment, the predetermined estimator may be the magsa + +, or the RANSAC estimator may estimate the basis matrix. In the embodiment of the application, the USAC _ magsa estimator packaged in the OpenCV performs matching estimation processing on the third key point to be matched to obtain the prediction basis matrix, and the USAC _ magsa estimator can improve the matching accuracy. The prediction basis matrix can reflect the movement of the camera, the matched key points are connected, and the calculated prediction basis matrix is flattened and then written into a csv format file for storage so as to be used later.
It should be noted that when the camera is monocular, since only the 2-dimensional pixel coordinates are known, the motion is estimated from two sets of 2-dimensional points, which is solved by epipolar geometry. Assuming that it is desired to find the motion between the two images, if the two images match correctly, it means that they are indeed the projection of the same spatial point on the two imaging planes, and the geometrical relationship includes polar plane, polar point, baseline, polar line, etc. Intuitively, from the perspective of the first frame, a ray is a possible spatial location of a pixel, since all points on the ray are projected to the same pixel. The focal point of the first frame image and the second frame image is P, if the position of P is unknown, the connecting line is the position of the projection that P may appear when looking on the second image, namely the projection of the ray in the second camera. Now, since the pixel position on the second frame image is determined by feature point matching, the spatial position of P, and the motion of the camera, can be inferred, and the basis matrix is obtained through a series of inference calculations. According to epipolar geometry, an 8-point method is adopted when the intrinsic matrix is solved, so that at least 8 points are needed for the estimation processing of the third to-be-matched to obtain a basic matrix, the matching error of a USAC _ MAGSAC estimator is set to be 0.1845-0.999999, the maximum iteration number is 10000, and higher matching accuracy can be obtained.
In an embodiment, after the third key point to be matched is subjected to matching estimation processing to obtain a prediction basis matrix, the image feature matching method further calculates the accuracy of the prediction basis matrix and a preset real basis matrix to obtain the matching accuracy, so as to evaluate a feature matching result. The preset real basic matrix is a real basic matrix corresponding to the image to be matched; and calculating the Accuracy of the prediction basis matrix and the actual basis matrix by using the Average Accuracy (mAA) as an evaluation index to obtain the matching Accuracy. The matching accuracy can reflect the accuracy of feature matching and the performance of an image feature matching algorithm. And after the mAA extracts the characteristic points from the two photos through an algorithm and matches the characteristic points, calculating the relative posture of one image relative to the other image according to the same-name points of the two photos. And evaluating the algorithm according to the estimated mAA of the relative pose.
As shown in fig. 7, an image I to be matched is obtained, paired images with coincidence are marked as I1 and I2, feature extraction is performed on I1 and I2 through a LoFTR type to obtain a plurality of pairs of first key points to be matched, feature extraction is performed on I1 and I2 through DKM to obtain a plurality of pairs of second key points to be matched, feature splicing and fusion processing is performed on the first key points to be matched and the second key points to be matched to obtain a third key point to be matched, and the third key points to be matched are estimated by using magsa to obtain a prediction basis matrix. By fusing the key points extracted by the two different models, the matching accuracy of the image matching algorithm can be effectively improved in a complex scene, the performance of the image matching algorithm is improved, and the manpower, material resources and financial resources are saved.
As shown in fig. 8, an embodiment of the present application provides an image feature matching apparatus 100, where the image feature matching apparatus 100 includes: acquiring images to be matched by using an image acquisition module 110, wherein the images to be matched are paired images which are partially overlapped; then, the first feature extraction module 120 performs feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched, the preset feature matching model can perform coarse-grained and fine-grained step-by-step matching, and the existing indoor and outdoor data sets reach a higher level; and then, the second feature extraction module 130 performs feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched. A feature vector is deduced by using a preset geometric density model, so that global matching is facilitated; the feature fusion module 140 is adopted to perform feature fusion processing on the first key point to be matched and the second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched, and the obtained third key points to be matched have better matching effect because the correlation between the first key point to be matched and the second key point to be matched is lower; and finally, performing matching estimation processing on the third key point to be matched by using the matrix estimation module 150 to obtain a prediction basis matrix, and performing image matching by using a preset basis matrix to obtain higher matching accuracy.
It should be noted that the image obtaining module 110 is connected to the first feature extraction module 120, the first feature extraction module 120 is connected to the second feature extraction module 130, the second feature extraction module 130 is connected to the feature fusion module 140, and the feature fusion module 140 is connected to the matrix estimation module 150. The first feature extraction module 120 is a module that performs feature extraction by using a preset feature matching model; the second feature extraction module 130 is a module for performing feature extraction using a preset geometric density model. The image feature matching method acts on the image feature matching device 100, and the image feature matching device 100 can effectively improve the matching accuracy of the image matching algorithm, improve the performance of the image matching algorithm and save manpower, material resources and financial resources in a complex scene by fusing key points extracted by two different models.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
Fig. 9 illustrates a computer device 500 provided by an embodiment of the present application. The computer device 500 may be a base station or a terminal, and the internal structure of the computer device 500 includes but is not limited to:
a memory 510 for storing programs;
a processor 520 for executing the program stored in the memory 510, wherein when the processor 520 executes the program stored in the memory 510, the processor 520 is configured to perform the image feature matching method described above.
The processor 520 and memory 510 may be connected by a bus or other means.
The memory 510, as a non-transitory computer-readable storage medium, may be used to store a non-transitory software program and a non-transitory computer-executable program, such as the image feature matching method described in any embodiment of the present application. The processor 520 implements the image feature matching method described above by running non-transitory software programs and instructions stored in the memory 510.
The memory 510 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data for performing the image feature matching method described above. Further, the memory 510 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 510 may optionally include memory located remotely from the processor 520, which may be connected to the processor 520 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the image feature matching methods described above are stored in the memory 510 and, when executed by the one or more processors 520, perform the image feature matching methods provided by any of the embodiments of the present application.
The embodiment of the application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used for executing the image feature matching method.
In one embodiment, the storage medium stores computer-executable instructions, which when executed by one or more control processors 520, for example, by one of the processors 520 in the computer device 500, may cause the one or more processors 520 to perform the image feature matching method provided in any embodiment of the present application.
The above described embodiments are merely illustrative, wherein elements illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The terms "first," "second," "third," and the like (if any) in the description of the present application and in the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the above embodiments, and those skilled in the art will appreciate that the present application is not limited thereto. Under the shared conditions, various equivalent modifications or substitutions can be made, and the equivalent modifications or substitutions are included in the scope defined by the claims of the present application.

Claims (10)

1. An image feature matching method, comprising:
acquiring images to be matched, wherein the images to be matched are paired images which are partially overlapped;
performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched;
performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched;
performing feature fusion processing on the first key point to be matched and a second key point to be matched corresponding to the first key point to be matched to obtain a plurality of pairs of third key points to be matched;
and carrying out matching estimation processing on the third key points to be matched to obtain a prediction basis matrix.
2. The image feature matching method according to claim 1, wherein the performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of first key points to be matched includes:
performing feature extraction processing on the image to be matched by using a preset feature matching model to obtain a plurality of pairs of fourth key points to be matched;
and performing confidence calculation on the multiple pairs of the fourth key points to be matched, and selecting the front K1 pair with the highest confidence score to the fourth key points to be matched to obtain multiple pairs of the first key points to be matched.
3. The image feature matching method according to claim 2, wherein the performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of second key points to be matched comprises:
performing feature extraction processing on the image to be matched by using a preset geometric density model to obtain a plurality of pairs of fifth key points to be matched;
and performing confidence calculation on the multiple pairs of the fifth key points to be matched, and selecting the K1 pair of the fifth key points to be matched before the highest confidence score to obtain multiple pairs of the second key points to be matched.
4. The image feature matching method according to claim 1, wherein before the acquiring of the image to be matched, which is a pair of partially overlapped images, the method further comprises:
acquiring initial matching images which are paired images partially overlapped;
and carrying out image enhancement processing on the initial matching image to obtain the image to be matched.
5. The image feature matching method according to claim 1, wherein after the performing the matching estimation process on the third keypoint to be matched to obtain a prediction basis matrix, the method further comprises: and calculating the accuracy of the prediction basis matrix and a preset real basis matrix to obtain the matching accuracy so as to evaluate the feature matching result.
6. The image feature matching method according to claim 1, wherein the performing the matching estimation processing on the third to-be-matched key point to obtain a prediction basis matrix comprises: and performing matching estimation processing on the third key point to be matched by using a preset estimator to obtain the prediction basis matrix.
7. The image feature matching method according to claim 1, wherein the preset feature matching model is obtained by:
obtaining an image matching dataset comprising a plurality of pairs of image data having an overlap;
obtaining an initial feature matching model;
performing feature extraction on each pair of image data by using the initial feature matching model to obtain a first extraction feature set;
calculating a loss function based on the first extraction feature set to obtain a value of the first loss function;
training the initial feature matching model based on the value of the first loss function, and obtaining the feature matching model under the condition that the value of the first loss function meets a preset condition.
8. The image feature matching method according to claim 7, wherein the preset geometric density model is obtained by:
obtaining an initial geometric density model;
performing feature extraction on each pair of image data by using the initial geometric density model to obtain a second extraction feature set;
calculating a loss function based on the second extraction feature set to obtain a value of a second loss function;
and training the initial geometric density model based on the value of the second loss function, and obtaining the geometric density model under the condition that the value of the second loss function meets a preset condition.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by one or more of the processors, cause the one or more processors to carry out the steps of the method as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium readable by a processor, the storage medium storing computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1 to 8.
CN202211505976.5A 2022-11-29 2022-11-29 Image feature matching method, computer device and readable storage medium Pending CN115527050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211505976.5A CN115527050A (en) 2022-11-29 2022-11-29 Image feature matching method, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211505976.5A CN115527050A (en) 2022-11-29 2022-11-29 Image feature matching method, computer device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115527050A true CN115527050A (en) 2022-12-27

Family

ID=84704902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211505976.5A Pending CN115527050A (en) 2022-11-29 2022-11-29 Image feature matching method, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115527050A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116206111A (en) * 2023-03-07 2023-06-02 广州市易鸿智能装备有限公司 Defect identification method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060493A (en) * 2016-07-07 2016-10-26 广东技术师范学院 Multi-source projection seamless edge stitching method and system
CN108961381A (en) * 2017-05-17 2018-12-07 富士通株式会社 Method and apparatus for the 3-D geometric model coloring to object
US20210209849A1 (en) * 2020-01-03 2021-07-08 Vangogh Imaging, Inc. Multiple maps for 3d object scanning and reconstruction
CN113298098A (en) * 2021-05-20 2021-08-24 Oppo广东移动通信有限公司 Fundamental matrix estimation method and related product
JP2021174537A (en) * 2020-04-28 2021-11-01 富士通株式会社 Image processing device, image processing method, and machine-readable storage medium
CN114168768A (en) * 2021-12-07 2022-03-11 深圳市华尊科技股份有限公司 Image retrieval method and related equipment
US20220253981A1 (en) * 2019-08-15 2022-08-11 Ricoh Company, Ltd. Image processing method and apparatus and non-transitory computer-readable medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060493A (en) * 2016-07-07 2016-10-26 广东技术师范学院 Multi-source projection seamless edge stitching method and system
CN108961381A (en) * 2017-05-17 2018-12-07 富士通株式会社 Method and apparatus for the 3-D geometric model coloring to object
US20220253981A1 (en) * 2019-08-15 2022-08-11 Ricoh Company, Ltd. Image processing method and apparatus and non-transitory computer-readable medium
US20210209849A1 (en) * 2020-01-03 2021-07-08 Vangogh Imaging, Inc. Multiple maps for 3d object scanning and reconstruction
JP2021174537A (en) * 2020-04-28 2021-11-01 富士通株式会社 Image processing device, image processing method, and machine-readable storage medium
CN113298098A (en) * 2021-05-20 2021-08-24 Oppo广东移动通信有限公司 Fundamental matrix estimation method and related product
CN114168768A (en) * 2021-12-07 2022-03-11 深圳市华尊科技股份有限公司 Image retrieval method and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
公安部第三研究所, 东南大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116206111A (en) * 2023-03-07 2023-06-02 广州市易鸿智能装备有限公司 Defect identification method and device, electronic equipment and storage medium
CN116206111B (en) * 2023-03-07 2024-02-02 广州市易鸿智能装备有限公司 Defect identification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110059558B (en) Orchard obstacle real-time detection method based on improved SSD network
CN111795704B (en) Method and device for constructing visual point cloud map
CN108960211B (en) Multi-target human body posture detection method and system
CN113076871B (en) Fish shoal automatic detection method based on target shielding compensation
CN111161311A (en) Visual multi-target tracking method and device based on deep learning
CN109960742B (en) Local information searching method and device
CN109410316B (en) Method for three-dimensional reconstruction of object, tracking method, related device and storage medium
CN114677554A (en) Statistical filtering infrared small target detection tracking method based on YOLOv5 and Deepsort
CN111091101B (en) High-precision pedestrian detection method, system and device based on one-step method
CN113313763B (en) Monocular camera pose optimization method and device based on neural network
CN110766061B (en) Road scene matching method and device
CN112634369A (en) Space and or graph model generation method and device, electronic equipment and storage medium
CN112036381B (en) Visual tracking method, video monitoring method and terminal equipment
CN113850136A (en) Yolov5 and BCNN-based vehicle orientation identification method and system
CN112634368A (en) Method and device for generating space and OR graph model of scene target and electronic equipment
CN111709317A (en) Pedestrian re-identification method based on multi-scale features under saliency model
CN115527050A (en) Image feature matching method, computer device and readable storage medium
CN113487610B (en) Herpes image recognition method and device, computer equipment and storage medium
CN108876776B (en) Classification model generation method, fundus image classification method and device
CN110472092B (en) Geographical positioning method and system of street view picture
CN117218545A (en) LBP feature and improved Yolov 5-based radar image detection method
CN116258877A (en) Land utilization scene similarity change detection method, device, medium and equipment
CN114743045B (en) Small sample target detection method based on double-branch area suggestion network
CN113570713B (en) Semantic map construction method and device for dynamic environment
CN115830342A (en) Method and device for determining detection frame, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221227