Tower antenna panoramic image stitching method based on joint optimization of SIFT and deep learning

By combining SIFT and deep learning methods, the problem of inaccurate feature point matching and low splicing efficiency in the tower antenna scene is solved, and efficient and accurate panoramic image splicing is achieved.

CN118154417BActive Publication Date: 2024-09-03CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410079474.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2024-09-03
Estimated Expiration
2044-01-19

AI Technical Summary

Technical Problem

Existing technology: In the tower antenna scene, the traditional SIFT algorithm cannot accurately match feature points, and the deep learning image stitching algorithm is inefficient, resulting in low panoramic image stitching quality.

Method used

A joint optimization method based on SIFT and deep learning is used to obtain image correspondence through the geometric feature matching network and SIFT feature matching network, use the closed-loop detection network to determine the camera revisit scene, and generate the homography transformation matrix through the RANSAC homography estimator , construct pose graphs for joint optimization, and finally achieve panoramic image stitching.

Benefits of technology

The feature matching accuracy and splicing efficiency in the tower antenna scene are improved, ensuring the accuracy and stability of the panoramic image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118154417B
    Figure CN118154417B
Patent Text Reader

Abstract

A method for stitching panoramic images of iron tower antennas based on joint optimization of SIFT and deep learning, firstly inputting two adjacent frames of images into a geometric feature matching network, a SIFT feature matching network and a loop detection network respectively to obtain a multimodal feature matching relationship of the image; then inputting the feature matching relationship into the homography estimator of RANSAC to obtain a multimodal homography transformation matrix and a deterministic covariance matrix representing the matrix estimation; then using a joint optimization method based on a pose graph to optimize the multimodal homography transformation matrix; finally using the optimized matrix for image stitching to obtain a panoramic image. The present invention can combine the advantages of SIFT's invariance and high efficiency with the advantage of deep learning's ability to capture richer feature information, more accurately estimate the homography matrix while ensuring the efficiency of image stitching, and improve the accuracy and stability of the overall iron tower antenna panoramic image stitching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a panoramic image stitching method, in particular to a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization, belonging to the technical field of image processing. Background Art

[0002] Counting the number of tower antennas is an important task in tower inspection. Tower antennas are the core components to ensure the normal operation of towers. At present, this work still mainly relies on manual statistics, but this method has many disadvantages, such as limited inspection viewing angle. The traditional manual tower climbing is limited by the tower structure. Tower maintenance personnel can easily miss hidden dangers through naked eye observation and cannot confirm the accuracy of information, resulting in reduced inspection efficiency. In addition, the tower has a certain height, which poses a great risk to the personal safety of inspection personnel. Therefore, drone equipment can be introduced to take pictures around the tower antenna at high altitude, and then a panoramic image stitching algorithm can be used to obtain a complete panoramic picture to facilitate inspection personnel to count the number of antennas, thereby improving the safety and efficiency of inspection tasks. At present, the main panoramic image stitching methods are traditional algorithms and deep learning algorithms.

[0003] Traditionally, the Scale-Invariant Feature Transform (SIFT) algorithm is commonly used for feature point detection and matching in image stitching. The SIFT algorithm extracts image feature points and generates descriptors for each key point. When performing image matching, the descriptors of these key points are used as input, and densely matched key point descriptors are generated through nearest neighbor search. The SIFT algorithm is rotation and scale invariant, and can detect and describe the same feature points at different scales and angles, so it is more efficient when performing panoramic image stitching. However, for the tower antenna scene, due to the high similarity between objects, such as antennas, railings and other objects, the SIFT algorithm may not be able to accurately match the feature points, which will affect the quality of image stitching and may lead to incorrect stitching results.

[0004] Compared with the traditional SIFT algorithm for image stitching, the deep learning-based image stitching algorithm can learn image representation end-to-end, which enables it to more fully understand the content and structure in the image. For objects with high appearance similarity in the tower antenna scene, deep learning models are usually able to use richer and more complex feature expressions to improve the recognition and matching capabilities of these areas. This more advanced feature representation makes the deep learning-based image stitching method more robust and adaptable. However, deep learning models may face limitations in memory and computing resources when processing panoramic image stitching, making it difficult to achieve efficient panoramic image stitching. Summary of the invention

