Smooth Stitching Method for the Texture Seams of Remote Sensing Images Based on Gradient Structure Information

: Traditional smooth stitching method for the texture seams of remote sensing images is affected by gradient structure information, leading to poor stitching effect. Therefore, a smooth stitching method for the texture seams of remote sensing images based on gradient structure information is proposed in this research. By matching the feature points of remote sensing images and introducing a block link constraint and shape distortion constraint, the modiﬁed stitching image is obtained. By using remote sensing image fusion, the smooth stitching image of texture seams is obtained, and the local overlapping area of the texture is optimized. The main direction of texture seams is determined by calculating the gradient structure information of texture seams in horizontal and vertical directions. By selecting the initial point, the optimal stitching line is extracted by using the minimum mean value of the cumulative error of the smooth stitching line. By using the method of boundary correlation constraints, matching the feature points of the texture seams of remote sensing images and selecting the best matching pair, a smooth stitching algorithm for the texture seams of remote sensing image is designed, which realizes the smooth stitching of the texture seams of remote sensing images. Experimental results show that the design method has good performance in stitching accuracy and efﬁciency in the smooth stitching of the texture seams of remote sensing images. Speciﬁcally, the Liu et al. and the Zhang et al. methods that are the benchmark studies in the literature are introduced as a comparison, and the stitching experiment is carried out. The test is carried out according to accuracy and time and the proposed method achieves better results by almost 25%.


Introduction
The development of image stitching technology has gone through many stages. The earliest image stitching technology mainly used the principle of gray-scale symbiosis to obtain the image similarity change matrix through gray to complete the image stitching [1]. Later, more and more texture stitching methods for remote sensing images emerged, among which the more prominent was the research method based on scale-invariant feature transform (SIFT) feature points. This kind of method used SIFT feature points to rotate the remote sensing image to obtain the gradient structure information. The image stitching was completed through the reorganization of gradient information feature points [2]. However, traditional remote sensing image stitching methods based on SIFT feature points can no longer complete the stitching of remote sensing images as high-resolution remote sensing images' textures contain a lot of information. This research proposes a smooth stitching method for the texture seams of remote sensing images based on gradient structure information, which is of great significance for realizing high-resolution image stitching [3].
Liu et al. [4] proposed a smooth stitching method of the texture seams of remote sensing images based on Oriented FAST and Rotated BRIEF (ORB) features to solve the problem that high-resolution unmanned aerial vehicle (UAV) remote sensing images could not be stitched by the traditional scale-invariant feature transform (SIFT) algorithm.
First, the remote sensing images that needed image stitching were selected, and the ORB algorithm was used to obtain the feature vectors of the images. Then the remote sensing image's threshold was obtained by the neighbor algorithm. After that, fine matching was performed on the feature points. Finally, the weighted average algorithm was used to perform smooth stitching on the texture seams of remote sensing images. Compared with the traditional SIFT algorithm, this method improved the processing speed of remote sensing image stitching by more than ten times, and the processing effect was better. The Zhang et al. method [5] proposed an image stitching method to improve the best stitching line for the phenomenon that the texture seams of moving objects could not be smoothly stitched. First, the ORB algorithm was used to extract the texture feature points of the remote sensing images. Then, the trapezoid matrix was arranged based on the feature points to remove the incorrectly matching items. Then, the difference of the processed image was corrected, and the improved energy function was used to calculate the stitching function. Finally, the feature point information of the texture seams was subjected to weight analysis, and the images were fused based on the result of the weight analysis. This method could be used for the stitching of high-resolution images.
Through various registration methods, the overlapping areas of two images can be well aligned, and the non-overlapping areas usually have serious distortions. Chang et al. [6] proposed the SPHP algorithm, which corrects the shape of the stitched image, and reduces the projection distortion. Lin et al. [7] proposed a homography linearization method, which is also a shape correction problem; the natural appearance of the stitching results is improved with this method by a level compared with SPHP. Chen et al. [8] proposed the global similarity prior (GSP) to obtain natural stitching results, which uses line alignment constraints to set constraint terms. Liao et al. [9] used two single-perspective warps to register images to produce natural stitching results. Li et al. [10] proposed a novel quasihomography to solve the line blending problem between the homography transformation and the similarity transformation by linearly scaling the horizontal component of the homography to create a more natural panorama.
Additionally, an UAV image mosaic usually needs additional information, such as camera calibration parameters, and position and rotation data from the GPS/IMU, ground control points or a reference map to achieve accurate mosaic results. Xue et al. [11] proposed a novel image mosaic method without the requirements of camera calibration parameters, camera poses, or any 3D reconstruction procedure. This method can obtain visually satisfactory mosaic results automatically using only the raw 2D imagery captured from an UAV. Liu et al. [12] considered mosaic for low overlap UAV aerial images and found that the commonly used methods and software were not suitable for this type of data. Then, a novel adjustment model for mosaic low overlap sweeping images was proposed. Cai et al. [13] proposed a robust transform estimator based on residual analysis and its application to UAV aerial images. Estimating the transformation between two images from the same scene is a fundamental step for image registration, image stitching and 3D reconstruction.
However, none of the above methods consider the gradient information of images, which leads to poor stitching effects for remote sensing images. For this reason, this paper proposes a smooth stitching method for the texture seams of remote sensing images based on gradient structure information. In order to optimize and fuse the local features of the texture overlapping area of remote sensing images, and prevent distortion in the stitching process, visual communication technology is used to perform finite element analysis on remote sensing images [14]. The finite element meshes are transformed into similar textures. The texture overlapping area of the transformed remote sensing images is locally distorted. Taking a triangular remote sensing image to be stitched as an example, we set three transformation points as V 1 , V 2 , V 3 , and the relationship between the vertex V 1 and the other two points is as follows:

