An under-ice UUV homing and recovery method based on light source detection and positioning

By improving the grayscale world algorithm and using a lightweight underwater light source detection network, combined with a multi-head self-attention mechanism, the problem of insufficient recognition accuracy and robustness of UUV optical vision-guided retrieval in extreme environments is solved, and efficient underwater ice-guided retrieval of UUVs is achieved.

CN118485909BActive Publication Date: 2026-06-02HARBIN ENG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN ENG UNIV
Filing Date
2024-05-09
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing UUV optical vision-guided recovery technologies have low recognition accuracy and robustness in extreme environments, especially in turbid water bodies where light source detection is ineffective, making it difficult to meet the needs of efficient UUV recovery.

Method used

An improved grayscale world algorithm is used for color compensation and restoration. Combined with a lightweight underwater small target light source detection network, the detection accuracy and robustness of the light source are improved through a multi-head self-attention mechanism and a funnel activation function. The three-dimensional coordinate calculation of the light source array is used to realize the guidance and recovery of UUV.

Benefits of technology

The system achieves highly reliable, robust, and successful under-ice guided recovery of UUVs in extreme environments, improving the accuracy and contrast of light source detection and ensuring that UUVs can accurately adjust their attitude and complete the recovery mission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485909B_ABST
    Figure CN118485909B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of UUV under-ice guidance and recovery, and particularly relates to a UUV under-ice guidance and recovery method based on light source detection and positioning. The present application collects images of a light source array by an under-ice UUV, adjusts the heading of the UUV and makes it vertically float upwards when all the light sources are continuously detected and the UUV is located at the array center position of the light sources, thereby realizing under-ice guidance and recovery. The present application designs a simple environment color restorer, adopts an improved gray world algorithm, compensates according to different attenuation coefficients of light with different frequencies under water, enhances the contrast of light sources and background, and avoids color distortion of underwater light source images. The present application designs a lightweight underwater small target light source detection network, and through improvements such as reducing convolution layers, adding an improved attention mechanism, and adopting a new activation function module, the detection performance of light source type targets is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of UUV under-ice guidance and recovery technology, specifically relating to a UUV under-ice guidance and recovery method based on light source detection and positioning. Background Technology

[0002] In recent years, with increasing attention to polar resources and the environment, and the growing demand for marine scientific research, the application of UUVs (Unmanned Aerial Vehicles) in polar exploration and research has become increasingly widespread. By providing safe and efficient data collection and detection methods without direct human intervention, UUVs play a vital role in these extreme environments. Guidance and recovery are key steps to ensure the safe operation and mission completion of UUVs. In the polar environment, factors such as sea ice, extremely low temperatures, and poor underwater visibility increase the risks of UUV operations. Therefore, effective guidance technology can help UUVs avoid ice floes, prevent collisions with obstacles, and ensure they travel accurately along a predetermined route.

[0003] Domestic and international scholars have conducted extensive research on UUV docking and recovery. Maire et al. developed a vision-based docking system using poles as docking targets. They used Haar rectangle features and rotation of integral images to detect docking poles. This vision system enables AUVs to autonomously dock from a range of up to 4 meters with relatively low visibility. However, their method is sensitive to water turbidity and has low accuracy for docking distances exceeding 4 meters. Chen et al. proposed underwater target detection using a monocular vision sensor. Global contrast analysis of various features identifies regions of interest (ROIs), which are then filtered through image segmentation. ROI detection is considered essential for removing background noise, significantly improving the accuracy of underwater target detection. Using the YOLO algorithm for ROI detection, AUV docking and recovery results are more accurate. Liu et al. proposed a convolutional neural network for detecting docking stations. They used a perspective n-point algorithm to estimate the AUV's pose relative to the docking station. Their neural network, inspired by the YOLO object detection network, predicts bounding boxes to locate the docking station. Domestic researchers, such as Anping et al., have used the YOLOv5 algorithm to detect and guide UUVs from blue and green light sources. The real-time detection of light meets engineering requirements, and the detection effect is over 90%. However, for turbid water bodies, when strong light is weakened into small targets, it is difficult to achieve good detection results, or even the light source cannot be detected. Therefore, simply using the YOLO algorithm cannot meet the UUV recovery tasks under different water conditions.