[0005] The purpose of the present invention is to provide a tower antenna panoramic image stitching method based on the joint optimization of SIFT and deep learning, which can improve the accuracy of feature matching in the tower antenna scene while ensuring the feature point matching speed, thereby ensuring the accuracy and efficiency of the overall tower antenna panoramic image stitching.

[0006] In order to achieve the above object, the present invention provides a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization, comprising the following steps:

[0007] S1: Use a camera to collect tower antenna image data. The overlapping area of ​​two adjacent images is required to account for 1 / 4 to 1 / 2 of the entire image. The image sequence is obtained, denoted as I. The image sequence is: I = {I0,…,I i ,I i+1}, where: 0,…,i,i+1 represents the image sequence number;

[0008] S2: Obtain the correspondence between image geometric features and image SIFT features through different feature matching networks, and use the closed loop detection network to determine whether the camera revisits the previous scene;

[0009] S3: The image geometric features and the correspondence between the image SIFT features are input into the homography estimator to generate the relevant homography transformation matrix, and each estimated transformation matrix is ​​associated with a covariance matrix, which represents the certainty of the estimation;

[0010] S4: Joint optimization of the homography transformation matrix is ​​achieved by constructing a pose graph, and image stitching is performed according to the optimized homography transformation matrix to obtain a panoramic image.

[0011] In step S2 of the present invention, the geometric feature matching network N based on deep learning is simultaneously put into the image pair. Geo And SIFT feature matching network N SIFT , and obtain the corresponding relationship M of the image geometric features respectively Geo And the image SIFT feature correspondence M SIFT , in the closed-loop detection network N LC In the example, only the first frame is recorded as the key frame, and then the corresponding relationship between the key frame and other frames is calculated, recorded as M LC , to determine whether the camera revisits the previous scene.

[0012] The image geometric feature correspondence and the image SIFT feature correspondence obtained in step S2 of the present invention are specifically as follows:

[0013] S21: Input image sequence I={I0,...,I i ,I i+1}, for the geometric feature matching network N Geo The process is to use the Res2Net network to extract image pairs {I i ,I i+1} multi-scale features f i ={f i 1 ,f i 2 ,f i 3 ,...,f i n}, f i+1 ={f i+1 1 ,f i+1 2 ,f i+1 3 ,...,f i+1 n}, where the high-dimensional scale features are roughly matched to pixels through the coarse matching module M c , and use GeoFormer to identify potential matching regions between input image pairs accordingly. Using the standard Transformer framework, GeoFormer calculates self-attention in a sparse manner and cross-attention in a concentrated manner; the two attention pairs are used to roughly match M c The matching points in the filter are then fed to the fine matching module to generate the fine matching M Geo , that is, the corresponding relationship between the geometric features of the image;

[0014] S22: Input image sequence I={I0,...,I i ,I i+1}, for SIFT feature matching network N SIFT The process is to use the feature descriptors extracted by the SIFT algorithm to find the most similar descriptors in different images, and then calculate the similarity metrics between the descriptors (such as Euclidean distance, Hamming distance, etc.) to find the corresponding feature points in different images. These matching feature point pairs represent the locations with similar visual features in different images, thereby establishing a matching relationship M between the image feature points. SIFT , that is, the correspondence between image SIFT features;

[0015] S23: Input image sequence I={I0,...,I i ,I i+1}, for the closed-loop detection network N LC, only the first frame in the sequence is a key frame, then the SIFT key point features are extracted from the key frame, and the SIFT features of the key frame are stored using the library; next, the similarity between the key frame and other frames is calculated to check whether the camera has revisited the previous scene, and the SIFT algorithm is used to obtain Keyframes and other frames The corresponding relationship M LC , the above corresponding relationship M Geo 、M SIFT and M LC The specific definition is:

[0016]

[0017] Among them: key frame I Key =I0

[0018] Step S3 of the present invention is specifically: inputting the image geometric features and the image SIFT feature correspondence into the homography estimator F of RANSAC RANSAC Generate the homography transformation matrix for geometric feature matching, the homography transformation matrix for SIFT feature matching, and the homography transformation matrix for closed loop detection, denoted as H Geo , H SIFT and H LC , the above homography transformation matrix H Geo , H SIFT and H LC ; The specific definition is:

[0019]

[0020] At the same time, each estimated transformation matrix is ​​associated with a covariance matrix Σ, which represents the certainty of the estimate; the RANSAC method is used to identify outliers and abnormal values. The identification of outliers and abnormal values ​​is based on the pixel distance between a point in one image and the corresponding point in the other image reprojected by the corresponding homography transformation matrix. The covariance of the homography transformation matrix of the geometric feature matching It is calculated based on the ratio of outliers; small covariance of the homography transformation matrix of SIFT feature matching And the covariance of the homography transformation matrix for loop closure detection It is calculated based on the outlier ratio and the number of features.

[0021] Step S4 of the present invention is specifically as follows:

[0022] S41: Construct the pose graph to be optimized as Φ = {V, E}, where V = {x0, x1, x2, ..., x n} is the vertex set, E={y 0,1 ,y 1,2 ,y 2,3,...,y LC} is the edge set, and y is the estimated homography transformation matrix Together, x represents the i-th image relative to key frame I key The transformation of the image constitutes the state that needs to be estimated; the edge set defines the constraints between vertex pairs, which are obtained from the homography transformation matrix jointly constitute;

[0023] S42: After optimizing the pose graph, the optimized homography transformation matrix for image stitching can be obtained The specific definition is:

[0024]

[0025] S43: All images can be stitched together according to the intermediate frames in the sequence to obtain a panoramic image.

[0026] The panoramic image stitching process in step S4 of the present invention is specifically as follows: using the optimized homography transformation matrix The coordinates of the four corners of the panorama are distorted for each image, and the minimum and maximum angles in two directions of all distorted images are obtained to create a canvas of the same size as the panorama. All images are placed in the canvas in sequence according to the coordinate positions after distortion, and images at different times are in different positions in the canvas. In order to make the final stitching effect more natural, it is necessary to remove the overlapping parts between the images, that is, based on the middle frame, the common parts between the two adjacent frames are cropped according to the mask obtained by the matching relationship between the image feature points. Finally, the cropped images are stitched together in order to obtain the final panoramic stitching image of the tower antenna.

[0027] Compared with the prior art, the present invention aims at the problem that the SIFT algorithm cannot accurately match feature points and the deep learning image stitching algorithm is inefficient, and provides a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization. The acquired image sequence is put into the geometric feature matching network based on deep learning and the SIFT feature matching network in the form of image pairs to obtain the image geometric feature correspondence and the image SIFT feature correspondence respectively, and the closed-loop detection is used to obtain the correspondence between the key frame and other frames to determine whether the camera has revisited the previous scene; the correspondence is input into the homography estimator of RANSAC to generate the homography transformation matrix based on geometric feature matching and the homography transformation matrix based on SIFT feature matching; then the pose graph is constructed to realize the joint optimization of the homography transformation matrix; finally, the image is stitched according to the obtained optimized homography transformation matrix to obtain a panoramic image. While ensuring the speed of feature point matching, the present invention uses a deep learning method to improve the accuracy of feature matching in the tower antenna scene, thereby ensuring the accuracy and efficiency of the overall panoramic image stitching. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is the overall framework diagram of the method of the present invention;

[0029] Figure 2 It is a schematic diagram of the method flow of the present invention;

[0030] Figure 3 The following is a visualization of the matching relationship of images based on geometric features, where (a) shows the correct geometric feature matching relationship between the first frame and the second frame, and (b) shows the correct geometric feature matching relationship between the second frame and the third frame;

[0031] Figure 4 The image matching relationship visualization diagram based on SIFT features, where (a) represents the correct SIFT feature matching relationship between the first frame and the second frame, (b) represents the correct SIFT feature matching relationship between the second frame and the third frame, and (c) represents the incorrect SIFT feature matching relationship between the first frame and the third frame;

[0032] Figure 5 is the pose graph constructed by the homography transformation matrix;

[0033] Figure 6 The position map of the first frame of the picture in the panoramic canvas;

[0034] Figure 7 The position map of the second frame image in the panoramic canvas;

[0035] Figure 8 The position diagram of the third frame image in the panoramic canvas;