Design of Smooth
where the coordinates in the stitching texture coordinate system of the remote sensing image from the vertex V 1 to V 1 and V 3 are u and v. If the local remote sensing image texture imageÎ 2 to be optimized and the similarly changed image I 2 are not matched and transformed, the overlapping position of V 1 and V 2 , V 3 cannot be calculated, then the similar texture change formula is: where w s is the remote sensing image transformation weight. By calculating the local distortion coefficient E S V i of similar texture transformation in the finite element grid [15], the local distortion energy formula of the texture overlapping area of transformed remote sensing image is obtained. When using visual communication technology to optimize and fuse the parts of the texture overlapping area of remote sensing images [16], only the texture of the overlapping area of a single grid that needs to be optimized is locally similarly transformed, such as the remote sensing image I 1 that needs to be locally optimized and fused. In the process of local similarity transformation, it is necessary to refer to the texture attributes of the overlapping area of the imageÎ 2 , and then optimize the transformation of each coordinate point in the horizontal coordinate system and the vertical coordinate system and perform local distortion constraints on the optimized transformed grid links to make its fusion degree close to zero. At this time, it means that the texture overlapping area of the two remote sensing images has the same local optimization. The least squares method is used to calculate the local fusion optimal solution [17], and the horizontal constraint term of the remote sensing image texture is obtained: where s l 1 is the sum of the remote sensing image texture grid block N 5 to be stitched and the adjacent grid block that needs to be fused. Knowing the vertices V 6 , V 5 and V 7 in the remote sensing image, the following formula is used to obtain the vertical constraint term of the remote sensing image texture: where s l 2 is the sum of the remote sensing image texture grid block N 5 to be stitched and the lower grid block that needs to be stitched. Knowing the vertices (8, 6 and 10) in the remote sensing image, the following formula is used to obtain the diagonal constraint term of the remote sensing image texture: where s l 3 is the product of the remote sensing image texture grid block N 5 that needs to be fused and the grid block to be stitched with connection relationship, (11, 6 and 15), are the vertices in the known remote sensing image. The energy formula E S and grid energy formula E l of the remote sensing image texture constraint term are mixed in operation [18] to realize the local optimization of the remote sensing image texture: where α and β are the weighted thresholds. After fusing the locally optimized remote sensing images, we can finally obtain the stitched image of the texture overlapping area of remote sensing images. By matching the feature points of remote sensing images, block link constraints and shape distortion constraints are introduced to obtain the corrected stitched image. The remote sensing image fusion method is used to obtain a smooth stitched image of the texture seams of remote sensing images, which optimizes the texture of the local overlapping area of remote sensing images.

