Seabed image splicing method based on suture line optimization
By combining an improved ResNet50 network and a deformable convolutional network with a self-attention mechanism, the problems of optical degradation, deformation, and stitching lines in seabed image stitching were solved, achieving high-precision seamless stitching of seabed images and meeting the panoramic reconstruction needs of marine exploration and underwater engineering.
Patent Information
- Application Number
- CN202511485577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-09
AI Technical Summary
Undersea image stitching technology faces challenges such as blue-green bias caused by the optical environment of the water, high mismatch rate of traditional feature descriptors, nonlinear distortion caused by the refraction effect at the water-glass interface, and jagged stitching lines produced by mainstream stitching algorithms, all of which affect the accuracy of underwater operations.
An improved ResNet50 network is used for two-stage feature extraction, combined with a deformable convolutional network for global homography transformation and local thin-plate spline correction, and a cross-image self-attention mechanism is used for stitch line optimization. A composite loss function is constructed for model optimization.
It achieves subpixel-level alignment and seamless stitching, improves the stitching accuracy of seabed images, solves the problems of geometric misalignment and stitching artifacts in high parallax scenes, and meets the high-precision panoramic reconstruction needs of marine exploration and underwater engineering.
Smart Images

Figure CN121304441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image stitching, and more specifically, to a method for stitching underwater images based on suture line optimization. Background Technology
[0002] As a core supporting technology for marine resource exploration and seabed engineering monitoring, seabed image stitching technology aims to reconstruct panoramic information of seabed scenes through geometric alignment and semantic fusion of multi-view images. However, the complex seabed optical environment presents this technology with several fundamental challenges, including: 1) Selective absorption of light by water causes severe blue-green bias, significantly increasing the difficulty of stitching overlapping areas; 2) Traditional feature descriptors have a high mismatch rate under these conditions; 3) The refractive effect of the water-glass interface distorts the imaging geometry, causing the same object to exhibit nonlinear distortion from different viewpoints, and traditional affine transformation models have high compensation errors for such distortions.
[0003] While existing technologies can improve the quality of single-frame images through deep learning, they essentially still process individual images in isolation. They fail to establish deformation mapping relationships across different viewpoints and do not address the non-rigid displacement issues caused by dynamic ocean currents. More seriously, mainstream stitching algorithms, such as the optimal seam method, produce jagged stitches in turbid waters due to abrupt local gradient changes, resulting in a low SSIM (Structural Similarity Index) for the stitched results, severely limiting the accuracy of seabed operations. These shortcomings collectively expose the insufficient understanding of the coupling relationship between underwater degradation mechanisms and geometric distortion in traditional methods.
[0004] Therefore, there is an urgent need for an integrated solution that can simultaneously model optical degradation compensation, elastic deformation correction, and semantic association enhancement. Summary of the Invention
[0005] This invention provides a seabed image stitching method based on suture line optimization. By modeling elastic deformation through deformable convolution and guiding semantic fusion through self-attention mechanism, it achieves sub-pixel level alignment and seamless stitching, solving the problems of geometric misalignment and suture line artifacts caused by refraction distortion, scattering noise and dynamic deformation in seabed image stitching with large parallax.
[0006] The technical solution adopted in this invention is: A seabed image stitching method based on suture optimization includes: S1. Acquire the original seabed image and perform preprocessing to obtain the target seabed image; S2. Based on the improved ResNet50 network, a two-stage feature extraction is performed on the target seabed image to obtain a multi-level feature map containing global structural information and local detail features. S3. Based on the deformable convolutional network, global coarse registration and local fine correction are performed on the second feature map and the first feature map respectively to obtain a deformable image with sub-pixel level alignment. S4. Based on the cross-image self-attention mechanism, cross-scale feature interaction and dynamic mask optimization are performed on deformed images to divide the stitching line weights between stitched images, and pixel classification is performed according to the weights to obtain seamless stitched images. S5. Construct a composite loss function and train and optimize it to obtain the target stitched image. Further, step S1 includes: S11. Obtain the original seabed image; S12. Based on the gray world hypothesis algorithm, the blue-green bias in the seabed image is eliminated, and the mean of the red, green and blue channels is equalized to obtain the target seabed image.
[0007] Further, step S2 includes: S21. Construct an improved ResNet50 network; S22. First feature map extraction: Based on the improved ResNet50 network, the first stage of feature extraction is performed on the target seabed image to obtain a medium-resolution feature map of 1 / 8 size of the target seabed image, which is denoted as the first feature map and is used to preserve the local details and textures of the seabed. Specifically, based on the split ResNet50 architecture, the last two fully connected layers are removed, and the first four convolutional blocks are retained to obtain an improved ResNet50 network. The improved ResNet50 network consists of three convolutional layers, one pooling layer, and one fully connected layer. The convolutional layers use filters to slide across the input data to extract local features and capture spatial or temporal parameters. The pooling layer downsamples the feature maps output by the convolutional layers to compress the data volume, reduce computational complexity, and enhance the spatial invariance of the features. The fully connected layer globally integrates all the features extracted by the previous layers, learns the complex nonlinear combination relationships between features, and uses them for the final output. S23. Second feature map extraction: Based on the improved ResNet50 network, the first feature map is extracted in the second stage to obtain a low-resolution feature map of 1 / 16 size of the target seabed image, which is denoted as the second feature map and is used to capture the global spatial relationship of the scene. S24. Feature Fusion: The first feature map and the second feature map are fused by cross-stage skip connections to obtain a multi-scale feature pyramid; wherein, each layer of feature maps is spliced together after being convolved with a 1×1 convolution to unify the channel dimension.
[0008] Further, step S3 includes: S31. Based on the second feature map, it is input into a deformable convolutional network for global homography transformation to obtain a coarsely aligned global feature map. S32. Based on the first feature map and the global feature map obtained in S31, perform local thin plate spline correction to obtain a deformed image with sub-pixel level alignment.
[0009] Further, step S31 includes: 1) Calculate the similarity between the features of the two images to be stitched in the second feature map based on the correlation matching algorithm, and obtain the offset of the control points at the four corners of the image; 2) Input the obtained offsets of the four corner control points of the image into the deformable convolutional network to obtain the transformation values of the image deformation; 3) Based on the transformation values of image deformation, the transformation matrix is obtained through direct linear transformation; 4) Multiply the transformation matrix with the original network to obtain the global homography transformation matrix.
[0010] Further, step S32 includes: 1) Based on the correlation matching algorithm, calculate the similarity between features in the stitched image between the first feature map and another feature map after being transformed by the global homography transformation matrix in S31 above, and obtain the offset cost volume of the four corner control points at each position; The similarity between two mid-level feature maps is calculated using a relevance matching algorithm. The specific process is as follows: ① Perform L2 normalization on the spliced image features to eliminate interference caused by differences in the original numerical scales and obtain the convolution kernel; ②Use the region of one of the images as the convolution kernel, generate the response map composed of the initial matching values from top to bottom and left to right using the sliding window strategy, and normalize it into a probability distribution using the Softmax function to obtain the probability distribution of the matching amount between the two images; ③ Based on the coordinate grid and the probability distribution obtained above, calculate the spatial offset between the regions of the stitched images to generate a displacement field that can quantify spatial changes; 2) Based on the offset of the four corner control points, perform homography matrix transformation on the middle layer feature map; 3) Based on the correlation matching algorithm, the two images to be stitched in the first feature map are input into a deformable convolutional network to obtain the local non-rigid displacement field: ① Shallow branches use deformable convolutions with 64 channels and a kernel size of 5×5 to capture the bending deformation of nearby objects and output local displacement fields. ② The deep branches use deformable convolutions with 512 channels and a kernel size of 7×7 to model large-scale distortions in the distant region and output a global displacement field; 4) Based on the global displacement field scale, the local displacement field and the global displacement field are sampled and fused to obtain the transformation matrix describing the offset of each grid fixed point. This matrix is used to drive the thin plate spline transformation to achieve non-rigid deformation compensation and obtain a deformation image with sub-pixel level alignment.
[0011] Further, step S4 includes: S41. Extract multi-scale difference features of deformed images through a Transformer encoder with shared weights to obtain an attention weight map; S42. The transformation matrix obtained in S32 is used as the initial mask, which is then concatenated with the attention weight map. The optimized dynamic fusion mask is output through 3×3 convolution and the Sigmoid function, which serves as a guide for pixel selection in the overlapping area of the two images. S43. By applying attention to the channel dimension to calculate the attention weight of the overlapping area of the image, the key deformation area of the deformed image is located. S44. By fusing deep semantic differences and mid-level geometric features through skip connections, an optimized dynamic mask is generated.
[0012] Further, step S41 includes: 1) Input the registered dual-path images into the feature extraction network to extract multi-scale features, calculate the difference in the overlapping area of the feature maps of the two images, quantify the degree of division of the overlapping area, and obtain the difference map; 2) Project the difference map into query vector, key vector and value vector respectively, calculate the similarity score of all spatial location pairs by matrix multiplication, normalize it into a probability distribution using the Softmax function, and generate an attention weight map.
[0013] Further, step S44 includes: 1) Perform bilinear interpolation upsampling on the initial mask to restore resolution; 2) Correct mask edge misalignment using a spatial transformation network; 3) A pixel-level weighted formula is used to fuse the original mask and attention-enhanced features.
[0014] Further, step S5 includes: S51. Construct a composite loss function based on multi-scale structural similarity loss, geometric consistency loss, and texture preservation loss; S52. During the training process, compare the gradient feature differences between the seamlessly stitched image and the original seabed image, and calculate the multi-scale structural similarity loss and geometric consistency loss. Among them, 1) Multi-scale structural similarity loss: The brightness, contrast and structural differences at different resolutions are calculated by Gaussian pyramid; 2) Geometric consistency loss: Based on mesh deformation constraints of thin plate spline transformation, it penalizes non-smooth displacement fields; S53, Texture Preservation Loss: Detail fidelity is evaluated by gradient orientation histogram matching.
[0015] Compared with the prior art, the present invention has the following advantages: This invention first extracts multi-scale features from seabed images using an improved ResNet50 network, and then combines a deformable convolutional network to achieve global homography transformation and local thin-plate spline correction, compensating for nonlinear geometric distortion caused by underwater refraction. Subsequently, a cross-image self-attention mechanism is used to dynamically generate a fusion mask, guiding smooth transitions and detail preservation in overlapping areas. Finally, by jointly optimizing model parameters using geometric consistency loss and multi-scale structural similarity loss, the registration error and stitching artifacts in high parallax scenarios are addressed. This invention significantly improves image stitching accuracy and visual quality through deformable convolution modeling of elastic deformation, self-attention mechanism-guided semantic fusion, and multi-loss joint constraint optimization, meeting the needs of high-precision panoramic reconstruction in scenarios such as marine exploration and underwater engineering. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: Figure 1 This is a flowchart illustrating a seabed image stitching method based on suture optimization according to the present invention. Figure 1 ; Figure 2 This is a flowchart illustrating a seabed image stitching method based on suture optimization according to the present invention. Figure 2 ; Figure 3 This is a schematic diagram of the feature map extraction structure in this invention; Figure 4 This is a flowchart illustrating the deformable convolutional network in this invention; Figure 5 This is a schematic diagram comparing the deformed image after passing through the deformable convolutional network in this invention with the original image; Figure 6 This is a schematic diagram of the self-attention mechanism structure in this invention. Detailed Implementation Example
[0017] like Figures 1 to 6 As shown, a seabed image stitching method based on suture optimization is proposed. S1. Acquire the original seabed image and perform preprocessing to obtain the target seabed image; Specifically, S11, acquire the original seabed image; S12. Based on the gray world hypothesis algorithm, the blue-green bias in the seabed image is eliminated, and the mean of the red, green and blue channels is equalized to obtain the target seabed image. Note: Image colors are adjusted through preprocessing to reduce the underwater blue-green bias and make the image colors closer to reality; S2. Based on the improved ResNet50 network, a two-stage feature extraction is performed on the target seabed image to obtain a multi-level feature map containing global structural information and local detail features. Specifically, S21, construct an improved ResNet50 network; S22. First feature map extraction: Based on the improved ResNet50 network, the first stage of feature extraction is performed on the target seabed image to obtain a medium-resolution feature map of 1 / 8 size of the target seabed image, which is denoted as the first feature map and is used to preserve the local details and textures of the seabed. Specifically, based on the split ResNet50 architecture, the last two fully connected layers are removed, and the first four convolutional blocks are retained to obtain an improved ResNet50 network. The improved ResNet50 network consists of three convolutional layers, one pooling layer, and one fully connected layer. The convolutional layers use filters to slide across the input data to extract local features and capture spatial or temporal parameters. The pooling layer downsamples the feature maps output by the convolutional layers to compress the data volume, reduce computational complexity, and enhance the spatial invariance of the features. The fully connected layer globally integrates all the features extracted by the previous layers, learns the complex nonlinear combination relationships between features, and uses them for the final output. S23. Second feature map extraction: Based on the improved ResNet50 network, the first feature map is extracted in the second stage to obtain a low-resolution feature map of 1 / 16 size of the target seabed image, which is denoted as the second feature map and is used to capture the global spatial relationship of the scene. S24. Feature Fusion: The first feature map and the second feature map are fused through cross-stage skip connections to obtain a multi-scale feature pyramid; wherein, each layer of feature maps is concatenated after unifying the channel dimension by a 1×1 convolution; Description: An improved ResNet50 network is used to extract medium-resolution feature maps, preserving detailed textures such as corals and rocks; the structural layout information of the entire scene is captured by reducing the image size; detailed features and global features are merged and fused to form a feature set containing information of different sizes; S3. Based on the deformable convolutional network, global coarse registration and local fine correction are performed on the second feature map and the first feature map respectively to obtain a deformable image with sub-pixel level alignment. Specifically, S31, based on the second feature map, it is input into a deformable convolutional network to perform global homography transformation, and a coarsely aligned global feature map is obtained; The workflow of global homography transformation is as follows: 1) Calculate the similarity between the features of the two images to be stitched in the second feature map based on the correlation matching algorithm, and obtain the offset of the control points at the four corners of the image; 2) Input the obtained offsets of the four corner control points of the image into the deformable convolutional network to obtain the transformation values of the image deformation; 3) Based on the transformation values of image deformation, the transformation matrix is obtained through direct linear transformation; 4) Multiply the transformation matrix by the original network to obtain the global homography transformation matrix; Explanation: The deformable convolutional network dynamically adjusts the offsets of the four corner control points of the image, enabling the convolutional layer to adaptively extract deformation and scale changes in the image. If non-integer feature values exist in the image, bilinear interpolation is used to calculate and correct them based on surrounding feature values. The pixel displacement information is decoded from the offsets calculated by the correlation matching algorithm, and the matching ambiguity is resolved by pixel neighborhood information and spatial correlation constraints to obtain the transformation value. Then, the global homography transformation matrix is obtained through direct linear transformation. S32. Based on the first feature map and the global feature map obtained in S31, perform local thin plate spline correction to obtain a deformed image with sub-pixel level alignment; Specifically, the process includes the following: 1) Based on the correlation matching algorithm, calculate the similarity between features in the stitched image between the first feature map and another feature map after being transformed by the global homography transformation matrix in S31 above, and obtain the offset cost volume of the four corner control points at each position; The similarity between two mid-level feature maps is calculated using a relevance matching algorithm. The specific process is as follows: ① Perform L2 normalization on the spliced image features to eliminate interference caused by differences in the original numerical scales and obtain the convolution kernel; ②Use the region of one of the images as the convolution kernel, generate the response map composed of the initial matching values from top to bottom and left to right using the sliding window strategy, and normalize it into a probability distribution using the Softmax function to obtain the probability distribution of the matching amount between the two images; ③ Based on the coordinate grid and the probability distribution obtained above, calculate the spatial offset between the regions of the stitched images to generate a displacement field that can quantify spatial changes; 2) Based on the offset of the four corner control points, perform homography matrix transformation on the middle layer feature map; 3) Based on the correlation matching algorithm, the two images to be stitched in the first feature map are input into a deformable convolutional network to obtain the local non-rigid displacement field: ① Shallow branches use deformable convolutions with 64 channels and a kernel size of 5×5 to capture the bending deformation of nearby objects and output local displacement fields. ② The deep branches use deformable convolutions with 512 channels and a kernel size of 7×7 to model large-scale distortions in the distant region and output a global displacement field; 4) Based on the global displacement field scale, the local displacement field and the global displacement field are sampled and fused to obtain the transformation matrix describing the offset of each grid fixed point. This matrix is used to drive the thin plate spline transformation, realize non-rigid deformation compensation, and obtain a deformation image with sub-pixel level alignment. Description: Analyze global features and calculate the positional offsets of the four corners of the image; adjust the overall shape of the image based on the offsets to correct large-scale deformations such as edge stretching from a wide-angle lens; for bending deformations of nearby objects such as coral reefs, use a small-area flexible detection module to correct local bending; for large-scale distortions of distant objects such as underwater mountains, use a large-area detection module to correct overall deformation; intelligently fuse the two correction results to generate final deformation parameters; smoothly adjust each region of the image based on the deformation parameters to ensure minimal alignment errors; S4. Based on the cross-image self-attention mechanism, cross-scale feature interaction and dynamic mask optimization are performed on deformed images to divide the stitching line weights between stitched images, and pixel classification is performed according to the weights to obtain seamless stitched images. S41. Extract multi-scale difference features of deformed images through a Transformer encoder with shared weights to obtain an attention weight map; Specifically, 1) Input the registered dual-path images into the feature extraction network, extract multi-scale features, calculate the difference in the overlapping area of the feature maps of the two images, quantify the degree of division of the overlapping area, and obtain the difference map; 2) Project the difference map into query vector, key vector and value vector respectively, calculate the similarity score of all spatial location pairs by matrix multiplication, normalize it into a probability distribution using the Softmax function, and generate an attention weight map; S42. The transformation matrix obtained in S32 is used as the initial mask, which is then concatenated with the attention weight map. The optimized dynamic fusion mask is output through 3×3 convolution and the Sigmoid function, which serves as a guide for pixel selection in the overlapping area of the two images. S43. By applying attention to the channel dimension to calculate the attention weight of the overlapping area of the image, the key deformation area of the deformed image is located. S44. By fusing deep semantic differences and mid-level geometric features through skip connections, an optimized dynamic mask is generated. Specifically, 1) the initial mask is upsampled using bilinear interpolation to restore the resolution; 2) Correct mask edge misalignment using a spatial transformation network; 3) A pixel-level weighted formula is used to fuse the original mask and attention-enhanced features; Explanation: The upsampling module gradually restores resolution by combining skip connections. During the decoding process, the difference features after deep self-attention weighting are fused with the difference features of the mid-level features across scales. Geometric detail differences and semantic consistency information are passed through skip connections to achieve multi-granularity alignment. Finally, the output layer generates a fusion mask, dynamically optimizes the initial mask to obtain pixel-level weights, and then fuses the two images based on a formula. Explanation: Compare two aligned images to identify areas with significant differences in color and brightness; use intelligent algorithms to analyze the importance of these areas, prioritizing areas with rich edges and textures; generate a weight map to determine which image each pixel should retrieve more information from; and combine the two images based on the weight map to generate the final stitched image, ensuring a natural transition at the seams without color abrupt changes or ghosting. S5. Construct a composite loss function and train and optimize it to obtain the target stitched image; Specifically, S51, a composite loss function is constructed based on multi-scale structural similarity loss, geometric consistency loss, and texture preservation loss. S52. During the training process, compare the gradient feature differences between the seamlessly stitched image and the original seabed image, and calculate the multi-scale structural similarity loss and geometric consistency loss. S51, Multi-scale structural similarity loss: Calculate brightness, contrast and structural differences at different resolutions using Gaussian pyramids; S52, Geometric Consistency Loss: Based on thin plate spline transformation, mesh deformation constraints are used to penalize non-smooth displacement fields; S53. Texture Preservation Loss: Detail fidelity is evaluated by gradient orientation histogram matching; Explanation: Multi-dimensional loss joint optimization aims to balance geometric accuracy and visual quality by combining three types of loss functions. Geometric consistency loss is used to constrain the gradient smoothness of the displacement field and prevent excessive distortion of local deformation. This is achieved by calculating the offset difference between adjacent points in the displacement field. Multi-scale structural similarity loss is used to evaluate the brightness, contrast and structural consistency of the image at the original resolution, half resolution and quarter resolution, respectively.
[0018] The working principle of this invention: 1) Two-stage feature extraction: The first stage uses ResNet50 to extract the original features. Figure 1 The first feature map is obtained by extracting medium-resolution features of size / 16, which is used to preserve detailed texture; the second stage further uses the extraction original on the results of the first stage. Figure 1The medium-resolution features obtained from the / 8 medium-resolution features focus on capturing global structural information. This two-stage feature extraction is used for subsequent image deformation; the low-resolution features provide a wide-view contextual information for global deformation estimation; the medium-resolution features support local detail restoration; and the transfer initialization of pre-trained weights accelerates model convergence and alleviates the training difficulty caused by the scarcity of underwater data. 2) Achieving precise alignment of underwater images from global to local levels using deformable convolutional networks: First, in the global deformation estimation stage, the spatial similarity of deep features between two images is calculated using a correlation matching module, generating a correlation map reflecting feature position offsets. Then, based on the deformable convolutional network, the offsets of the control points at the four corners of the image are obtained. Deformable convolution dynamically adjusts the offsets, adaptively changing the receptive field to effectively correct large-scale refraction distortion, and its nonlinear deformation modeling capability is superior to traditional convolution. Next, in the local elastic deformation optimization stage, the coarsely aligned features are input into a multi-scale deformable convolutional network: the shallow layer uses 64 channels to capture subtle near-field bends, while the deep layer uses 512 channels to model large-scale distortions in the distant field. This stage, on the one hand, achieves residual displacement fields by learning offsets to accurately resolve pixel-level position offsets; on the other hand, it fuses multi-scale deformation information through a channel expansion strategy. Finally, the output dense grid displacement field describes elastic deformation in the form of vertex displacements, driving thin-plate spline transformation to complete sub-pixel-level alignment. 3) Based on a correlation-based matching algorithm: The extracted features are L2 normalized to eliminate the influence of lighting and color differences on matching, ensuring matching stability. Reference image features are divided into local feature blocks, which are then reshaped into dynamic convolutional kernels to support sliding window matching of local structures. Target image features are subjected to sliding convolution with the dynamic convolutional kernels sample by sample, generating a preliminary matching response map that reflects the similarity between the target features and the reference feature blocks at various locations. The preliminary matching response map is scaled to amplify the response values of important matching regions, and then converted to a probability distribution using softmax to strengthen the weight of high-confidence regions. The reference image blocks are mapped to two-dimensional spatial coordinates using channel indexing, and the coordinate deviation of each location relative to the reference image block is calculated using pre-generated horizontal and vertical coordinate grids. The offsets of all reference image blocks are fused through probability weighting to form a pixel-level displacement field. This displacement field accurately encodes the feature deformation caused by seabed refraction and motion, providing important constraints for subsequent geometric correction. 4) Achieve high-quality fusion of deformed images through multi-scale feature difference analysis and self-attention mechanism: After inputting two deformed images and their corresponding masks, the module uses a downsampling network with shared weights to extract multi-level features simultaneously, ensuring encoding consistency; at deep feature levels, the feature differences between the two images are calculated, and the results are sent to the self-attention module; the self-attention module calculates cross-image feature similarity through global interaction of query-key, generates an attention weight map, focuses on key areas with obvious deformation, suppresses irrelevant background noise, and accurately locates the local structures that need to be aligned.
[0019] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the principles and essence of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A seabed image stitching method based on suture line optimization, characterized in that, include: S1. Acquire the original seabed image and perform preprocessing to obtain the target seabed image; S2. Based on the improved ResNet50 network, a two-stage feature extraction is performed on the target seabed image to obtain a multi-level feature map containing global structural information and local detail features. S3. Based on the deformable convolutional network, global coarse registration and local fine correction are performed on the second feature map and the first feature map respectively to obtain a deformable image with sub-pixel level alignment. S4. Based on the cross-image self-attention mechanism, cross-scale feature interaction and dynamic mask optimization are performed on deformed images to divide the stitching line weights between stitched images, and pixel classification is performed according to the weights to obtain seamless stitched images. S5. Construct a composite loss function and train and optimize it to obtain the target stitched image.
2. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S1 includes: S11. Obtain the original seabed image; S12. Based on the gray world hypothesis algorithm, the blue-green bias in the seabed image is eliminated, and the mean of the red, green and blue channels is equalized to obtain the target seabed image.
3. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S2 includes: S21. Construct an improved ResNet50 network; S22. First feature map extraction: Based on the improved ResNet50 network, the first stage of feature extraction is performed on the target seabed image to obtain a medium-resolution feature map of 1 / 8 size of the target seabed image, which is denoted as the first feature map and is used to preserve the local details and textures of the seabed. Specifically, based on the split ResNet50 architecture, the last two fully connected layers are removed, and the first four convolutional blocks are retained to obtain an improved ResNet50 network. The improved ResNet50 network consists of three convolutional layers, one pooling layer, and one fully connected layer. The convolutional layers use filters to slide across the input data to extract local features and capture spatial or temporal parameters. The pooling layer downsamples the feature maps output by the convolutional layers to compress the data volume, reduce computational complexity, and enhance the spatial invariance of the features. The fully connected layer globally integrates all the features extracted by the previous layers, learns the complex nonlinear combination relationships between features, and uses them for the final output. S23. Second feature map extraction: Based on the improved ResNet50 network, the first feature map is extracted in the second stage to obtain a low-resolution feature map of 1 / 16 size of the target seabed image, which is denoted as the second feature map and is used to capture the global spatial relationship of the scene. S24. Feature Fusion: The first feature map and the second feature map are fused by cross-stage skip connections to obtain a multi-scale feature pyramid; wherein, each layer of feature maps is spliced together after being convolved with a 1×1 convolution to unify the channel dimension.
4. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S3 includes: S31. Based on the second feature map, it is input into a deformable convolutional network for global homography transformation to obtain a coarsely aligned global feature map. S32. Based on the first feature map and the global feature map obtained in S31, perform local thin plate spline correction to obtain a deformed image with sub-pixel level alignment.
5. The seabed image stitching method based on suture optimization according to claim 4, characterized in that, Step S31 includes: 1) Calculate the similarity between the features of the two images to be stitched in the second feature map based on the correlation matching algorithm, and obtain the offset of the control points at the four corners of the image; 2) Input the obtained offsets of the four corner control points of the image into the deformable convolutional network to obtain the transformation values of the image deformation; 3) Based on the transformation values of image deformation, the transformation matrix is obtained through direct linear transformation; 4) Multiply the transformation matrix with the original network to obtain the global homography transformation matrix.
6. The seabed image stitching method based on suture optimization according to claim 4, characterized in that, Step S32 includes: 1) Based on the correlation matching algorithm, calculate the similarity between features in the stitched image between the first feature map and another feature map after being transformed by the global homography transformation matrix in S31 above, and obtain the offset cost volume of the four corner control points at each position; The similarity between two mid-level feature maps is calculated using a relevance matching algorithm. The specific process is as follows: ① Perform L2 normalization on the spliced image features to eliminate interference caused by differences in the original numerical scales and obtain the convolution kernel; ②Use the region of one of the images as the convolution kernel, generate the response map composed of the initial matching values from top to bottom and left to right using the sliding window strategy, and normalize it into a probability distribution using the Softmax function to obtain the probability distribution of the matching amount between the two images; ③ Based on the coordinate grid and the probability distribution obtained above, calculate the spatial offset between the regions of the stitched images to generate a displacement field that can quantify spatial changes; 2) Based on the offset of the four corner control points, perform homography matrix transformation on the middle layer feature map; 3) Based on the correlation matching algorithm, the two images to be stitched in the first feature map are input into a deformable convolutional network to obtain the local non-rigid displacement field: ① Shallow branches use deformable convolutions with 64 channels and a kernel size of 5×5 to capture the bending deformation of nearby objects and output local displacement fields. ② The deep branches use deformable convolutions with 512 channels and a kernel size of 7×7 to model large-scale distortions in the distant region and output a global displacement field; 4) Based on the global displacement field scale, the local displacement field and the global displacement field are sampled and fused to obtain the transformation matrix describing the offset of each grid fixed point. This matrix is used to drive the thin plate spline transformation to achieve non-rigid deformation compensation and obtain a deformation image with sub-pixel level alignment.
7. The seabed image stitching method based on suture optimization according to claim 6, characterized in that, Step S4 includes: S41. Extract multi-scale difference features of deformed images through a Transformer encoder with shared weights to obtain an attention weight map; S42. The transformation matrix obtained in S32 is used as the initial mask, which is then concatenated with the attention weight map. The optimized dynamic fusion mask is output through 3×3 convolution and the Sigmoid function, which serves as a guide for pixel selection in the overlapping area of the two images. S43. By applying attention to the channel dimension to calculate the attention weight of the overlapping area of the image, the key deformation area of the deformed image is located. S44. By fusing deep semantic differences and mid-level geometric features through skip connections, an optimized dynamic mask is generated.
8. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S41 includes: 1) Input the registered dual-path images into the feature extraction network to extract multi-scale features, calculate the difference in the overlapping area of the feature maps of the two images, quantify the degree of division of the overlapping area, and obtain the difference map; 2) Project the difference map into query vector, key vector and value vector respectively, calculate the similarity score of all spatial location pairs by matrix multiplication, normalize it into a probability distribution using the Softmax function, and generate an attention weight map.
9. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S44 includes: 1) Perform bilinear interpolation upsampling on the initial mask to restore resolution; 2) Correct mask edge misalignment using a spatial transformation network; 3) A pixel-level weighted formula is used to fuse the original mask and attention-enhanced features.
10. The seabed image stitching method based on suture optimization according to claim 1, characterized in that, Step S5 includes: S51. Construct a composite loss function based on multi-scale structural similarity loss, geometric consistency loss, and texture preservation loss; S52. During the training process, compare the gradient feature differences between the seamlessly stitched image and the original seabed image, and calculate the multi-scale structural similarity loss and geometric consistency loss. Among them, 1) Multi-scale structural similarity loss: The brightness, contrast and structural differences at different resolutions are calculated by Gaussian pyramid; 2) Geometric consistency loss: Based on mesh deformation constraints of thin plate spline transformation, it penalizes non-smooth displacement fields; S53, Texture Preservation Loss: Detail fidelity is evaluated by gradient orientation histogram matching.
Citation Information
Cited By
Deep seabed image splicing method based on Bayesian optimization and HVS attribute model
CN121746171A