[0036] Fig. 9 A mask image to remove overlapping areas between images;

[0037] Fig.10 This is a mosaic of panoramic images of the tower antenna. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with the accompanying drawings.

[0039] like Figure 1 and Figure 2 As shown, a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization includes the following steps:

[0040] S1: Use a camera to collect tower antenna image data. The overlapping area of ​​two adjacent images is required to account for 1 / 4 to 1 / 2 of the entire image. The image sequence is obtained, denoted as I. The image sequence is: I = {I0, ..., I i ,I i+1}, where: 0,...,i,i+1 represents the image sequence number;

[0041] S2: Obtain the correspondence between image geometric features and image SIFT features through different feature matching networks, and use the closed loop detection network to determine whether the camera revisits the previous scene;

[0042] In the form of image pairs, a geometric feature matching network based on deep learning is simultaneously put into N Geo And SIFT feature matching network N SIFT , and obtain the corresponding relationship M of the image geometric features respectively Geo And the image SIFT feature correspondence M SIFT , using the closed-loop detection network N LC , only the first frame is recorded as the key frame, and then the corresponding relationship between the key frame and other frames is calculated, recorded as M LC , to determine whether the camera revisits the previous scene.

[0043] The specific method for obtaining the corresponding relationship between image geometric features and image SIFT features is as follows:

[0044] S21: Input image sequence I = {I0, ..., Ii, Ii +1}, for the geometric feature matching network N Geo The process is to use the Res2Net network to extract image pairs {I i ,I i+1} multi-scale features f i ={f i 1 ,fi 2 ,f i 3 ,...,f i n}, f i+1 ={f i+1 1 ,f i+1 2 ,f i+1 3 ,...,f i+1 n}, where the high-dimensional scale features are roughly matched to pixels through the coarse matching module M c , and use GeoFormer to identify potential matching regions between input image pairs accordingly. Using the standard Transformer framework, GeoFormer calculates self-attention in a sparse manner and cross-attention in a concentrated manner; the two attention pairs are used to roughly match M c The matching points in the filter are then fed to the fine matching module to generate the fine matching M Geo , that is, the corresponding relationship between the geometric features of the image;

[0045] S22: Input image sequence I = {I0, ..., Ii, Ii +1}, for SIFT feature matching network N SIFT The process is to use the feature descriptors extracted by the SIFT algorithm to find the most similar descriptors in different images, and then calculate the similarity metrics between the descriptors (such as Euclidean distance, Hamming distance, etc.) to find the corresponding feature points in different images. These matching feature point pairs represent the locations with similar visual features in different images, thereby establishing a matching relationship M between the image feature points. SIFT , that is, the correspondence between image SIFT features;

[0046] S23: Input image sequence I={I0,...,I i ,I i+1}, for the closed-loop detection network N LC , only the first frame in the sequence is recorded as a key frame, and then the SIFT key point features are extracted from the key frame, and the SIFT features of the key frame are stored in the library; next, the similarity between the key frame and other frames is calculated to check whether the camera revisits the previous scene; and the corresponding relationship M between the key frame and other frames is obtained using the SIFT algorithm LC , the above corresponding relationship M Geo 、M SIFT and M LC The specific definition is:

[0047]

[0048] Among them: key frame I Key =I0

[0049] S3: The image geometric features and the correspondence between the image SIFT features are input into the homography estimator to generate the relevant homography transformation matrix, and each estimated transformation matrix is ​​associated with a covariance matrix, which represents the certainty of the estimation;

[0050] Specifically: Input the image geometric features and the correspondence between the image SIFT features into the homography estimator F of RANSAC RANSAC Generate the homography transformation matrix for geometric feature matching, the homography transformation matrix for SIFT feature matching, and the homography transformation matrix for closed loop detection, denoted as H Geo , H SIFT and H LC , the above homography transformation matrix H Geo , H SIFT and H LC , specifically defined as:

[0051]

[0052] At the same time, each estimated transformation matrix is ​​associated with a covariance matrix Σ, which represents the certainty of the estimate; the RANSAC method is used to identify outliers and abnormal values. The identification of outliers and abnormal values ​​is based on the pixel distance between a point in one image and the corresponding point in the other image reprojected by the corresponding homography transformation matrix. The covariance of the homography transformation matrix of the geometric feature matching It is calculated based on the ratio of outliers; the covariance of the homography transformation matrix of SIFT feature matching And the covariance of the homography transformation matrix for loop closure detection It is calculated based on the outlier ratio and the number of features.