Extraction of the Optimal Stitching Line of the Texture Seams of Remote Sensing Images
The main direction line of the texture overlapping area of the remote sensing images is divided into a vertical direction line and a horizontal direction line. If I s represents the initial remote sensing image and I t represents the target image, then the main direction line of the overlapping area is I = I s + I t . The principle of gradient structure information is used [19] to calculate the gradient structure information in the horizontal and vertical directions, namely: According to the above formula, the main direction of the texture seams of the remote sensing images can be determined, as shown in Figure 1.

S l
where α and β are the weighted thresholds. After fusing the locally optimized rem sensing images, we can finally obtain the stitched image of the texture overlapping a of remote sensing images. By matching the feature points of remote sensing images, block link constraints a shape distortion constraints are introduced to obtain the corrected stitched image. T remote sensing image fusion method is used to obtain a smooth stitched image of texture seams of remote sensing images, which optimizes the texture of the local overl ping area of remote sensing images.

Extraction of the Optimal Stitching Line of the Texture Seams of Remote Sensing Images
The main direction line of the texture overlapping area of the remote sensing ima is divided into a vertical direction line and a horizontal direction line. If s I represe the initial remote sensing image and t I represents the target image, then the main di tion line of the overlapping area is s t I I I = + . The principle of gradient structure in mation is used [19] to calculate the gradient structure information in the horizontal a vertical directions, namely: According to the above formula, the main direction of the texture seams of the rem sensing images can be determined, as shown in Figure 1. By calculating a set of initial points and then deriving them as a starting point, the optimal stitching line is selected from the smooth stitching lines of the last multiple texture seams of remote sensing images, thereby saving the calculation time [20]. Taking Figure 1 as an example, we select five candidate initial points on NS. The coordinates of point N, point U, and point S are (X N , Y N ), (X U , Y U ) and (X S , Y S ), respectively. However, because the ordinate values of the three candidate initial points are the same, the coordinate corresponding to the point on NS is X pn , Y pn , the line from the point P n to the intersection point of UR and UT is denoted as q n , and the gradient error can be calculated by: where β = 0.4, C g represents the smoothness of the gradient, and C d represents the similarity.
Using the error calculation formula [21] between the gradient smoothness and the similarity, the gradient error value of the texture seams of remote sensing images is calculated. The following formula is used to divide the five candidate initial points on NS into five groups, namely: g m is used to mark the smallest point in each group, the number of smooth stitching lines of the texture seams of remote sensing image is m = 1, 2, 3, 4, 5, and five initial points are calculated. According to the calculated five smooth stitching lines of the texture seams of remote sensing images, the minimum cost is the optimal stitching line of the texture seams of remote sensing images [22]. Assuming that the corresponding coordinate of the point V c is (X c , Y c ), one of the three candidate initial points is selected as the next growth point.
According to the calculated cumulative gradient error, the iteration point is determined as V n . Let the cumulative gradient errors of the three candidate initial points be A(V 1 ), A(V 2 ) and A(V 3 ), respectively, then the error calculation formula for each candidate initial point is: where the number of neighboring points of the candidate initial point is j = 1, · · · , 9, A(V 1 ) represents the cumulative point composed of the point V 1 and six adjacent points. If (X c − 4 + j, Y c + 1) is the coordinate of the point V ej , then the point with the smallest cumulative value can be selected according to the above formula. It can be obtained from the above formula that when the accumulated values of two points are equal, the priority is sorted as V n2 , V n1 and V n3 . Therefore, the conditions for the selection of candidate points of the point V n are deduced and expressed as: According to the obtained five smooth stitching lines of the texture seams of remote sensing images, it is supposed that the mth smooth stitching line of the texture seams of remote sensing images contains j m points, and the coordinate of the jth point is V n (m, j), then the mean value of the minimum cumulative error of the smooth stitching lines can be calculated by: The mean value L(m) of minimum cumulative error calculated in the above formula is the optimal stitching line of the texture seams of remote sensing images, which can smoothly pass through the remote sensing image and optimize the removal effect of the smooth stitching line of the texture seams of remote sensing images [23].
By calculating the gradient structure information of the texture seams of remote sensing images in the horizontal and vertical directions, the main direction of the texture seams is determined, the initial point is selected, and the mean value of the minimum cumulative error of the smooth stitching line is used, and finally, the optimal stitching line is extracted.

