An underwater visual slam method and device based on structure prior image enhancement
By enhancing high-frequency details and optimizing lightweight models, combined with soft-activated corner loss, the problem of low performance in underwater visual SLAM was solved, enabling real-time localization and mapping on low-computing-power platforms, and improving the localization accuracy and stability of underwater robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2026-06-05
- Publication Date
- 2026-07-14
AI Technical Summary
Underwater visual SLAM has low performance, especially in harsh optical environments where it is difficult to achieve real-time processing and accurate positioning. Existing deep learning models consume huge amounts of computing resources and cannot achieve real-time processing on ordinary CPUs, resulting in delays in visual perception and underlying inertial physical control.
A high-frequency detail enhancement algorithm is used to enhance the brightness channel of underwater images. A lightweight image enhancement model is used to output high-contrast label images. The model parameters are optimized by combining soft-activation corner loss and L1 loss. The lightweight image enhancement model is iteratively optimized, and the structure-priority image enhancement results are output for use in a visual SLAM system.
Real-time processing of underwater visual SLAM was achieved on a low-computing-power platform, improving the accuracy and stability of geometric feature extraction, enhancing the localization and mapping performance of underwater robots, and eliminating latency issues.
Smart Images

Figure CN122391366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of real-time localization and mapping technology, and in particular to an underwater visual SLAM method and apparatus based on structure-first image enhancement. Background Technology
[0002] With the advancement of the global clean energy strategy, the offshore wind power industry has developed rapidly. As the foundation of wind turbines is located in high sea state waters for a long time, it is prone to weld cracking, structural corrosion and marine organism attachment. Therefore, using underwater robots (such as remotely operated vehicles (ROVs) or autonomous underwater vehicles (AUVs) for autonomous inspection has become a key link in ensuring the safe operation of wind farms. The autonomous shuttle of robots between complex pile foundations relies on high-precision simultaneous localization and mapping (SLAM) capabilities. Meanwhile, monocular vision SLAM technology has become a research hotspot in the field of underwater autonomous navigation due to its significant advantages such as small sensor size, low cost and high environmental perception resolution.
[0003] However, the underwater optical environment in the sea areas where offshore wind farms are located is extremely harsh. For example, the wavelength-dependent absorption of light by water leads to severe color distortion and low contrast. Strong ocean currents and churning sediment are often present near wind turbine foundations, and a large number of suspended particles generate strong backscattering, resulting in extremely blurry images. To overcome the impact of underwater optical degradation on the performance of visual SLAM, an underwater SLAM scheme based on a deep learning generative model is proposed. First, the model parameters are optimized using pixel-level loss and adversarial loss on the training dataset to learn a nonlinear mapping from degraded images to clear images with realistic colors. Then, during actual operation, the processed image is input into the visual SLAM system to calculate the pose. However, relying heavily on pixel-level loss to pursue global color restoration that conforms to human senses will over-smooth the high-frequency geometric corners such as tiny cracks and weld edges on the surface of wind turbine piles, which are extremely important for SLAM. At the same time, in extremely murky areas lacking texture, it is easy to "fabricate" false textures that lack physical consistency from multiple perspectives, leading to a surge in back-end reprojection errors. Moreover, such deep learning models are bloated and consume huge amounts of computing resources, making it impossible to achieve real-time processing of more than 10 FPS on the edge control computer of an underwater robot equipped with only a regular CPU. This results in a serious delay gap between visual perception and underlying inertial physical control, making it difficult to meet the engineering requirements for real-time inspection of underwater robots. There is an urgent need to improve the performance of underwater visual SLAM. Summary of the Invention
[0004] This invention provides an underwater visual SLAM method and apparatus based on structure-priority image enhancement, which solves the technical problem of low performance of underwater visual SLAM.
[0005] The first aspect of this invention provides an underwater visual SLAM method based on structure-first image enhancement, comprising: A high-frequency detail enhancement algorithm is used to enhance the details of the brightness channel of the original underwater image to determine a high-contrast label image; The original underwater image is structurally enhanced using an initial lightweight image enhancement model, and a predicted single-channel intensity image is output. Based on the high-contrast label image and the predicted single-channel intensity image, calculate the total loss value combining the soft-activated corner loss and L1 loss. With the goal of minimizing the total loss value, the model parameters of the initial lightweight image enhancement model are iteratively optimized until the iteration stopping condition is met, and the target lightweight image enhancement model is determined. The received underwater image to be enhanced is then enhanced using the target lightweight image enhancement model, and input into the visual SLAM system for tracking and mapping, outputting the pose map result.
[0006] Furthermore, the process for determining the potentially activatable corner loss includes: Based on the Sobel operator and Gaussian smoothing, the label Hessian matrix and the prediction Hessian matrix corresponding to the high-contrast label image and the predicted single-channel intensity image are determined respectively. Calculate the tag corner response value of the tag Hessian matrix and the predicted corner response value of the predicted Hessian matrix, respectively; The tag corner response value and the predicted corner response value are nonlinearly mapped by the Sigmoid activation function with inverse temperature coefficient, and the tag soft activation corner response value and the predicted soft activation corner response value are output. The mean square error is calculated using the label soft activation corner response value and the predicted soft activation corner response value to determine the possible soft activation corner loss.
[0007] Furthermore, the process for determining the potentially activatable corner loss includes: Based on the high-contrast label image and the predicted single-channel intensity image, the circumferential neighbor pixels of any center pixel are extracted using a sparse convolution kernel group to determine the gray values of the label neighbor pixels of each label pixel and the gray values of the predicted neighbor pixels of each predicted pixel. For any of the gray values of the neighboring pixels of the label and any of the gray values of the predicted neighboring pixels, a non-linear mapping is performed using a Sigmoid activation function with an inverse temperature coefficient, and the corresponding label circumference-center brightness difference response value and the predicted circumference-center brightness difference response value are output. For any of the label pixels’ circumference-center brightness difference response values and any of the predicted pixels’ circumference-center brightness difference response values, the response values are aggregated by a sliding window and the maximum value is taken to determine the label soft-activated corner response values of each of the label pixels and the predicted soft-activated corner response values of each of the predicted pixels. The mean square error is calculated using the label soft activation corner response value and the predicted soft activation corner response value to determine the possible soft activation corner loss.
[0008] Furthermore, the high-frequency detail enhancement algorithm includes a contrast-limited adaptive histogram equalization algorithm, a Retinex algorithm, an unsharpened masking algorithm, or a morphological high-pass filter.
[0009] Furthermore, lightweight image enhancement models include lightweight U-Net models, MobileNet-V3 models incorporating feature pyramids, ShuffleNet models, or GhostNet models.
[0010] Furthermore, the lightweight U-Net model includes a three-layer encoder-decoder.
[0011] A second aspect of the present invention provides an underwater visual SLAM device based on structure-first image enhancement, comprising: The pseudo-label generation module is used to enhance the brightness channel of the original underwater image using a high-frequency detail enhancement algorithm to determine a high-contrast label image; The image processing module is used to perform structural enhancement on the original underwater image through an initial lightweight image enhancement model and output a predicted single-channel intensity image. The loss calculation module is used to calculate the total loss value combining the soft-activated corner loss and L1 loss based on the high-contrast label image and the predicted single-channel intensity image. The model optimization module is used to iteratively optimize the model parameters of the initial lightweight image enhancement model with the goal of minimizing the total loss value, until the iteration stopping condition is met, and to determine the target lightweight image enhancement model. The image enhancement module is used to enhance the received underwater image to be enhanced through the target lightweight image enhancement model, input the image into the visual SLAM system for tracking and mapping, and output the pose map result.
[0012] A computer device provided in a third aspect of the present invention includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the underwater visual SLAM method based on structure-first image enhancement as described in any of the preceding claims.
[0013] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the underwater visual SLAM method based on structure-first image enhancement as described in any of the preceding claims.
[0014] The fifth aspect of the present invention provides a computer program product comprising a computer program / instructions that, when executed by a processor, implement the underwater visual SLAM method based on structure-first image enhancement as described in any of the preceding claims.
[0015] As can be seen from the above technical solutions, the present invention has the following advantages: The above-described solution of the present invention provides an underwater visual SLAM method based on structure-first image enhancement, comprising: using a high-frequency detail enhancement algorithm to enhance the brightness channel of the original underwater image to determine a high-contrast label image; performing structure enhancement on the original underwater image through an initial lightweight image enhancement model to output a predicted single-channel intensity image; calculating the total loss value combining the soft-activated corner loss and L1 loss based on the high-contrast label image and the predicted single-channel intensity image; iteratively optimizing the model parameters of the initial lightweight image enhancement model with the goal of minimizing the total loss value until the iteration stopping condition is met to determine the target lightweight image enhancement model; and inputting the received underwater image to be enhanced into a visual SLAM system for tracking and mapping after image enhancement by the target lightweight image enhancement model, and outputting the pose map result. Based on the above scheme, a single-channel brightness map with high contrast is used as a pseudo-label to guide model learning, decoupling geometric feature extraction from underwater illumination and color interference, discarding ineffective color restoration, and performing "brightness-structure distillation" optimization through L1 loss and a designed soft-activation corner loss. This forces the lightweight image enhancement model to extract and sharpen the rigid geometric corner features that are most valuable for machine localization while filtering out water sediment interference. This provides a good structural advantage for feature matching and pose calculation in the subsequent visual SLAM system, thereby improving the performance of underwater visual SLAM. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the steps of an underwater visual SLAM method based on structure-first image enhancement, as provided in Embodiment 1 of the present invention. Figure 2This is a framework diagram of an underwater visual SLAM method based on structure-first image enhancement provided in Embodiment 1 of the present invention; Figure 3 This is a model training framework diagram provided in Embodiment 1 of the present invention; Figure 4 The flowchart for calculating and backpropagating the soft-activated corner loss provided in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of image enhancement effects in a real environment provided in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the SLAM front-end enhancement image results provided by different enhancement methods in Embodiment 1 of the present invention; Figure 7 This is a schematic diagram illustrating the change of SLAM front-end keyframe generation density over time for different enhancement methods provided in Embodiment 1 of the present invention. Figure 8 This is a schematic diagram of the SLAM localization trajectory of an underwater robot on the FL-Sea dataset with different augmentation methods, provided in Embodiment 1 of the present invention. Figure 9 This is a schematic diagram of the SLAM trajectory of the underwater robot on the FL-Sea dataset using different augmentation methods, as provided in Embodiment 1 of the present invention. Figure 10 This is a structural block diagram of an underwater visual SLAM device based on structure-priority image enhancement, provided in Embodiment 2 of the present invention. Detailed Implementation
[0018] This invention provides an underwater visual SLAM method and apparatus based on structure-first image enhancement to address the technical problem of low performance in underwater visual SLAM.
[0019] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0020] Please see Figure 1 and Figure 2The present invention provides an underwater visual SLAM method based on structure-first image enhancement (TA-UIE-SLAM), which can be deployed on the onboard computing platform of an underwater robot (such as an ROV or an AUV). Before the underwater robot is deployed, the lightweight image enhancement model (TA-UIE) based on task perception and structure priority is constructed and trained on a shore-based high-performance computer. During the operation, the underwater camera video stream is converted in real time into a high-contrast single-channel structure map that highlights the rigid geometric features of the wind turbine pile foundation through the front-end lightweight image enhancement model. It is then seamlessly input into the back-end visual SLAM system for multi-threaded pose calculation and 3D point cloud construction. Specifically, the method includes: Step 101: Use a high-frequency detail enhancement algorithm to enhance the details of the brightness channel of the original underwater image to determine the high-contrast label image.
[0021] High-frequency detail enhancement algorithms refer to algorithms used to enhance high-frequency detail information (such as edges, textures, and microstructures) of an image. In one specific embodiment of this work, high-frequency detail enhancement algorithms include, but are not limited to, contrast-limited adaptive histogram equalization (CLAHE), Retinex algorithm, unsharp masking algorithm, or morphological high-pass filtering.
[0022] It should be noted that, as Figure 3 As shown, this embodiment does not directly use a standard clear RGB image as the supervised ground truth. Instead, it constructs a pseudo-realistic label generator. For any given raw underwater image, the generator first extracts its luminance channel (e.g., grayscale processing) to physically remove underwater characteristic color crosstalk. Then, it applies a high-frequency detail enhancement algorithm to the luminance channel to enhance high-frequency detail information, generating a single-channel image with extremely high local contrast and stripped of color interference as the target label. This pseudo-realistic label acts as the "teacher signal" for network learning during training. It provides a clean and structurally rich reference benchmark that can guide the lightweight model to learn the nonlinear mapping from the degraded color space to the high-contrast structural space.
[0023] Step 102: Perform structural enhancement on the original underwater image using the initial lightweight image enhancement model, and output the predicted single-channel intensity image.
[0024] It should be noted that the "lightweight" in "lightweight image enhancement model" refers to a model that has been deeply customized for underwater mobile edge computing platforms. It is designed to enhance underwater images to address optical degradation issues in real turbid underwater environments. The aim is to force the model to discard the color weights of degraded color images in order to output a high-contrast, colorless single-channel intensity image. The initial lightweight image enhancement model refers to the lightweight image enhancement model in the model training phase.
[0025] In one specific implementation of this embodiment, the lightweight image enhancement model includes, but is not limited to, the lightweight U-Net (U-shaped Network) model, the MobileNet-V3 model combined with the feature pyramid (FPN), the ShuffleNet model, or the GhostNet model. The specific model architecture can be found in the existing technology and will not be described in detail here. It can be deployed on mobile devices and can meet the real-time requirements of low computing power platforms.
[0026] In a more specific implementation of this embodiment, the lightweight U-Net model comprises a three-layer encoder-decoder.
[0027] It should be noted that, as Figure 3 As shown, this network architecture is based on the classic symmetric encoder-decoder topology, including a three-layer encoder-decoder architecture, specifically: To achieve the best balance between effectively reducing floating-point operation overhead (FLOPs) and capturing sufficient geometric gradients for front-end feature extraction, the model receives a 3-channel (RGB) raw underwater image scaled to a resolution of 224×224 pixels at the input. This specific resolution design avoids computational redundancy caused by high resolution, while ensuring that local geometric changes such as corners are not undersampled and erased. In the model's contracting path (i.e., the encoder part), the model progressively extracts deep structural features and reduces the spatial resolution of the feature maps through three consecutive contracting blocks; to achieve extreme lightweighting, it differs from the standard U-Net network. In this embodiment, the width of the feature channels at each level is strictly limited and scaled to a wide channel design. Specifically, the first shrinking block receives 3-channel RGB input, which is then processed sequentially through two cascaded convolutional layers with a kernel size of 3×3, a ReLU (Rectified Linear Unit) non-linear activation function, and a 2×2 max pooling layer, outputting a low-level encoded feature with 32 channels and a resolution of 112×112 pixels. The second and third shrinking blocks repeat the same convolution, non-linear activation, and pooling processing logic, gradually downsampling the feature map size to 56×56 and 28×28, respectively, increasing the number of channels to 64 and 128. Next, the bottleneck layer at the bottom of the model acts as a bridging module, directly performing two 3×3 convolutions on the deep encoded output features without pooling, doubling the number of output channels of the feature map to 256, while maintaining the spatial size of the feature map at 14×14, thus obtaining a global receptive field and a highly abstract geometric texture representation at the deepest layer. In the network's expansion path (i.e., the decoder part), the model contains three expansion blocks symmetrical to the encoder. The key technology in this part is the application of the skip connection mechanism. Each expansion block first uses the bilinear upsampling algorithm to double the spatial resolution of the decoded input feature map. Then, the magnified feature map is concatenated with the feature map of the same size from the corresponding layer of the encoder in the channel dimension. This cross-layer fusion mechanism is extremely important because it preserves high-frequency spatial details that are easily lost during downsampling (such as tiny weld seam edges and sharp geometric corners). These details are the core elements for visual SLAM systems to achieve accurate localization and local mapping. The concatenated feature map is then processed twice more by 3×3 convolution to reduce the feature channel dimension and smooth the information, gradually restoring the feature map from 28×28 to 112×112. At the end of the network, the prediction head uses a 1×1 convolutional layer with a sigmoid activation function to reduce the dimensionality of the multi-channel deep decoding output features and map them to... The interval is ultimately output as a high-contrast, colorless single-channel intensity map with a size of 224×224.
[0028] Step 103: Based on the high-contrast label image and the predicted single-channel intensity image, calculate the total loss value combining the soft-activated corner loss and L1 loss.
[0029] It should be noted that underwater images often suffer severe visual degradation due to wavelength-dependent absorption and scattering (fogging) of the medium. Existing deep learning-based image enhancement typically relies on pixel-level loss functions (such as L1 or mean squared error, MSE) for model training. However, these conventional loss functions tend to average high-frequency details of the image to minimize global error, resulting in overly smoothed output images and suppressed texture gradients. Since the front-end feature detectors of visual SLAM (such as the FAST corner detector) are highly dependent on sharp local intensity changes, this low-contrast and blurry output can lead to insufficient extraction of key points, resulting in tracking instability. To address this, this embodiment combines the differentiable soft activation corner loss with L1 loss to construct a structure-priority enhancement total loss function driven by differentiable corner loss, where L1 loss is used to constrain the basic pixel brightness error. Understandably, traditional corner detection typically employs discrete, non-differentiable hard threshold comparison logic, such as brightness difference judgment in FAST and corner response threshold filtering in Harris. In contrast, the soft activation corner loss in this embodiment refers to using a soft activation function with a temperature coefficient to transform the image corner response value into a loss function in a differentiable probability saliency space, directly penalizing the weights of lost corners and edges in the model, thereby constructing a differentiable corner response loss term.
[0030] In one specific embodiment of this implementation, the process for determining the corner loss can be activated by Microsoft, including: Based on the Sobel operator and Gaussian smoothing, the label Hessian matrix and the prediction Hessian matrix corresponding to the high-contrast label image and the predicted single-channel intensity image are determined respectively. Calculate the tag corner response value of the tag Hessian matrix and the predicted corner response value of the predicted Hessian matrix, respectively; The tag corner response value and the predicted corner response value are nonlinearly mapped by the Sigmoid activation function with inverse temperature coefficient, and the tag soft activation corner response value and the predicted soft activation corner response value are output. The mean square error is calculated using the label soft-activated corner response value and the predicted soft-activated corner response value to determine the loss of the soft-activated corner.
[0031] It should be noted that when the soft activation corner loss is a soft activation corner loss based on Harris corner response or Shi-Tomasi corner response, the soft activation corner loss uses the Sobel operator to extract spatial gradients to construct the Hessian matrix, and uses the Sigmoid soft activation function with inverse temperature coefficient to nonlinearly map the response values in the infinite range to the normalized probability space to alleviate gradient explosion. Specifically, such as Figure 4 As shown, the Harris corner response is used as an example: 1) Geometric Perception: This aims to capture local geometric features of an image by constructing a structure tensor (or second-order moment matrix). Spatial convolution is performed using the differentiable Sobel operator kernel to extract the spatial partial derivatives (gradients) in the horizontal and vertical directions. The calculation formula is shown below. ; In the formula, Represents the horizontal coordinate. Represents the vertical coordinates. This represents the spatial partial derivative in the horizontal direction. This represents the Sobel operator kernel in the horizontal direction. The input image represents the corner response (including the high-contrast label image and the predicted single-channel intensity image). ), This represents the spatial partial derivative in the vertical direction. This represents the Sobel operator kernel in the vertical direction; Considering that the gradient magnitude alone is insufficient to address the "aperture problem" (i.e., feature blurring at the edges of straight lines) in feature tracking, this embodiment further analyzes the local deviation distribution of the gradient. Furthermore, to ensure the algorithm's robustness to pixel-level noise, a Gaussian window function is introduced for weighted smoothing. The mathematical expression of the Gaussian window function is shown below: ; In the formula, This represents the standard deviation (preferably set to 1.5). This represents the Gaussian window function. Represents pi (π). Represents an exponential function with the natural constant as its base; The final structure tensor matrix constructed by convolution operation of Gaussian smoothing kernel and gradient outer product is as follows: ; In the formula, Represents the Hessian matrix (including the labeled Hessian matrix and the predicted Hessian matrix). Represents the image gradient vector. Indicates transpose. This represents the second-order partial derivative in the horizontal direction. This represents the second-order partial derivative in the vertical direction. Denotes the first smoothed partial derivative. This represents the second smooth partial derivative. This represents the third smoothed partial derivative; To subsequently calculate the corner response, extract... Two key algebraic invariants: ; In the formula, Represents a determinant. Represents trace operation; In this step, Gaussian smoothing essentially acts as a "geometric voting mechanism": isolated noise points lacking consistent gradient support are filtered out by averaging, while real physical structure corners are enhanced. 2) Differentiable response computation and soft activation probability mapping. Traditional feature SLAM relies on non-differentiable selection criteria (such as non-maximum suppression NMS), which is inherently incompatible with the gradient backpropagation mechanism of deep learning. Therefore, this embodiment reconstructs corner detection into a continuous and fully differentiable computational flow. First, calculate the original Harris corner response values: ; In the formula, Representing coordinates Corner response values (including labeled corner response values and predicted corner response values). Indicates the sensitivity coefficient; However, directly optimizing the original response within a deep learning framework... It is pathological, because The dynamic range is extremely large (proportional to the fourth power of the gradient). In the high-contrast region, direct differentiation can easily lead to "gradient explosion" and cause the model to collapse. Therefore, this embodiment introduces a Sigmoid soft activation function with an inverse temperature coefficient to nonlinearly map the infinite range of response values to a normalized probability space. In this context, the mapping process includes: ; In the formula, Representing coordinates The response value of the soft-activated corner at that location. This represents the inverse temperature coefficient (i.e., the reciprocal of the temperature coefficient, preferably set to ). ), This represents an exponential function with the natural constant as its base; the ingenuity of this design lies in the fact that its derivative exhibits a bell-shaped distribution: when the model is extremely confident about the current region ( Or it is absolutely flat, or... When the point is absolutely a corner, the gradient vanishes; however, when the local structure is in a fuzzy or ambiguous state ( When the gradient reaches its peak, this mechanism effectively acts as a geometric attention gate, forcing the model to precisely focus its limited learning capacity on "sharpening the blurred weak corners". 3) Gradient Flow & Sharpening Supervision; The final stage involves establishing a closed-loop supervision mechanism to directly optimize model parameters to maximize geometric fidelity; this process relies on the target saliency probability map calculated from the teacher signal (high-contrast label image). It acts as a "geometric oracle," indicating the precise location where structural features should exist; this embodiment optimizes the mean square error (MSE) loss of the target construction in the spatial domain: ; In the formula, This indicates that Microsoft can activate corner loss. Represents the spatial domain, Representing coordinates Predicted soft-activated corner response value at the location, Representing coordinates The soft-activation corner response value of the label at that location.
[0032] And for During backpropagation, the error signal will sequentially penetrate the sigmoid soft activation layer and the structure tensor matrix according to the chain rule. Computation layer; First, calculate the loss function against the original response. The scalar error signal, this process incorporates the derivative properties of the Sigmoid function, as detailed below: ; In the formula, Representing coordinates scalar error signal at the location, Indicates the inverse temperature coefficient; Subsequently, the scalar error continues to propagate back to the structural tensor component, and the loss can be obtained for the local geometric matrix using matrix calculus. The sensitivity gradient, whose partial derivatives in matrix-valued form are shown below: ; This matrix-valued gradient essentially acts as an "anisotropic tensor foice"; for a pixel located at a true corner but currently predicted as blurry by the model, this gradient flow forces the model to simultaneously maximize the spatial partial derivatives in two orthogonal directions. and ; Subsequently, based on the end-to-end update rules of backpropagation, the learning rate is used... Weight parameters of the model Perform iterative optimization as follows: .
[0033] By using this Microsoft-activated corner loss By combining the base brightness reconstruction loss (L1) with joint end-to-end training, the convolutional kernels in the model (Student Stream) can gradually evolve into "structure-preserving filters". This effectively suppresses ocean snow noise while forcibly sharpening the geometric consistency of underwater images, thus perfectly meeting the front-end feature extraction requirements of downstream visual SLAM systems.
[0034] It is understandable that the Shi-Tomasi corner response and the Harris corner response share the same structure tensor, except that the final corner response value is changed to "take the minimum eigenvalue of the matrix". For the rest of the specific implementation process, please refer to the Harris corner response, which will not be repeated here.
[0035] In another specific embodiment of this implementation, the process for determining the corner loss can be activated by Microsoft, including: Based on high-contrast label images and predicted single-channel intensity images, differentiable extraction of circumferential neighbor pixels is performed on any central pixel using sparse convolution kernel groups to determine the gray values of label neighbor pixels and predicted neighbor pixels of each predicted pixel. For any gray value of a neighboring pixel of a label and any gray value of a predicted neighboring pixel, a non-linear mapping is performed using a Sigmoid activation function with an inverse temperature coefficient, and the corresponding label circumference-center brightness difference response value and predicted circumference-center brightness difference response value are output. For any tag pixel's circumference-center brightness difference response value and any predicted pixel's predicted circumference-center brightness difference response value, the response values are aggregated through a sliding window and the maximum value is taken to determine the tag soft activation corner response value of each tag pixel and the predicted soft activation corner response value of each predicted pixel. The mean square error is calculated using the label soft-activated corner response value and the predicted soft-activated corner response value to determine the loss of the soft-activated corner.
[0036] It should be noted that when the soft activation corner loss is based on the FAST feature response, a "soft relaxation" strategy is used to achieve differentiable FAST: the "hard threshold comparison" is replaced with a sigmoid smoothing function with a temperature parameter to calculate the probability that surrounding pixels are brighter / darker than the center pixel, and the Boolean logic operation of "counting consecutive points" is replaced with expected value calculation based on the probability response or Softmax aggregation; in this way, the discrete FAST corners that originally output 0 or 1 are softened into a single output. The feature response maps with continuous probabilities between them allow for perfect integration with the gradient flow of deep learning; specifically: 1) Differentiable extraction of circumferential neighborhood pixels: To replace the discrete point sampling operation of standard FAST features, this embodiment constructs a sparse convolution kernel group consisting of sixteen fixed sparse convolution kernels. The positions of these convolution kernels precisely correspond to the sixteen pixels on a circle of a specific radius around the center pixel (any pixel in the image will be used as the center pixel). By applying these convolution kernels to the corner response input image (i.e., the high-contrast label image and the predicted single-channel intensity image), the gray value set of the circumferential neighborhood pixels corresponding to each center pixel can be extracted in a differentiable manner. Each circumferential neighborhood pixel gray value set includes multiple neighborhood pixel gray values (i.e., label neighborhood pixel gray values and predicted neighborhood pixel gray values). 2) Soft threshold comparison mapping: The standard FAST feature implements the hard logic of "if it is greater than the threshold, it is judged as bright, otherwise it is dark" by setting a brightness contrast threshold. Based on the gray value of the neighboring pixels, this embodiment uses the Sigmoid activation function with inverse temperature coefficient to calculate the continuous probability response value of the circumferential neighboring pixels being "significantly brighter" or "significantly darker" than the center pixel. This is called the circumferential-center brightness difference response value. 3) Continuous aggregation and supervised optimization: The sixteen probability sequences calculated on the circumference of each pixel are regarded as one-dimensional continuous signals. One-dimensional smooth convolution or Softmax aggregation operation is used to calculate the joint expectation value (i.e. soft activation corner response value) of multiple consecutive points that simultaneously satisfy the brightness difference condition, thereby outputting a continuous probability feature map in the interval of zero to one; finally, the mean square error is calculated, thereby realizing the complete transformation of the originally discrete Boolean logic into a fully differentiable gradient backpropagation mechanism. Understandably, when using one-dimensional smooth convolution, the window length is set according to the set number of consecutive points (e.g., nine consecutive points). Multiple circumference-center brightness difference response values are selected sequentially through a sliding window, and then the aggregated response value is output through one-dimensional smooth convolution. The maximum value of the multiple aggregated response values for each pixel is taken as the joint expectation value. Similarly, when using Softmax aggregation, multiple circumference-center brightness difference response values are selected sequentially through the same sliding window, and then the aggregated response value is output through the Softmax aggregation function. The maximum value of the multiple aggregated response values for each pixel is taken as the joint expectation value.
[0037] Step 104: With the goal of minimizing the total loss, iteratively optimize the model parameters of the initial lightweight image enhancement model until the iteration stopping condition is met, and determine the target lightweight image enhancement model.
[0038] It should be noted that this embodiment implements the "Luminance-Structure Distillation" strategy through the total loss value. When iteratively optimizing the model parameters based on the total loss value, the model not only passively imitates the contrast enhancement capability of the teacher signal, but also spontaneously acts as an "intelligent structural filter" under the joint geometric loss optimization. It learns to actively suppress and filter out high-frequency shot noise that lacks spatial gradient continuity, achieving selective local contrast enhancement and extremely sharpening the physical geometric features of the wind turbine pile foundation. During the iterative training process, when the iteration stopping condition is met, such as reaching the maximum iteration or the total loss value converges, the target lightweight image enhancement model is determined, which is the trained lightweight image enhancement model.
[0039] Understandably, by selecting raw underwater images for training on challenging real-world underwater canyon datasets (such as the FL-Sea dataset) and using the AdamW optimizer for end-to-end training, the model can demonstrate excellent geometric reconstruction and noise-resistant generalization capabilities with limited CPU computing resources, laying a solid structural advantage for feature matching and pose calculation in subsequent visual SLAM systems.
[0040] Step 105: After the received underwater image to be enhanced is processed by the target lightweight image enhancement model, it is input into the visual SLAM system for tracking and mapping, and the pose map result is output.
[0041] It should be noted that during online inference applications after model training is complete, such as... Figure 2As shown, the converged PyTorch dynamic graph is converted into a static computation graph file in ONNX (Open Neural Network Exchange) format through the model export interface. When the underwater robot is actually performing wind power pile foundation inspection, the onboard platform host calls the CPU acceleration backend of ONNX Runtime (ONNX runtime environment). Through the underlying operator fusion and memory pool reuse technology, the original video frame (i.e., the underwater image to be enhanced) is processed with extremely low latency (only about 91 milliseconds to process a single frame). The target lightweight image enhancement model performs forward inference and outputs high-contrast enhanced frames in real time, replacing the grayscale conversion step of the traditional SLAM front end. Subsequently, the enhanced frames are directly and seamlessly pushed to the SLAM backbone tracking module at a high throughput of about 10.9 frames per second (FPS). This hardware and software co-deployment eliminates the "real-time gap" problem that is easy to occur when deep learning is applied to the underwater edge. In the tracking thread of the SLAM system, after receiving the augmented frame, the system first performs an ORB feature extraction operation. Thanks to the extremely high structural contrast of the augmented frame, the system can stably extract a large number of FAST (Features from Accelerated Segment Test) corner points located on the actual physical edges of the wind turbine pile foundation, and calculate their rotation-invariant BRIEF (Binary Robust Independent Elementary Features) descriptors, fundamentally avoiding "ghost features" caused by silt. Next, the initial pose estimation or relocalization module uses a constant-velocity kinematics model to predict the initial six-degree-of-freedom pose of the current camera. If a sudden loss of tracking occurs due to violent movements such as pipeline collisions, a visual dictionary-based relocalization mechanism is triggered to recover the pose. Subsequently, the tracking local map module... LocalMap performs 3D-2D projection matching between the features extracted from the current frame and the local 3D map points, and optimizes the accurate camera pose by using a nonlinear least squares method to minimize the reprojection error; finally, the New KeyFrameDecision module selects representative, non-redundant frames as key frames based on indicators such as the proportion of shared features and spatial relative motion distance, and passes them to the subsequent mapping thread. To support the aforementioned tracking and subsequent mapping processes, the system relies on two core data structure management modules: the Binary Bag-of-Words Model Keyframe Database (DBoW2 KEYFRAME DATABASE) and the Multi-Subgraph Management Module (ATLAS). DBoW2 includes an offline-trained visual vocabulary and an online-updated recognition database, capable of converting high-dimensional image features into low-dimensional bag-of-words vectors for extremely rapid scene recognition. ATLAS, on the other hand, is responsible for dividing the entire underwater map into an active map (the map currently being tracked) and a non-active map. The Map (a sub-map left over from history or before it was lost) greatly improves the system's survival and map recovery capabilities under extreme conditions such as severe fish occlusion. Based on this data, the Local Mapping thread receives keyframes from the tracking thread, performs strict epipolar geometry matching between shared keyframes, and incrementally calculates and generates 3D map points on the surface of wind turbine pile foundations through triangulation. At the same time, this thread continuously executes a strict point cloud removal strategy in the background to permanently remove temporary suspended false features with too few observations from the 3D map, ensuring the density and purity of the local environment map. When underwater robots inevitably experience odometer drift during prolonged inspections of wind turbine monopiles or jacket structures, the loop fusion and map fusion threads (LOOP & MAP MERGING) and full BA (FULL BA) play a crucial role in eliminating these errors. The system continuously queries the DBoW2 database in the background. Once it detects a high similarity between the current keyframe and a historical non-adjacent keyframe (e.g., the robot completes a full circle around the pile and returns to the starting point, indicating a loop closure), it calculates the similarity transformation matrix (Sim3 transformation, including rotation, translation, and scaling) between the two. Upon successful matching, the system immediately performs map fusion, forcibly pulling and aligning the drifting local map. Subsequently, the system triggers full bundle adjustment (FULL BA), using an optimization algorithm library to perform multivariate joint nonlinear optimization on all camera pose parameters and 3D map point coordinates, completely eliminating global cumulative drift errors. Ultimately, this outputs a high-fidelity, distortion-free underwater 3D point cloud map of the pile foundation for offshore wind power operation and maintenance.
[0042] To verify the effectiveness of this embodiment in a real underwater environment, a real turbid underwater dataset was processed, and a qualitative and quantitative comparative analysis was conducted with the traditional histogram equalization (CLAHE) algorithm: 1) See Figure 5The enhanced contrast and magnified texture areas of the real-world image shown demonstrate the improved quality of the original underwater image. Figure 5 The (a) Raw image exhibits typical underwater optical degradation features, with extremely low overall image contrast, severe attenuation of structural features on the rock surface, and weak corner response. This severe feature degradation can easily cause the visual SLAM front-end to fall into a "feature starvation" state, thereby causing tracking loss. In contrast, images enhanced by the traditional CLAHE algorithm ( Figure 5 Although (b) CLAHE improved the local contrast, this enhancement was merely a blind stretching of pixel intensity. It can be clearly seen from the corresponding magnified area that the CLAHE algorithm did not specifically preserve and sharpen the geometric structure, but instead caused over-enhanced artifacts and amplified high-frequency noise in the water (such as suspended sediment). These non-rigid noises are easily misextracted as "ghost features" by the SLAM system in the video stream. Thanks to the direct geometric supervision provided by the differentiable Harris corner loss during the training phase, the image enhanced by the algorithm in this embodiment ( Figure 5 (c)Ours demonstrates excellent geometric feature preservation and sharpening capabilities. From its magnified area, it can be clearly observed that the rock edges become sharper, the corner response is significantly enhanced, and the physical texture details of the underlying layer are restored with extremely high fidelity. At the same time, the shot noise in the water background is effectively suppressed, avoiding the over-enhancement artifacts commonly found in traditional histogram enhancement methods.
[0043] 2) To more objectively quantify and evaluate the friendliness of enhanced images to downstream SLAM feature extraction, this embodiment further introduces four quantitative indicators specifically for geometric quality evaluation: Corner Response Mean (CRM), Corner Response Maximum (CRMax), Structure Tensor Determinant (STD), and Laplacian Variance (LV). Among them, CRM and CRMax directly reflect the overall intensity and distribution peak of potential corner features in the image, which is crucial for SLAM systems that rely on ORB or FAST features; STD quantifies the physical saliency of local geometric structures (such as edges and corners); LV is used to measure the overall sharpness and high-frequency detail richness of the image. The statistical data of the quantitative experiments are shown in Table 1. Table 1. Geometric Quality Assessment Table for Structural Priority Reinforcement Evaluation in Real-World Environments
[0044] Table 1 clearly demonstrates that the method of this embodiment achieves significant advantages across all geometric quality metrics; specifically, the unprocessed original degraded image has a CRM of only 49.2 and an STD of only 0.69. This indicates that its usable geometric features are extremely scarce; after processing with the traditional CLAHE algorithm, the image's CRM is improved to 888.8, and STD is improved to 11.77. The LV reached 270.5, indicating that although its geometric features were improved, the improvement was limited by its indiscriminate contrast stretching characteristics. In contrast, the image processed by the algorithm in this embodiment showed a surge in CRM to 2807.2, CRMax to 14.43, and STD to 15.30. ), and LV even reached 311.7; Compared to the CLAHE algorithm, the structural enhancement model proposed in this embodiment achieves a significant improvement of up to 215.9% in the mean corner response (CRM), a 36.9% improvement in the maximum corner response, and a 29.7% enhancement in the structural tensor determinant. These solid quantitative data fully verify that the image enhancement algorithm of this embodiment effectively amplifies the "geometric saliency" urgently needed at the bottom layer of machine vision and maintains the rigidity and fidelity of the physical structure well. Furthermore, the algorithm ensures that the output image contains high-density, high-response, and noise-resistant effective corner features, thus laying an extremely solid data perception foundation for robust feature matching, high-precision six-DOF pose estimation, and dense 3D point cloud mapping in underwater robot visual SLAM systems.
[0045] Meanwhile, this implementation also verifies the SLAM closed loop for offshore wind power inspection through engineering deployment on an edge computing platform: In actual inspection tasks targeting the underlying foundation of offshore wind power, autonomous underwater vehicles (AUVs) or remotely operated vehicles (ROVs) are limited by the strict deep-water sealed volume, overall power consumption and heat dissipation conditions. Their onboard computing platforms usually cannot be equipped with high-power independent GPU graphics cards, and often can only rely on general-purpose CPU nodes (such as Intel NUC 11 micro edge motherboards) with extremely limited computing power to perform full-stack computing. Traditional deep learning image augmentation and generation models (such as FUnIE-GAN or Transformer architecture) have bloated model structures, and the time taken to process a single frame of image on such pure CPU platforms is usually as high as hundreds of milliseconds (for example, FUnIE-GAN takes 632.31 milliseconds, and even less than 1 FPS under the native PyTorch framework). This will cause a serious delay gap between the visual front-end processing and the underlying inertial measurement unit (IMU), which cannot meet the navigation requirements of underwater robot closed-loop control and real-time obstacle avoidance at all. To bridge this "real-time gap," this embodiment proposes a lightweight engineering deployment scheme deeply customized for edge computing platforms. First, offline training of the Structure-First-UIE network is completed on a shore-based high-performance computer. Then, using the model export interface, the converged PyTorch dynamic computation graph is converted into a cross-platform ONNX format static file. When the underwater robot actually performs a circumferential inspection of wind turbine monopiles or jacket structures, the onboard host directly calls the CPU-accelerated backend engine of ONNXRuntime to load the aforementioned static model. Through underlying operator fusion and memory pool reuse technologies, the parallel inference potential of the CPU is maximized. Table 2. Computational resource consumption and runtime performance of different enhancement methods
[0046] As shown in Table 2, the model in this embodiment not only reduces the number of model parameters to 1.93 Million (72.5% less than FUnIE-GAN), but also significantly compresses the storage space occupied to 7.35 MB, and its floating-point operation volume is as low as 10.49 GFLOPs. In real Intel NUC 11 hardware testing, the average latency of the system in processing a single frame of turbid underwater image was successfully compressed to 91.73 milliseconds, achieving a high throughput of 10.90 FPS. This running speed is 6.9 times that of the existing FUnIE-GAN and 2.1 times that of PUIE-Net, laying a solid engineering foundation for subsequent SLAM multi-threaded scheduling. Table 3 Comparison of SLAM performance of various augmentation methods on the FL-sea dataset
[0047] After overcoming the bottleneck of edge computing power, this embodiment further constructs a closed-loop SLAM system for offshore wind power inspection that seamlessly collaborates with the enhanced front-end and ORB-SLAM3 back-end. When the robot performs inspection tasks, the enhanced thread runs concurrently with the main SLAM threads such as tracking, local mapping, and closed-loop fusion. The extremely low-visibility underwater video stream captured by the airborne camera is converted into a single-channel structure map with high contrast and clear rigid physical boundaries in real time within less than 100 milliseconds, and immediately pushed to the tracking thread to extract ORB features. Since the input structure map better preserves the real physical edges and suppresses suspension noise, the SLAM system not only gets rid of the fatal defects of trajectory divergence and tracking loss (as shown in Table 3, the experiment verified that the number of tracking loss times in a complex sequence of up to 200 seconds was 0, and the effective tracking rate reached 87.0%), but also successfully constructed and maintained up to 21,103 dense 3D map points, which not only made the mapping denser, but also avoided a large number of false 3D noise points caused by floating objects. Meanwhile, various enhancement methods enhance the SLAM front-end image pairs, for example... Figure 6 As shown, a comparison of the SLAM front-end keyframe generation density changes over time using various enhancement methods is presented. Figure 7 As shown.
[0048] To further verify the feasibility of this embodiment, SLAM localization 3D trajectories with different enhancement methods were also tested on the FL-Sea dataset. Figure 8 (a) and two-dimensional trajectory ( Figure 8 In (b) of the diagram, a comparison is made of the underwater robot's trajectory along the horizontal (X), vertical (Y), and forward (Z) axes as a function of time (e.g., ...). Figure 9 (As shown).
[0049] In this embodiment of the invention, a single-channel brightness map with high contrast is used as a pseudo-label to guide model learning, decoupling geometric feature extraction from underwater illumination and color interference, discarding ineffective color restoration, and performing "brightness-structure distillation" optimization through L1 loss and a designed soft-activation corner loss. This forces the lightweight image enhancement model to extract and sharpen the rigid geometric corner features most valuable for machine localization while filtering out water sediment interference. The pure CPU-accelerated backend based on ONNXRuntime can be deployed in a highly efficient hardware and software collaborative closed loop with the visual SLAM system at resource-constrained edge environments, forming four concurrent independent threads: enhancement thread, tracking thread, local mapping thread, and closed-loop and map fusion thread. This establishes an intelligent navigation system that can perform high-precision 3D mapping and autonomous localization of wind turbine pile foundations in real time, robustly, and without frame loss even in extremely turbid environments, thus improving the performance of underwater visual SLAM.
[0050] Please see Figure 10 The second embodiment of the present invention provides an underwater visual SLAM device based on structure-first image enhancement, comprising: The pseudo-label generation module 1001 is used to enhance the brightness channel of the original underwater image with a high-frequency detail enhancement algorithm to determine a high-contrast label image. Image processing module 1002 is used to perform structural enhancement on the original underwater image through an initial lightweight image enhancement model and output a predicted single-channel intensity image; The loss calculation module 1003 is used to calculate the total loss value combining the soft-activated corner loss and L1 loss based on the high-contrast label image and the predicted single-channel intensity image. The model optimization module 1004 is used to iteratively optimize the model parameters of the initial lightweight image enhancement model with the goal of minimizing the total loss value until the iteration stopping condition is met, and to determine the target lightweight image enhancement model. The image enhancement module 1005 is used to enhance the received underwater image to be enhanced by the target lightweight image enhancement model, input the image into the visual SLAM system for tracking and mapping, and output the pose map result.
[0051] Embodiment 3 of the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs the steps of the underwater visual SLAM method based on structure-first image enhancement as described in Embodiment 1 of the present invention.
[0052] Embodiment 4 of the present invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the underwater visual SLAM method based on structure-first image enhancement as described in Embodiment 1 of the present invention.
[0053] Embodiment 5 of the present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the underwater visual SLAM method based on structure-first image enhancement as described in Embodiment 1 of the present invention.
[0054] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0055] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0056] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0057] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0058] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0059] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An underwater visual SLAM method based on structure-first image enhancement, characterized in that, include: A high-frequency detail enhancement algorithm is used to enhance the details of the brightness channel of the original underwater image to determine a high-contrast label image; The original underwater image is structurally enhanced using an initial lightweight image enhancement model, and a predicted single-channel intensity image is output. Based on the high-contrast label image and the predicted single-channel intensity image, calculate the total loss value combining the soft-activated corner loss and L1 loss. With the goal of minimizing the total loss value, the model parameters of the initial lightweight image enhancement model are iteratively optimized until the iteration stopping condition is met, and the target lightweight image enhancement model is determined. The received underwater image to be enhanced is then enhanced using the target lightweight image enhancement model, and input into the visual SLAM system for tracking and mapping, outputting the pose map result.
2. The underwater visual SLAM method based on structure-first image enhancement according to claim 1, characterized in that, The process for determining the soft-activation corner loss includes: Based on the Sobel operator and Gaussian smoothing, the label Hessian matrix and the prediction Hessian matrix corresponding to the high-contrast label image and the predicted single-channel intensity image are determined respectively. Calculate the tag corner response value of the tag Hessian matrix and the predicted corner response value of the predicted Hessian matrix, respectively; The tag corner response value and the predicted corner response value are nonlinearly mapped by the Sigmoid activation function with inverse temperature coefficient, and the tag soft activation corner response value and the predicted soft activation corner response value are output. The mean square error is calculated using the label soft activation corner response value and the predicted soft activation corner response value to determine the possible soft activation corner loss.
3. The underwater visual SLAM method based on structure-first image enhancement according to claim 1, characterized in that, The process for determining the soft-activation corner loss includes: Based on the high-contrast label image and the predicted single-channel intensity image, the circumferential neighbor pixels of any center pixel are extracted using a sparse convolution kernel group to determine the gray values of the label neighbor pixels of each label pixel and the gray values of the predicted neighbor pixels of each predicted pixel. For any of the gray values of the neighboring pixels of the label and any of the gray values of the predicted neighboring pixels, a non-linear mapping is performed using a Sigmoid activation function with an inverse temperature coefficient, and the corresponding label circumference-center brightness difference response value and the predicted circumference-center brightness difference response value are output. For any of the label pixels’ circumference-center brightness difference response values and any of the predicted pixels’ circumference-center brightness difference response values, the response values are aggregated by a sliding window and the maximum value is taken to determine the label soft-activated corner response values of each of the label pixels and the predicted soft-activated corner response values of each of the predicted pixels. The mean square error is calculated using the label soft activation corner response value and the predicted soft activation corner response value to determine the possible soft activation corner loss.
4. The underwater visual SLAM method based on structure-first image enhancement according to claim 1, characterized in that, The high-frequency detail enhancement algorithms include contrast-limited adaptive histogram equalization, Retinex algorithm, unsharpened masking algorithm, or morphological high-pass filtering.
5. The underwater visual SLAM method based on structure-first image enhancement according to claim 1, characterized in that, Lightweight image enhancement models include lightweight U-Net models, MobileNet-V3 models that incorporate feature pyramids, ShuffleNet models, or GhostNet models.
6. The underwater visual SLAM method based on structure-first image enhancement according to claim 5, characterized in that, The lightweight U-Net model consists of a three-layer encoder-decoder.
7. An underwater visual SLAM device based on structure-first image enhancement, characterized in that, include: The pseudo-label generation module is used to enhance the brightness channel of the original underwater image using a high-frequency detail enhancement algorithm to determine a high-contrast label image; The image processing module is used to perform structural enhancement on the original underwater image through an initial lightweight image enhancement model and output a predicted single-channel intensity image. The loss calculation module is used to calculate the total loss value combining the soft-activated corner loss and L1 loss based on the high-contrast label image and the predicted single-channel intensity image. The model optimization module is used to iteratively optimize the model parameters of the initial lightweight image enhancement model with the goal of minimizing the total loss value, until the iteration stopping condition is met, and to determine the target lightweight image enhancement model. The image enhancement module is used to enhance the received underwater image to be enhanced through the target lightweight image enhancement model, input the image into the visual SLAM system for tracking and mapping, and output the pose map result.
8. A computer device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the underwater visual SLAM method based on structure-first image enhancement as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the underwater visual SLAM method based on structure-first image enhancement as described in any one of claims 1-6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the underwater visual SLAM method based on structure-first image enhancement as described in any one of claims 1-6.