[0004] A comprehensive analysis of relevant literature indicates that optical vision-guided retrieval technology plays a crucial role in the precise close-range retrieval of UUVs. Existing docking systems suffer from low recognition accuracy and poor robustness in turbid water. Research on deep learning algorithms demonstrates that deep learning outperforms traditional algorithms in both detection accuracy and robustness. To address this, this invention preprocesses the dataset and utilizes deep learning algorithms for light source detection. Improvements are made to the light source detection network to enhance detection accuracy and model robustness. Furthermore, negative samples are incorporated to prevent the detection of false light. Summary of the Invention

[0005] The purpose of this invention is to provide a method for guiding and recovering UUVs under ice based on light source detection and positioning.

[0006] A method for guiding and recovering UUVs under ice based on light source detection and positioning includes the following steps:

[0007] Step 1: Drill holes in the ice layer, set up square supports around the edges of the holes, and place N light sources on the two longer, opposite sides of the square supports respectively.

[0008] Step 2: The UUV under the ice moves to the vicinity of the ice hole;

[0009] Step 3: The UUV acquires images of the light source array, performs color compensation and restoration on each frame of the acquired image to enhance the contrast between the light source and the background environment; a pre-trained underwater small target light source detection network is used to detect the image in real time. If no light source is detected, the UUV performs a small-range search. During the search, image acquisition, color compensation and restoration and detection are performed simultaneously until the light source is detected.

[0010] Step 4: If only one light source is detected, the UUV moves towards the center of the light source and returns to step 3;

[0011] If n light sources are detected, and 1 < n ≤ 2N-1, then calculate the distance between the centers of every two light sources, and move the UUV towards the midpoint between the centers of the two light sources with the longest distance, and return to step 3;

[0012] If all 2N light sources are detected, the UUV moves toward the center of the array of 2N light sources and proceeds to step 4.

[0013] Step 5: If the UUV continuously detects at least 30 frames of all 2N light sources and is located at the center of the array of 2N light sources, then adjust the bow to align the UUV's hull direction with the light source arrangement direction, and then the UUV will float vertically upwards to complete the ice-guided recovery; otherwise, return to step 3.

[0014] Furthermore, in step 3, the improved grayscale world algorithm is used to perform color compensation and restoration on each frame of the acquired image, specifically including the following steps:

[0015] Step 3.1: Calculate the average values ​​of the R, G, and B channels of the image.

[0016]

[0017]

[0018]

[0019] Where n and m are the width and height of pixels in the image, respectively; R ij G ij B ij These are the R, G, and B channel values ​​at the i-th row and j-th column of the pixel matrix;

[0020] Step 3.2: Take The maximum value is taken as a constant value K.

[0021] Step 3.3: Calculate the compensation ΔR, ΔG, and ΔB between each channel and the constant value K, and compensate for different wavelengths of light to obtain the new pixel value R'. ij G' ij B' ij ;

[0022]

[0023] R' ij =R ij +ΔR,G' ij =G ij +ΔG,B' ij =B ij +ΔB

[0024] Step 3.4: Obtain the image sample dataset from underwater observations of the water surface, and calculate the average values ​​R0, G0, and B0 of the three channels R, G, and B of the images respectively. Also, calculate the pixel value R'. ij G' ij B' ij Make fine adjustments;

[0025] δ1=R0-B0, δ2=G0-B0

[0026] R” ij =R' ij +δ1, G” ij =G' ij +δ2