Design of a Smooth Stitching Algorithm for the Texture Seams of Remote Sensing Images
It is supposed that the texture feature point cluster after the local optimization of the remote sensing image texture overlapping area is (A i , B i ), A i is on the remote sensing image texture L, B i is on the remote sensing image texture R . Then, we can calculate the distance from any feature point A K to the feature point L of remote sensing image texture, and the texture local feature vector of A K and B K , as follows: We then calculate the relationship function between two local feature vectors of remote sensing image textures: It is supposed that the matching threshold for remote sensing image texture is ε, and the texture feature points larger than this threshold have better similarity and transformation, so this point is the best texture stitching point. In the process of stitching remote sensing image textures, texture feature points are the core elements of stitching [24]. Through the spatial summation method, the distribution of each feature point in the remote sensing image texture is described. The stitching of the remote sensing image textures is completed through the fusion of the texture feature points. This method does not consider the sequence relationship, so the result is not accurate enough [25]. For the problem that the remote sensing image cannot realize the smooth stitching of texture seams, a new texture stitching method is proposed. This method uses v i as a feature transformation reference point and rebuilds a new texture feature point matrix according to the order relationship of the remote sensing image textures [26].
The new texture stitching method has the same principle as the initial processing method, and the coordinates of the reference point v i for feature transformation are obtained: According to the texture natural relationship in the remote sensing image texture feature points (Equation (14)), we change l i,j to matrix L i : The above formula is a new remote sensing image texture description. Compared with the initial remote sensing image texture description, the new method has a more correct sequence relationship, and can accurately see all the information points of the remote sensing image texture without performing multiple segmentation calculations on a 2D image, which improves the stitching efficiency [27].
The new remote sensing image texture description is processed uniformly to ensure that the original feature vector remains unchanged, and the feature points of the remote sensing image texture are arranged according to the description L i to form a trapezoidal structure information matrix (N − 1) × N: Unified processing is performed on each row of the trapezoidal structure matrix: where the structure information point in the trapezoidal structure matrix l (j) i = x 2 j + y 2 j is l i,j . Through the processing in Equation (17), the new remote sensing image texture stitching method has better fusion effect. In order to improve the stability of the proposed method, the texture seams are smoothly stitched: where the sequence N − 1 can be split into several mutually restricted trapezoidal structure sequences [1, t], [t + 1, 2t] and [2t + 1, 3t], where t is the smooth stitching coefficient of texture seams. Weighted analysis is performed on each sequence, respectively, to find the average value: where c = 1, 2, · · · , W, c is the sequence number of the cth ladder structure in the sorted ladder structure sequence. We have W = (N − 1)/t. After feature extraction and processing of remote sensing image textures, the remote sensing image textures to be stitched have corresponding texture transformation points, and the minimum variance calculation is used to obtain the best stitching point of remote sensing images [28].
Taking the central feature point of the remote sensing image texture as the reference point of similar transformation, the coordinate transformation formulas of A and B can be obtained as: where (X , Y ) and (X , Y ) are the coordinates of the reference point of similar transformation in A and B, respectively. Equation (21) can be solved by a linear equation set in three unknowns, and the equation only needs to be solved for the transformed reference point; finally, the stitching situation of the remote sensing images is verified. The texture feature point fusion of remote sensing images is the final work in the entire image stitching process. The smooth fusion of the texture seams is carried out by using the gradient structure information transformation method. Generally, images are divided into original remote sensing images and improved remote sensing images. The improved remote sensing image is rotated to obtain the rotation angle, and the improved remote sensing image after the rotation is overlapped with the original remote sensing image, and the effect of the smooth stitching is examined. The specific operation is shown in Figure 2.
. After feature extraction and processing of remote sensing image textures, the remote sensing image textures to be stitched have corresponding texture transformation points, and the minimum variance calculation is used to obtain the best stitching point of remote sensing images [28].
Taking the central feature point of the remote sensing image texture as the reference point of similar transformation, the coordinate transformation formulas of A and B can be obtained as: The texture feature point fusion of remote sensing images is the final work in the entire image stitching process. The smooth fusion of the texture seams is carried out by using the gradient structure information transformation method. Generally, images are divided into original remote sensing images and improved remote sensing images. The improved remote sensing image is rotated to obtain the rotation angle, and the improved remote sensing image after the rotation is overlapped with the original remote sensing image, and the effect of the smooth stitching is examined. The specific operation is shown in Figure 2. The coordinate system XOY and the coordinate system a a a X O Y are the coordinate systems of the remote sensing image one and the remote sensing image two, respectively. The start and end points of the remote sensing image two are obtained by the method of line segment cutting, so that the relationship between the overlapping area and the point can be calculated after the coordinate conversion. Then the difference method is used to obtain the converted pixel color of the remote sensing image, and finally the linear transition is used to fuse the stitched remote sensing images. In summary, the boundary correlation constraint method is used to match the feature points of the texture seams of remote The coordinate system XOY and the coordinate system X a O a Y a are the coordinate systems of the remote sensing image one and the remote sensing image two, respectively. The start and end points of the remote sensing image two are obtained by the method of line segment cutting, so that the relationship between the overlapping area and the point can be calculated after the coordinate conversion. Then the difference method is used to obtain the converted pixel color of the remote sensing image, and finally the linear transition is used to fuse the stitched remote sensing images. In summary, the boundary correlation constraint method is used to match the feature points of the texture seams of remote sensing images, the best matching pair is selected, and a smooth stitching algorithm is designed for the texture seams of remote sensing images to achieve the smooth stitching of the texture seams.