[0053] S4: Joint optimization of the homography transformation matrix is ​​realized by constructing a pose graph, and image stitching is performed according to the optimized homography transformation matrix to obtain a panoramic image;

[0054] S4 is specifically:

[0055] S41: Construct the pose graph to be optimized as Φ = {V, E}, where V = {x0, x1, x2, ..., x n} is the vertex set, E={y 0,1 ,y 1,2 ,...,y LC} is the edge set, and y is the estimated homography transformation matrix Together, x represents the i-th image relative to key frame I key The transformation of the image constitutes the state that needs to be estimated; the edge set defines the constraints between vertex pairs, which are obtained from the homography transformation matrix jointly constitute;

[0056] S42: After optimizing the pose graph, the optimized homography transformation matrix for image stitching can be obtained The specific definition is:

[0057]

[0058] S43: All images can be stitched together according to the intermediate frames in the sequence to obtain a panoramic image.

[0059] The panoramic image stitching process in step S4 is specifically as follows: using the optimized homography transformation matrix The coordinates of the four corners of the panorama are distorted for each image, and the minimum and maximum angles in two directions of all distorted images are obtained to create a canvas of the same size as the panorama. All images are placed in the canvas in sequence according to the coordinate positions after distortion, and images at different times are in different positions in the canvas. In order to make the final stitching effect more natural, it is necessary to remove the overlapping parts between the images, that is, based on the middle frame, the common parts between the two adjacent frames are cropped according to the mask obtained by the matching relationship between the image feature points. Finally, the cropped images are stitched together in order to obtain the final panoramic stitching image of the tower antenna.

[0060] An embodiment of the present invention is given

[0061] In the tower antenna scene, the traditional SIFT image stitching algorithm will detect too many key points, resulting in inaccurate matching between image feature points; and the image stitching algorithm based on deep learning can use richer and more complex feature expressions to improve the recognition ability of these areas and improve the accuracy of image matching, but the deep learning model faces limitations in memory and computing resources when processing panoramic image stitching, which will reduce the overall stitching efficiency; in order to effectively solve these shortcomings, the present invention discloses a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization, and the specific steps are as follows:

[0062] Step S1: using a camera to collect image data;

[0063] like Figure 1 As shown in the overall framework diagram, in the process of image data acquisition, the overlapping area of ​​two adjacent images is required to account for 1 / 4 to 1 / 2 of the entire image, and an image sequence is obtained, which is recorded as I;

[0064] Assume that the image sequence is: I = {I0, ..., I i ,I i+1}, where: 0,...,i,i+1 represents the image sequence number;

[0065] Step S2: Multimodal image registration, obtaining the image geometric feature correspondence and the image SIFT feature correspondence through different feature matching networks. Since image acquisition is a closed-loop process, a closed-loop detection network can be used to determine whether the camera has revisited the previous scene;