[0027] Step 3.5: Adjust the pixel range to between [0, 255] to obtain the new pixel array {R” ij ,G” ij ,B” ij That is, the image restored by color compensation using the improved grayscale world algorithm.

[0028] Furthermore, the method for pre-training the underwater small target light source detection network in step 3 is specifically as follows:

[0029] For the input three-channel image, firstly, an image t0 of size 640×640×3 is reconstructed as input. After passing through two layers of CBF modules with a stride of 2 and a kernel size of 3×3, the size becomes 160×160. Then, it is input into the C2f module to obtain the output feature map t1 of the first stage. The second stage includes one layer of CBF module with a stride of 2 and a kernel size of 3×3 and two layers of C2f modules to obtain a feature map t2 of size 80×80. The third stage has the same number of modules as the second stage to obtain a feature map t3 of size 40×40. In the final stage, after passing through a CBF module with a stride of 2 and a kernel size of 3×3 and one layer of C2f module, a feature map t4 of size 20×20 is obtained. Then, it is input into the SPPF module and the MHSA module, and the output feature map size remains unchanged.

[0030] The obtained feature maps of different sizes are fused using a combination of three upsampling layers, six C2f modules, and three CBF modules, arranged according to the structure diagram, to obtain feature maps t5, t6, and t7. t7 is used as the first detector head to predict the results. After passing through the CBF module, t7 is concat-fused with t6, then passed through the C2f module as the second detector head, where it is extracted using the CBF module, concat-fused with t5, and then passed through the C2f module again as the third detector head. Finally, CBF is used for feature extraction, and the extracted features are concat-fused with t4, then passed through the C2f module again as the fourth detector head.

[0031] Furthermore, the MHSA module employs a multi-head self-attention mechanism, multiplying the input vector X by h sets of coefficients respectively. Get h group query Q i Key K i Sum V i ;in, This is the parameter matrix that needs to be trained; for each set of queries Q i Key K i Sum V i Q is calculated using the dot product method. i With K i Correlation between vectors Similarity(Q) i ,K iThe similarity between the query and the key is obtained, then divided by the square root of the dimension, and normalized using softmax to obtain a new similarity matrix. Finally, the similarity matrix is ​​compared with the value V. i Multiply, then sum by weights, to obtain a new vector Z. i Multi-head self-attention mechanisms will affect these Z... i The convergence and linear projection transformations are performed to obtain the final output vector Z.

[0032] The beneficial effects of this invention are as follows:

[0033] This invention designs a simple environmental color restorer, employing an improved grayscale world algorithm. It compensates for the different attenuation coefficients of light of different frequencies underwater, enhancing the contrast between the light source and the background and avoiding color distortion in underwater light source images. This invention also designs a lightweight underwater small target light source detection network. Through improvements such as reducing convolutional layers, adding an improved attention mechanism, and using a new activation function module, it significantly improves the detection performance for light source-type targets. This invention calculates the center coordinates and orientation angle of the light source array, and deduces the three-dimensional coordinates of the light source array based on the camera calibration model. The UUV controls its motion state according to the position and attitude information of the light source array, guiding the movement to the center of the light source array, adjusting the UUV's bow to match the orientation angle of the light source array, surfacing, and completing the guided recovery task. This invention enables UUVs to achieve highly reliable, robust, and successful underwater guided recovery in polar or cold-climate ice environments. Attached Figure Description

[0034] Figure 1 This is a diagram showing the arrangement of a four-source array.

[0035] Figure 2 This is a diagram showing the arrangement of a six-source array.

[0036] Figure 3 This is a structural diagram of a UUV.

[0037] Figure 4 This is a schematic diagram of UUV recycling.

[0038] Figure 5 This is the schematic diagram of the MHSA module.

[0039] Figure 6 Network structure diagram for small target light source detection

[0040] Figure 7 This is a flowchart of a UUV under-ice guidance and recovery method based on light source detection and positioning. Detailed Implementation

[0041] The present invention will now be further described with reference to the accompanying drawings.

[0042] This invention relates to a UUV ice-guided recovery method based on light source detection and positioning. It involves the UUV accurately locating to the center of a light source array under ice and adjusting its heading correctly. Specifically, it relates to the preprocessing and detection of data by the optical unit, including a simple environmental color restorer to restore underwater images, and then using an underwater light source detection network to detect the light source array in the restored image. Pool and lake trials have demonstrated that this design can achieve real-time, high-precision light source array detection and positioning, and has strong robustness.

[0043] A method for guiding and recovering UUVs under ice based on light source detection and positioning includes the following steps:

[0044] Step 1: Drill holes in the ice layer, set up square supports around the edges of the holes, and set up N light sources on the two longer opposite sides of the square supports. The dimensions of the ice holes and square supports should be compatible with the UUV, and the length of the longer side of the square supports should be greater than the length of the UUV.

[0045] Step 2: The UUV under the ice moves to the vicinity of the ice hole;

[0046] Step 3: The UUV acquires images of the light source array, performs color compensation and restoration on each frame of the acquired image to enhance the contrast between the light source and the background environment; a pre-trained underwater small target light source detection network is used to detect the image in real time. If no light source is detected, the UUV performs a small-range search. During the search, image acquisition, color compensation and restoration and detection are performed simultaneously until the light source is detected.

[0047] Step 4: If only one light source is detected, the UUV moves towards the center of the light source and returns to step 3;

[0048] If n light sources are detected, and 1 < n ≤ 2N-1, then calculate the distance between the centers of every two light sources, and move the UUV towards the midpoint between the centers of the two light sources with the longest distance, and return to step 3;

[0049] If all 2N light sources are detected, the UUV moves toward the center of the array of 2N light sources and proceeds to step 4.

[0050] Step 5: If the UUV continuously detects at least 30 frames of all 2N light sources and is located at the center of the array of 2N light sources, then adjust the bow to align the UUV's hull direction with the light source arrangement direction, and then the UUV will float vertically upwards to complete the ice-guided recovery; otherwise, return to step 3.

[0051] Example 1:

[0052] like Figure 1As shown, a four-light source array is used. Reference numeral 1 indicates the light source, reference numeral 2 is the long side support, reference numeral 3 is the short side support, the long side support 2 and the short side support 3 are designed in a certain proportion, and reference numeral 5 indicates the distance between the two light sources on the long side.

[0053] Using a four-light source array, when the UUV detects one light source, it moves towards the center of the light source. At this time, the range of the light array in the field of view increases, and more light sources can be captured. When two light sources are detected, the UUV moves towards the center of the line connecting the light sources. When three light sources are detected, it moves towards the midpoint of the hypotenuse. As the UUV moves towards the center of the light source array, the probability of capturing the complete light source increases until the complete light source array is captured and it moves directly below the center of the array. At this time, the UUV's heading is adjusted with the short side direction as the positive direction, and finally it floats up to achieve UUV recovery.

[0054] Example 2

[0055] like Figure 2 As shown, a six-light source array is used. Reference numeral 1 indicates the light source, reference numeral 2 is the long side support, reference numeral 3 is the short side support, the long side support 2 and the short side support 3 are designed in a certain proportion, and reference numeral 4 indicates the distance between two light sources on the long side.

[0056] When using a six-light source array, the distance between the lights on the longer side is reduced, increasing the probability of light source recognition and avoiding the phenomenon of capturing or failing to recognize lights, thus ensuring the smooth progress of the experiment. Similarly, if the UUV detects n light sources, it moves towards the center of the array of these n light sources. When five light sources are detected, the distance between every two light sources is calculated, and the UUV moves towards the center of the longest side until a complete array of six lights is detected. The UUV's heading is then adjusted based on the longest side to achieve ascent and recovery.

[0057] Example 3

[0058] like Figure 3 and Figure 4 The diagram shows the structure of a UUV and a schematic of its recovery. Reference numeral 6 is the upward-facing camera, used to capture the real-time light source array. Reference numeral 7 is the connecting cable between the camera and the main control box. Reference numeral 8 is the main control box. Reference numeral 9 is the front rudder. Reference numeral 10 is the forward thruster. Reference numeral 11 is the rear rudder. Reference numeral 12 is the rear thruster. Reference numeral 13 is the UUV. Reference numeral 14 is the UUV's trajectory. Reference numeral 15 is the field of view of the upward-facing camera. Reference numeral 16 is the final attitude of the UUV. Reference numeral 17 is an ice hole. Reference numeral 18 is an ice layer.

[0059] UUVs are primarily guided for close-range, precise retrieval under ice using optical vision methods. To meet real-time requirements in engineering, the optical image processing unit performs end-to-end image processing. An optimal weight model is trained using a pre-collected dataset of light source arrays. Based on this model, the collected data is detected in real time. To improve accuracy, the detection process is divided into preprocessing and detection, with the detection time being in the millisecond range.

[0060] like Figure 7 As shown, a method for guiding and recovering UUVs under ice based on light source detection and positioning includes the following steps:

[0061] The first step is for the UUV to move to the vicinity of the light source array, automatically turn on the optical processing unit, acquire images of the light source array in real time, and perform the second step of processing.

[0062] The second step is to process each frame of the acquired image, preprocess it using a simple ambient color restorer, restore the color of the data, and enhance the contrast between the light source and the background light. After processing, proceed to the third step.

[0063] The third step is to use the trained underwater small target light source detection network to detect the number of arrays in the image and determine whether a light source has been detected. If it is detected, proceed to the fourth step; otherwise, proceed to the fifth step.

[0064] The fourth step is to calculate the center pixel coordinates and long side direction angle of the light source array, deduce the three-dimensional coordinates of the light source based on the camera calibration model, and transmit the calculated pose information to the UUV to achieve positioning. The UUV moves towards the center of the light array and proceeds to the sixth step.

[0065] The fifth step is to perform a small-scale search on the UUV, with the movement trajectory being rectangular or circular. During the search, the second and third steps are performed simultaneously until the number of light sources detected is greater than or equal to 1, at which point the fourth step is performed.

[0066] Step 6: Determine if the number of frames with 6 detected light sources is greater than or equal to 30. If so, adjust the UUV heading to float upwards; otherwise, return to step 2.

[0067] Step 7: The UUV reaches the designated location and orientation and floats vertically upwards, completing the UUV guidance and recovery mission.

[0068] This invention provides a simple environmental color restorer that compensates for the different attenuation coefficients of light of different frequencies underwater. Unlike traditional grayscale algorithms that require rich image colors, this method is not only applicable to images with rich colors, but can also effectively restore colors in images with relatively simple colors, avoiding distortion.

[0069] When sunlight or artificial light enters underwater, it is absorbed and scattered by the water, resulting in degraded image quality and phenomena such as low contrast, blurriness, and fogging. To address the distortion caused by light absorption by water, compensation can be made based on the different attenuation coefficients of light of different frequencies underwater. Based on the grayscale world hypothesis, this invention first takes the maximum mean value of the BGR channel. As a constant, the gain of the original algorithm is improved by using the difference between the mean of the other two channels and the maximum mean as a compensation value to obtain a new BGR image. Finally, the overall average of a large number of water images is used. Fine-tuning the compensated image yields a near-realistic underwater image.

[0070] Implementation steps of the improved grayscale world algorithm:

[0071] a. Calculate the average values ​​of the R, G, and B channels of the image.

[0072]

[0073] In the formula, n and m are the width and height of the image pixels, respectively, and R ij G ij B ij These are the R, G, and B channel values ​​for the pixel matrix at row i and column j.

[0074] b. Take the maximum value of the average of the three channels as the constant value K;

[0075]

[0076] c. Calculate the compensation ΔR, ΔG, and ΔB between each channel and the K value.

[0077]

[0078] A new pixel value R' is obtained by compensating for light of different wavelengths. ij G' ij B' ij

[0079] R' ij =R ij +ΔR,G' ij =G ij +ΔG,B' ij =B ij +ΔB

[0080] d. Calculate the average values ​​of the three channels of a large number of waterborne images, and calculate the differences δ1 and δ2 between channels R and B, and G and B.

[0081] δ1=R0-B0, δ2=G0-B0

[0082] Fine-tune the compensated pixels:

[0083] R” ij =R' ij +δ1, G” ij =G' ij +δ2

[0084] Right now

[0085] R” ij =R ij +ΔR+δ1,G” ij =G ij +ΔG+δ2,B” ij =B ij +ΔB

[0086] e. Adjust the pixel range to [0, 255] to obtain the new pixel array {R” ij ,G” ij ,B” ij This refers to the image after grayscale processing.

[0087] Because underwater images are distorted and more damaged than images captured in air, they can negatively impact detection. Furthermore, to meet the real-time requirements of UUV retrieval in engineering applications, this invention improves YOLOv8 by designing a lightweight model for LED light source detection. This includes adding a global multi-head self-attention mechanism (MHSA) to the backbone network, which simultaneously considers the relationships between different locations, increasing the model's focus on the light source. It also employs a funnel activation function (FReLU) and adds negligible spatial conditional overhead to extend ReLU and PReLU to 2D activation, improving the robustness of light recognition.

[0088] For the arrangement of the light source array, a rectangular support frame with a length of 3.5m and a width of 2m is used. The number of LED light sources can be arranged with 4 or 6 LED lights, depending on the size of the UUV and economic requirements. The constraint of 4 lights is relatively simple, and communication and positioning only require five cases from 0 to 4. Using a 6-LED light array, the distance between the two lights on the longer side is shortened, which can reduce the probability of the light array not being detected and allow for more accurate adjustment of the UUV's heading.

[0089] The optical image processing unit processes and detects the acquired light array data, including image preprocessing and recognition / detection. First, color compensation is performed on each frame of the acquired light array data to enhance the contrast between the light source and the surrounding background. Then, a pre-trained model is used to detect the light sources in real time, outputting information such as the number of detected light sources, their center coordinates, and orientation angles. The training model uses a modified YOLOv8 network for small target light source detection. Because light attenuates significantly underwater, originally bright LED lights become weak targets after absorption and scattering by the water. Therefore, the model needs improvement to meet engineering requirements.

[0090] UUV positioning communication includes calculating the relative coordinates between the light source and the UUV, determining the direction angle, and sending commands such as whether to float vertically upwards. The communication protocol uses UDP, and the communication content includes a data header, a counter, the horizontal and vertical coordinates of the center of the light array, the direction angle of the long side of the light array, and the number of lights. The data is in integer or floating-point form and stored in a low-order bit-first manner.

[0091] Implementation steps of a lightweight underwater small target light source detection network:

[0092] The lightweight underwater small target light source detection network based on YOLOv8 mainly consists of three parts: the backbone network, the neck, and the head. For example... Figure 6 The diagram shown is a structural diagram of the lightweight underwater small target light source detection network based on YOLOv8 in this invention.

[0093] For the input three-channel image, an image t0 of size 640×640×3 is first reconstructed as input. After passing through two CBF modules with a stride of 2 and a kernel size of 3×3, the image size is 160×160. It is then input into a C2f module to obtain the first stage output feature map t1. The second stage includes one CBF module with a stride of 2 and a kernel size of 3×3 and two C2f modules to obtain a feature map t2 of size 80×80. The third stage has the same number of modules as the second stage to obtain a feature map t3 of size 40×40. The final stage passes through a CBF module with a stride of 2 and a kernel size of 3×3 and one C2f module to obtain a feature map t4 of size 20×20. It is then input into an SPPF module and an MHSA module, and the output feature map size remains unchanged.

[0094] The Neck section fuses feature maps of different sizes using three upsampling layers, six C2f modules, three CBF modules, and six Concat fusion modules, combined according to the structure diagram to obtain feature maps t5, t6, and t7. t7 is used as detector head 1 to predict the results. After passing through the CBF module, t7 is concatenated with t6, then passed through the C2f module as detector head 2. CBF is then used to extract features from t7, which is then concatenated with t5 and passed through C2f again to become detector head 3. Finally, CBF is used for feature extraction, and the extracted features are fused with t4, then passed through the C2f module to become detector head 4.

[0095] like Figure 5 The diagram shows the principle of the MHSA module. The multi-head self-attention mechanism can learn and combine different behaviors to capture dependencies of varying ranges within a sequence. It uses multiple sets of queries, keys, and values, combining them to improve the filtering of important internal information and eliminate unimportant information. Compared to traditional self-attention mechanisms, multi-head self-attention avoids excessive focus on relationships that are important to itself, thereby improving the capture of effective information.

[0096] First, for the input vector X, multiply it by h sets of coefficients. Get h group query Q i Key K i Sum V i ,in This is the parameter matrix that needs to be trained. For each set of queries Q... i Key K i Sum V i Q is calculated using the dot product method. i With K i Correlation between vectors Similarity(Q) i ,K i The similarity between the query and the key is obtained, then divided by the square root of the dimension, and normalized using softmax to obtain a new similarity matrix. Finally, the similarity matrix is ​​compared with the value V. i Multiply, then sum by weights, to obtain a new vector Z. i Multi-head self-attention mechanism will lead these Z i The convergence and linear projection transformations are performed to obtain the final output vector Z.

[0097] Calculation of light source array coordinates:

[0098] The three-dimensional coordinates of the light source array are calculated based on the camera imaging model. The coordinate system transformation in the pinhole camera's imaging model includes rigid body transformation and projection transformation. The pixel coordinates are (u, v). Considering the camera's radial and tangential deformation, the calculation formula is as follows:

[0099]

[0100] In the formula, X and Y are the horizontal and vertical coordinates of the world coordinate system, respectively, and Z is the vertical coordinate of the world coordinate system. c It is the value corresponding to the Z-axis in the world coordinate system, i.e., depth, and H is the homography matrix:

[0101]

[0102] r1, r2, and t represent camera extrinsic parameters, f x f y γ, u0, and v0 are camera intrinsic parameters, which can be obtained using Zhang's calibration method.

[0103] The above formula can be used to calculate the three-dimensional coordinates of the light source at different depths. For the relative distance and orientation between the light source and the UUV, the model can be simplified to a two-dimensional coordinate system for calculation, and the same Z value can be used for planar calculation.

[0104] This invention employs a color transformer for simple environments to effectively recover underwater images, enhance the contrast between the light source and the environmental background, and improve model training performance. It utilizes a small-target underwater light source detection network, increasing the global receptive field of view through the MHSA module and filtering out unimportant information. Furthermore, it extends ReLU to a visual parameter activation function with pixel-level modeling capabilities using FReLU, extracting the object's fine spatial layout and improving the model's robustness in detection. Finally, this invention uses a camera calibration model to calculate the three-dimensional coordinates of the light source, deducing the relative pose between the UUV and the camera. This simplifies the complex three-dimensional motion of the UUV to a two-dimensional plane, facilitating guidance and positioning and ensuring the smooth conduct of UUV guidance and recovery experiments.

[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for guiding and recovering UUVs under ice based on light source detection and positioning, characterized in that, Includes the following steps: Step 1: Drill holes in the ice layer, set up square supports around the edges of the holes, and place [something] on the two longer, opposite sides of the square supports. One light source; Step 2: The UUV under the ice moves to the vicinity of the ice hole; Step 3: The UUV acquires images of the light source array, performs color compensation and restoration on each frame of the acquired image to enhance the contrast between the light source and the background environment; a pre-trained underwater small target light source detection network is used to detect the image in real time. If no light source is detected, the UUV performs a small-range search. During the search, image acquisition, color compensation and restoration and detection are performed simultaneously until the light source is detected. The pre-trained underwater small target light source detection network first reconstructs a 640×640×3 image t0 as input to the input three-channel image. After passing through two CBF modules with a stride of 2 and a kernel size of 3×3, the image size becomes 160×160. Then, it is input into a C2f module to obtain the first stage output feature map t1. The second stage includes one CBF module with a stride of 2 and a kernel size of 3×3 and two C2f modules to obtain a feature map t2 with a size of 80×80. The third stage has the same number of modules as the second stage to obtain a feature map t3 with a size of 40×40. In the final stage, after passing through a CBF module with a stride of 2 and a kernel size of 3×3 and one C2f module, a feature map t4 with a size of 20×20 is obtained. This feature map t4 is then input into an SPPF module and an MHSA module, and the output feature map size remains unchanged. The obtained feature maps of different sizes are fused using a combination of three upsampling layers, six C2f modules, and three CBF modules, arranged according to the structure diagram, to obtain feature maps t5, t6, and t7. t7 is used as the first detection head to predict the results. After passing through the CBF module, t7 is concat-fused with t6, then passed through the C2f module as the second detection head, where it is extracted again by the CBF module, concat-fused with t5, and then passed through the C2f module as the third detection head. Finally, CBF is used for feature extraction, and the extracted features are concat-fused with t4, then passed through the C2f module as the fourth detection head. The MHSA module employs a multi-head self-attention mechanism for the input vector. Multiply by respectively Group coefficients , ,get Group query ,key Sum ;in, It is the parameter matrix that needs to be trained; for each set of queries ,key Sum Calculated using dot product method and Correlation between vectors The similarity between the query and the key is obtained, then divided by the square root of the dimension, and normalized using softmax to obtain a new similarity matrix. Finally, the similarity matrix is ​​compared with the values... Multiply, sum by weight, and obtain a new vector. Multi-head self-attention mechanisms will... Perform convergence and linear projection transformations to obtain the final output vector. ; Step 4: If only one light source is detected, the UUV moves towards the center of the light source and returns to step 3; If detected One light source, and Then calculate the distance between every two light source centers, and move the UUV towards the midpoint between the two light source centers with the longest distance, then return to step 3; If all are detected One light source, then UUV towards Move the center position of the array of light sources and proceed to step 4; Step 5: If all UUVs are detected continuously The number of frames for each light source is no less than 30, and UUVs are located in... If the center position of the light source array is determined, the bow direction is adjusted so that the UUV's hull direction is aligned with the light source arrangement direction. Then, the UUV rises vertically to complete the ice-guided recovery. Otherwise, return to step 3.

2. The UUV under-ice guidance and recovery method based on light source detection and positioning according to claim 1, characterized in that: Step 3 uses an improved grayscale world algorithm to perform color compensation and restoration on each frame of the acquired image, specifically including the following steps: Step 3.1: Calculate the average values ​​of the R, G, and B channels of the image. ; in, , These are the width and height of the pixels in the image, respectively; , , For the pixel matrix OK The R, G, and B channel values ​​for the column position; Step 3.2: Take The maximum value is taken as a constant value , ; Step 3.3: Calculate the constant value for each channel. Compensation between , , New pixel values ​​are obtained by compensating for different wavelengths of light. , , ; , , , , Step 3.4: Obtain the image sample dataset from underwater observations of the water surface, and calculate the average values ​​of the R, G, and B channels of the images respectively. , , For pixel values , , Make fine adjustments; , , Step 3.5: Adjust the pixel range to [0, 255] to obtain the new pixel array. This refers to the image restored after color compensation using an improved grayscale world algorithm.