Experiment and Results Analysis
In order to verify the effectiveness of the smooth stitching method of the texture seams of remote sensing image based on gradient structure information in the application, simulation experiments needed to be designed. The operating system of the simulation experiment selected a Windows 7 system computer with 8 GB memory and 3.5 GHz frequency, and used MFC to write the simulation program. The calculation operation of the experiment was completed by the MATLAB compiler to convert the simulation program into a file that can be executed.

Experimental Setup
During the experiment, three groups of different remote sensing images were selected as the test objects of the simulation experiment. The remote sensing images used in Experiment 1 and Experiment 2 were from two remote sensing images with overlapping areas from different locations. The remote sensing images of Experiment 2 were set to 30 degrees. Rotation angle, the remote sensing image in experiment 3, contained a 5 dB low-noise image.
The Liu et al. method [4] and the Zhang et al. method [5] were introduced as a comparison, and the stitching experiment was carried out. The test was carried out according to the accuracy and time. The results are as follows. Table 1 shows the accuracy of three smooth stitching methods for the texture seams of remote sensing images. From the results in Table 1, it can be seen that in the three experiments, the stitching accuracy by the Zhang et al. method [5] method was higher than the Liu et al. method [4], but lower than the proposed method. In order to ensure the accuracy of the experimental results, each group of remote sensing images was subjected to 10 experiments to obtain the average value of the smooth stitching accuracy. The results are shown in Figure 3.