[0066] For the image geometric feature correspondence matching network N Geo , input image sequence I={I0,...,Ii,Ii +1}, use the Res2Net network (Gao SH, Cheng MM, Zhao K, et al. Res2net: A new multi-scale backbone architecture [J]. IEEE transactions on pattern analysis and machine intelligence, 2019, 43 (2): 652-662.) to extract image pairs {P i ,P i+1} multi-scale features f i ={f i 1 ,f i 2 ,f i 3 ,...,f i n}, f i+1 ={f i+1 1 ,f i+1 2 ,f i+1 3 ,...,f i+1 n The feature graph branch in Res2Net allows information exchange between different branches and cross-level information transfer. This communication mechanism helps to improve the representation ability of features, enhance the network's ability to represent tower antenna features, and extract more refined features, which is beneficial for subsequent feature matching. For the extracted multi-scale features, the high-dimensional scale features are passed through the coarse matching module to obtain a rough pixel-to-pixel match M. c, and use GeoFormer (Liu J, Li X. Geometrized Transformer for Self-Supervised Homography Estimation [C] / / Proceedings of the IEEE / CVF International Conference on Computer Vision. 2023: 9556-9565.) to identify potential matching regions between input image pairs accordingly, using the standard Transformer framework GeoFormer calculates self-attention in a sparse manner, that is, focusing on the obvious features of the geometric structure of a single image itself; at the same time, it calculates cross-attention in a concentrated manner, that is, focusing on the features of similar geometric structures between two images. c The matching points in the image are filtered, and then the filtered matching points are fed to the fine matching module to generate the image geometric feature correspondence M Geo ;

[0067] The image geometric feature correspondence relationship M Geo Visualization, such as Figure 3 As shown, the geometric structure features of the tower antenna scene are well matched;

[0068] The above image geometric feature correspondence relationship M Geo It can be defined as:

[0069]

[0070] For SIFT feature matching network N SIFT , input image sequence I={I0,...,I i ,I i+1}, using the feature descriptors extracted by the SIFT algorithm, we search for the most similar descriptors in different images, and then calculate the similarity metrics between the descriptors (such as Euclidean distance, Hamming distance, etc.) to find the corresponding feature points in different images. These matching feature point pairs represent locations with similar visual features in different images, thus establishing the image SIFT feature correspondence relationship M between the image feature points SIFT ;

[0071] The image SIFT feature correspondence M SIFT Visualization, such as Figure 4 As shown in the figure, the texture features of the tower antenna scene are matched to a certain extent, but some false matches will occur. Figure 4In the figure, (a) shows the correct SIFT feature matching relationship between the first frame and the second frame, (b) shows the correct SIFT feature matching relationship between the second frame and the third frame, and (c) shows the incorrect SIFT feature matching relationship between the first frame and the third frame. However, since the network also learns the geometric structure feature matching relationship in the tower antenna scene, the network can suppress incorrect matching to a certain extent and reduce the impact on the accuracy of the final panoramic image stitching.

[0072] The above image SIFT feature correspondence relationship M SIFT It can be defined as:

[0073]

[0074] For the closed-loop detection network N LC , input image sequence I={I0,…,I i ,I i+1}, the first frame in the sequence is the key frame, then the SIFT key point features are extracted from the key frame, and the SIFT features of the key frame are stored in the library, the similarity between the key frame and other frames is calculated to check whether the camera revisits the previous scene, and the corresponding relationship M between the key frame and other frames is obtained using the SIFT algorithm LC ;

[0075] The above correspondence relationship M LC Specifically it can be defined as:

[0076]

[0077] Step S3: homography matrix estimation and variance estimation,

[0078] The above correspondence relationship M Geo 、M SIFT and M LC Input to RANSAC’s homography estimator F RANSAC Generate the homography transformation matrix for geometric feature matching, the homography transformation matrix for SIFT feature matching, and the homography transformation matrix for closed loop detection, denoted as H Geo , H SIFT and H LC ;

[0079] The RANSAC-based homography estimator process can be modeled as:

[0080]

[0081] Where [u, v, 1] represents the homogeneous coordinates of the feature points of the target image, [u', v', 1] represents the homogeneous coordinates of the feature points of the source image, and [u, v, 1], [u', v', 1] are the matching point pairs in the matching feature points in the two images, s represents the image scaling factor, and H represents the homography transformation matrix.

[0082] The above corresponding relationship H Geo , H SIFT and H LC ; Specifically it can be defined as:

[0083]

[0084] At the same time, each estimated transformation matrix is ​​associated with a covariance matrix Σ, which represents the certainty of the estimate; the covariance matrix can be used to measure the confidence or certainty of the estimated transformation matrix. The elements on the diagonal usually represent the variance of the estimated parameters, and the off-diagonal elements represent the covariance between different parameters. A smaller variance means that the estimated result is more reliable, and a larger variance may indicate a higher uncertainty in the estimated result.

[0085] Outliers and outliers are identified using the RANSAC method based on the pixel distance between a point in one image and the corresponding point in the other image reprojected by the corresponding homography.

[0086] Homography transformation matrix based on geometric features Geo The covariance of is calculated based on the ratio of outliers.

[0087] Covariance of homography transformation matrix based on handcrafted feature SIFT and the covariance for loop closure detection Based on is calculated based on the outlier ratio and the number of features.

[0088] Step S4: Optimization and splicing,

[0089] The pose graph to be optimized can be constructed as Φ = {V, E}, where V = {x0, x1, x2, ..., x n} is the vertex set, E={y 0,1 ,y 1,2 ,...,y LC} is the edge set, and y is the estimated homography transformation matrix Together, x represents the i-th image relative to key frame I key The transformations of the image, which constitute the state that needs to be estimated (optimized). The edge set defines the constraints between vertex pairs, which are obtained from the homography transformation matrix jointly constitute;

[0090] The constructed pose graph is as follows Figure 5 As shown, the starting point is randomly generated according to the homography transformation matrix Get the transformed trajectory points, and then An affine transformation is performed to obtain the corresponding affine transformation matrix, and edge constraints based on geometric features and SIFT features are obtained between different vertices. Finally, edge constraints based on closed-loop detection are used to converge the overall pose graph.

[0091] After optimizing the pose graph, the homography transformation matrix for image stitching can be obtained. Specifically it can be defined as:

[0092]

[0093] All images can be stitched together based on the intermediate frames in the sequence, using the optimized homography transformation matrix Distort the position of each image;

[0094] The coordinates of the four corners of the panorama can be obtained by the minimum and maximum angles of all the distorted images in two directions, creating a canvas of the same size as the panorama;

[0095] All images are placed in the canvas in sequence according to their coordinate positions after distortion, such as Figure 6 , Figure 7 and Figure 8 As shown, the images at different times are at different positions in the canvas.

[0096] In order to make the final stitching effect more natural, it is necessary to remove the overlapping parts between the images, that is, based on the middle frame, the common parts between the two adjacent frames are cropped according to the mask obtained by the matching relationship between the image feature points, such as Figure 8 shown.

[0097] Finally, the cropped images are stitched together in order to obtain the final panoramic stitching image of the tower antenna, as shown in the figure below. Fig.10 shown.

[0098] The present invention proposes a new panoramic image stitching method that combines SIFT and deep learning optimization. By utilizing the invariance and efficiency of the SIFT algorithm and the ability of deep learning to capture rich features, a joint optimization method based on a pose graph is used to solve the problems of incorrect matching of feature points of the SIFT algorithm in the tower antenna scene and low efficiency of deep learning in the prior art. This method maintains the high efficiency of image stitching, while more accurately estimating the homography matrix, thereby improving the accuracy and stability of the panoramic image stitching of the tower antenna. The present invention can solve the problem that the SIFT algorithm in the prior art cannot accurately match feature points and the problem that the deep learning image stitching algorithm is inefficient in the tower antenna scene.

Claims

1. A tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization, characterized in that: The following steps are involved: S1: Use a camera to collect tower antenna image data. The overlapping area of ​​two adjacent images is required to occupy 1 / 4 to 1 / 2 of the entire image. The image sequence is obtained, denoted as I. The image sequence is: I = {I0,…,I i ,I i+1 }, where: 0,…,i,i+1 represents the image sequence number; S2: Obtain the correspondence between image geometric features and image SIFT features through different feature matching networks, and use the closed loop detection network to determine whether the camera revisits the previous scene; S3: The image geometric feature correspondence and the image SIFT feature correspondence are input into the homography estimator to generate the relevant homography transformation matrix, and each estimated transformation matrix is ​​associated with a covariance matrix, which represents the certainty of the estimation; S4: Joint optimization of the homography transformation matrix is ​​realized by constructing a pose graph, and image stitching is performed according to the optimized homography transformation matrix to obtain a panoramic image; In step S2, the image pairs are simultaneously put into the deep learning-based geometric feature matching network N Geo And based on SIFT feature matching network N SIFT , respectively get the image geometric feature correspondence relationship M Geo And the image SIFT feature correspondence M SIFT , in the closed-loop detection network N LC In the example, only the first frame is recorded as the key frame, and then the corresponding relationship between the key frame and other frames is calculated, recorded as M LC , to determine whether the camera revisits the previous scene; The image geometric feature correspondence and the image SIFT feature correspondence obtained in step S2 are specifically: S21: Input image sequence I={I0,…,I i ,I i+1 }, for the geometric feature matching network N Geo The process is to use the Res2Net network to extract image pairs {I i ,I i+1 } multi-scale features f i ={f i 1 ,f i 2 ,f i 3 ,…,f i n }, f i+1 ={f i+1 1 ,f i+1 2 ,f i+1 3 ,…,f i+1 n }, where the high-dimensional scale features are roughly matched to pixels through the coarse matching module M c , and use GeoFormer to identify potential matching regions between input image pairs accordingly. Using the standard Transformer framework, GeoFormer calculates self-attention in a sparse manner and cross-attention in a concentrated manner; the two attention pairs are used to roughly match M c The matching points in the image are filtered, and then the filtered matching points are fed to the fine matching module to generate the fine matching, that is, the image geometric feature correspondence M Geo ; S22: Input image sequence I={I0,…,I i ,I i+1 }, for SIFT feature matching network N SIFT The process is to use the feature descriptors extracted by the SIFT algorithm to find the most similar descriptors in different images, and then calculate the similarity measure between the descriptors to find the corresponding feature points in different images. These matching feature point pairs represent the locations with similar visual features in different images, thereby establishing the matching relationship between image feature points, that is, the image SIFT feature correspondence relationship M SIFT ; S23: Input image sequence I={I0,…,I i ,I i+1 }, for the closed-loop detection network N LC , the first frame in the sequence is recorded as key frame I key , then from keyframe I key The SIFT key point features extracted from the key frame are stored in the library; the similarity between the key frame and other frames is calculated to check whether the camera revisits the previous scene, and the corresponding relationship M between the key frame and other frames is obtained using the SIFT algorithm. LC , the above corresponding relationship M Geo 、M SIFT and M LC The specific definition is: Among them: key frame I key =I0; Step S3 is as follows: input the image geometric features and the image SIFT feature correspondence into the homography estimator F of RANSAC RANSAC Generate the homography transformation matrix H for geometric feature matching Geo , SIFT feature matching homography transformation matrix H SIFT And the homography transformation matrix H for loop closure detection LC , the above homography transformation matrix H Geo , H SIFT and H LC ; The specific definition is: At the same time, each estimated transformation matrix is ​​associated with a covariance matrix Σ, which represents the certainty of the estimate; the RANSAC method is used to identify outliers and abnormal values. The identification of outliers and abnormal values ​​is based on the pixel distance between a point in one image and the corresponding point in the other image reprojected by the corresponding homography transformation matrix. The covariance of the homography transformation matrix of the geometric feature matching It is calculated based on the ratio of outliers; small covariance of the homography transformation matrix of SIFT feature matching And the covariance of the homography transformation matrix for loop closure detection It is calculated based on the outlier ratio and the number of features; The step S4 is specifically as follows: S41: Construct the pose graph to be optimized as Φ = {V, E}, where V = {x0, x1, x2, ..., x n } is the vertex set, E={y 0,1 ,y 1,2 ,y 2,3 ,...,y LC } is the edge set, and y is the estimated homography transformation matrix Together, x represents the i-th image relative to key frame I key The transformation of the image constitutes the state that needs to be estimated; the edge set defines the constraints between vertex pairs, which are obtained from the homography transformation matrix jointly constitute; S42: After optimizing the pose graph, the optimized homography transformation matrix for image stitching can be obtained The specific definition is: S43: All images can be stitched together according to the intermediate frames in the sequence to obtain a panoramic image.

2. According to claim 1, a tower antenna panoramic image stitching method based on SIFT and deep learning joint optimization is characterized in that: The panoramic image stitching process in step S4 is specifically as follows: using the optimized homography transformation matrix The coordinates of the four corners of the panorama are distorted for each image, and the minimum and maximum angles in two directions of all distorted images are obtained to create a canvas of the same size as the panorama. All images are placed in the canvas in sequence according to the coordinate positions after distortion, and images at different times are in different positions in the canvas. In order to make the final stitching effect more natural, it is necessary to remove the overlapping parts between the images, that is, based on the middle frame, the common parts between the two adjacent frames are cropped according to the mask obtained by the matching relationship between the image feature points. Finally, the cropped images are stitched together in order to obtain the final panoramic stitching image of the tower antenna.