Analysis of Experimental Results
It can be seen from the results in Figure 3 that with the increase in the number of remote sensing images, the average accuracy of the three methods was gradually decreasing, and the accuracy of the proposed method was significantly higher than that of the other two methods.
The running time of three smooth stitching methods are shown in Figure 4. It can be seen from the results in Figure 4 that with the increase in the number of experiments, the running time of the Liu et al. method [4] increased significantly (almost 23-25%). When the number of experiments reached 100, the smooth stitching time of the texture seams of the remote sensing images was 27.8 and 29 s, respectively, and the stitching time of the proposed method changed slowly. When the number of experiments reached 100, the smooth stitching time by the proposed method was 9 s, indicating that the proposed method could speed up the smooth stitching of the texture seams of remote sensing images, thereby improving the efficiency of smooth stitching of the texture seams of remote sensing images.
ing images. From the results in Table 1, it can be seen that in the three experiments, the stitching accuracy by the Zhang et al. method [5] method was higher than the Liu et al. method [4], but lower than the proposed method. In order to ensure the accuracy of the experimental results, each group of remote sensing images was subjected to 10 experiments to obtain the average value of the smooth stitching accuracy. The results are shown in Figure 3.  It can be seen from the results in Figure 3 that with the increase in the number of remote sensing images, the average accuracy of the three methods was gradually decreasing, and the accuracy of the proposed method was significantly higher than that of the other two methods.
The running time of three smooth stitching methods are shown in Figure 4. It can be seen from the results in Figure 4 that with the increase in the number of experiments, the running time of the Liu et al. method [4] increased significantly (almost 23-25%). When the number of experiments reached 100, the smooth stitching time of the texture seams of the remote sensing images was 27.8 and 29 s, respectively, and the stitching time of the proposed method changed slowly. When the number of experiments reached 100, the smooth stitching time by the proposed method was 9 s, indicating that the proposed method could speed up the smooth stitching of the texture seams of remote sensing images, thereby improving the efficiency of smooth stitching of the texture seams of remote sensing images.

Conclusions
Taking into account the problems of the traditional smooth stitching methods for the texture seams of remote sensing images, the local texture overlapping area of remote sensing images was optimized and fused, and the optimal stitching line of the texture seams was extracted. By designing a smooth stitching method for the texture seams of remote sensing images, this research realized the smooth stitching of the texture seams of remote sensing images. The results show that the proposed method has great advantages in stitching effect and is suitable for widespread use. The test was carried out according to accuracy and time and the proposed method achieved better results by almost 25%.
On the other hand, the proposed image stitching method mainly solves the problem of improving registration accuracy by designing a good transformation function. For UAV remote sensing image mosaics, additional information is usually needed, such as camera

Conclusions
Taking into account the problems of the traditional smooth stitching methods for the texture seams of remote sensing images, the local texture overlapping area of remote sensing images was optimized and fused, and the optimal stitching line of the texture seams was extracted. By designing a smooth stitching method for the texture seams of remote sensing images, this research realized the smooth stitching of the texture seams of remote sensing images. The results show that the proposed method has great advantages in stitching effect and is suitable for widespread use. The test was carried out according to accuracy and time and the proposed method achieved better results by almost 25%.
On the other hand, the proposed image stitching method mainly solves the problem of improving registration accuracy by designing a good transformation function. For UAV remote sensing image mosaics, additional information is usually needed, such as camera calibration parameters, or position and rotation data obtained from the GPU/IMU, ground control points, or a reference map, to achieve accurate mosaic results. However, these additional parameters do not focus on the ghost phenomenon caused by moving objects, and the ghosts cannot be eliminated by a transform function. The smooth image stitching method can alleviate these problems to a certain extent. However, there are still limitations in dealing with ghosts due to the following reasons: first, when there is a moving object in the stitched image, the seam may cut or copy the object; secondly, the seam-driven method selects one of the multiple seams as the final seam, and if there are fast-moving objects in the stitched images, the process of seam finding method becomes challenging.
In short, the proposed method cannot deal with all the challenges of eliminating ghosts, and ghost elimination is an urgent problem. In particular, when shooting images that are generally used for stitching, they may be at the same position or have a small rotation. However, when the UAV's bird's-eye view camera captures images, important factors are not only translation and rotation, but also the distance between the camera and the object, and the level of shaking, resulting in small objects in UAV remote sensing images and poor image quality, which in turn increases the difficulty of image stitching and the removal of ghosts.
In future work, an adaptive threshold adjustment method will be designed to select an appropriate threshold for each group of test images to improve the robustness of the method. Additionally, a method to stitch UAV remote sensing images while eliminating ghosts without a seam finding process will be investigated.