Underwater polarized light navigation method and device for removing occlusion based on improved Segment Anything image segmentation algorithm
By improving the Segment Anything image segmentation algorithm and the solar vector polarization light heading measurement method, the navigation accuracy problem caused by occlusion in underwater polarization light navigation is solved, generating an unobstructed polarization distribution map, which improves navigation accuracy and robustness.
Patent Information
- Application Number
- CN202511547685.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-02-10
AI Technical Summary
In underwater polarized light navigation, occlusion caused by the environment distorts the polarization image, affecting navigation accuracy. Existing image segmentation techniques cannot effectively handle occlusion and noise, resulting in insufficient accuracy and reliability of polarization information extraction.
An improved Segment Anything image segmentation algorithm is adopted, which generates multiple candidate masks through an image encoder, a cue encoder, and a mask decoder. Combined with the polarization light heading calculation method, an unobstructed sky light polarization distribution map is generated, the solar azimuth angle and heading angle are calculated, and the results are verified by a solar vector polarization light heading measurement algorithm.
In complex scenarios such as building obstruction, it improves the navigation accuracy of underwater vehicles, reduces navigation errors caused by obstruction and noise, and achieves high-precision heading calculation.
Smart Images

Figure CN121498685A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underwater navigation technology, specifically to an underwater polarized light navigation method and apparatus based on an improved Segment Anything image segmentation algorithm for de-occlusion. Background Technology
[0002] Underwater polarized light sources, through the refraction of skylight, exhibit a distribution pattern similar to that of the atmosphere, making stable extraction of navigation information feasible. However, during underwater navigation, dynamic refraction on the water surface and obstruction by obstacles distort the polarization image, affecting the calculation of polarization information. Due to its advantages such as the absence of cumulative errors, biomimetic polarized light navigation technology has become a current research hotspot. However, certain problems still exist for underwater polarized light navigation.
[0003] (1) In the research on underwater polarized light navigation, the current research has evolved from the feasibility analysis of polarized light navigation in underwater to the research and testing of the practical application of polarized light underwater navigation. However, there are still some problems with adaptability to complex underwater environments that need to be solved.
[0004] (2) When a polarization sensor is working, its own noise, as well as noise and interference from the outside, will affect the measurement of polarized light and polarization angle. The structure of the underwater polarization camera itself and suspended particles in the water will scatter light, causing the light that originally traveled in a straight line to change direction. This will reduce the effective information of the polarization image detected by the polarization camera.
[0005] (3) In complex underwater scenarios, the underwater environment is obstructed by buildings and trees, and the environmental image quality is affected by various noise sources and waves. Effective methods are needed to process the acquired underwater polarization images to effectively remove noise, enhance the interference removal capability, and thus restore the polarization information damaged by underwater conditions. The goal of the entire research process is to enhance the robustness of the underwater polarization visual navigation system and ensure that it can achieve high-precision navigation in different underwater environments.
[0006] In summary, traditional image segmentation techniques have significant limitations when handling new scenes. On the one hand, the model must readjust its training parameters for each new task, consuming substantial computational resources; on the other hand, its recognition capabilities are strictly confined by a pre-defined classification system, making it unable to handle target objects outside the category list. Polarized images are acquired with a large field of view, but the occlusion effects of the surrounding environment still exist during underwater navigation. Extracting orientation information directly from unprocessed polarization distribution maps makes it difficult to guarantee accuracy and reliability. Summary of the Invention
[0007] To overcome the problem of interference in the extraction of orientation information from polarization distribution maps under occlusion conditions in existing technologies, this invention proposes an underwater polarization navigation method and device based on an improved Segment Anything image segmentation algorithm for de-occlusion. This invention achieves the above-mentioned technical problem through the following technical solution: Solution 1: This invention proposes an underwater polarized light navigation method for removing occlusions based on an improved Segment Anything image segmentation algorithm. The method includes the following steps: Step 1: The Segment Anything model includes three modules: an image encoder, a cue encoder, and a mask decoder. The mask decoder generates multiple candidate masks in parallel. Each mask is accompanied by two key scores: the IoU score measures the degree of overlap between the predicted region and the ideal segmentation, and the stability score evaluates the mask's sensitivity to input perturbations. Step 2: Based on the multiple candidate masks generated in Step 1, the generated masks are extracted and binarized according to the method of polarization light heading calculation to generate a sky light polarization distribution map without obstruction. Step 3: Based on the unobstructed sky polarization distribution map generated in Step 2, calculate the solar azimuth and heading angle of the sky under the navigation system, and calculate the root mean square error and maximum error to verify the polarization heading measurement algorithm of the solar vector.
[0008] Furthermore, a preferred embodiment is provided, wherein the image encoder described in step 1 is used to convert the input image into a high-resolution image for efficient processing; The prompt encoder is used to uniformly map the diverse prompts of the target point input by the user to a semantic space aligned with the image features; The mask decoder is used to dynamically integrate image features and prompt information using a Transformer structure.
[0009] Furthermore, a preferred embodiment is provided in which the improved Segment Anything image segmentation algorithm only needs to mark one target point, that is, process the imported batch of images and extract the corresponding mask through triple iteration.
[0010] Furthermore, a preferred embodiment is provided, wherein the method for calculating the solar azimuth angle and heading angle of the sky under the navigation system in step 3 is as follows: The solar azimuth is extracted using the E-vector direction feature, the slope k of the solar meridian in the carrier coordinate system is obtained, and the solar azimuth angle is calculated. , ; For pixels in pixel coordinate system The method for calculating its polarization angle is as follows:
[0011] By constructing a solar space vector using astronomical parameters, the solar azimuth is first calculated in the geographic coordinate system. Then, the solar hour angle t and declination are calculated based on the observation time and geographical location. solar altitude angle The calculation,
[0012] The method for calculating the solar azimuth angle in a geographic coordinate system is as follows:
[0013] Convert the reference direction of the polarization angle to the local solar meridian direction, that is, .
[0014] Furthermore, a preferred embodiment is provided, in which step 3 further includes a transformation from the geographic coordinate system to the carrier coordinate system, i.e., a transformation from the n-system to the b-system. The solar vector is represented in the n-system as follows: , The conversion formula from the n-series to the b-series is: ,in, Let be a rotation matrix. .
[0015] Option 2: An underwater polarized light navigation device based on an improved Segment Anything image segmentation algorithm for occlusion removal, the device comprising: The input module for the Segment Anything model includes three modules: an image encoder, a cue encoder, and a mask decoder. The mask decoder generates multiple candidate masks in parallel, and each mask is accompanied by two key scores: an IoU score that measures the degree of overlap between the predicted region and the ideal segmentation, and a stability score that evaluates the mask's sensitivity to input perturbations. The unobstructed sky polarization distribution map generation module is used to extract and binarize the generated masks based on the multiple candidate masks generated by the preprocessing module according to the polarization light heading calculation method, and generate an unobstructed sky polarization distribution map. The navigation module is used to calculate the solar azimuth and heading angle of the sky under the navigation system based on the unobstructed sky polarization distribution map generated by the unobstructed sky polarization distribution map generation module, and to calculate the root mean square error and the maximum error, thereby verifying the polarization heading measurement algorithm of the solar vector.
[0016] Option 3: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in Option 1.
[0017] Option 4: A computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the method described in Option 1.
[0018] The advantages of this invention are: This invention proposes an underwater polarized light navigation method and device based on an improved Segment Anything image segmentation algorithm for more accurate heading information calculation, aiming to enable polarized light navigation for underwater vehicles in complex scenarios such as those obstructed by buildings. The method is compared with several common segmentation methods. The error in calculating the heading angle using the solar azimuth angle in the navigation system was calculated, verifying the feasibility of the solar vector-based polarized light heading measurement algorithm. Furthermore, the method removes occlusions from the image, generating an unobstructed sky polarization distribution map, thereby reducing navigation errors caused by obstructions from surrounding landscapes and water surface obstacles.
[0019] This invention is also applicable to applications such as polarization heading calculation in different scenarios. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the iterative threshold method described in Implementation Method 1.
[0021] Figure 2 This is a schematic diagram of the SAM structure described in Implementation Method 1.
[0022] Figure 3 This is a structural diagram of the membrane decoder described in Embodiment 1.
[0023] Figure 4 This is a schematic diagram of the improved SAM algorithm described in Implementation Method 1.
[0024] Figure 5 This is a flowchart of the solar vector polarization light heading measurement described in Implementation Method 1.
[0025] Figure 6 This is a schematic diagram of the threshold segmentation result described in Implementation Method 1.
[0026] Figure 7 This is a schematic diagram of the K-means clustering segmentation results described in Implementation Method 1.
[0027] Figure 8 This is a schematic diagram of the improved SAM-based segmentation structure described in Implementation Method 1.
[0028] Figure 9 This is a schematic diagram of the AOP solution results described in Implementation Method 1.
[0029] Figure 10 This is a schematic diagram of the sky dynamic orientation solution result described in Implementation Method 1.
[0030] Figure 11 This is a schematic diagram of the dynamic orientation error in the sky as described in Implementation Method 1.
[0031] Figure 12 This is a schematic diagram of the attitude measurement system described in Embodiment 1.
[0032] Figure 13 This is a schematic diagram of the actual polarization image acquired according to Implementation Method 1.
[0033] Figure 14 This is a schematic diagram of the wave interference removal results in Experiment 1.
[0034] Figure 15 This is a schematic diagram of the underwater heading angle calculation results after wave interference removal in Experiment 1.
[0035] Figure 16 This is a schematic diagram of the wave interference removal results in Experiment 2.
[0036] Figure 17 This is a schematic diagram of the underwater heading angle calculation results after wave interference removal in Experiment 2.
[0037] Figure 18 This is a schematic diagram of the wave interference removal results for Experiment 3.
[0038] Figure 19 This is a schematic diagram of the underwater heading angle calculation results after wave interference removal in Experiment 3.
[0039] Figure 20 This is a schematic diagram of the wave interference removal results for Experiment 4.
[0040] Figure 21 This is a schematic diagram of the underwater heading angle calculation results after wave interference removal in Experiment 4.
[0041] Figure 22 This is a schematic diagram of the wave interference removal results for Experiment 5.
[0042] Figure 23 This is a schematic diagram of the underwater heading angle calculation results after wave interference removal in Experiment 5.
[0043] Figure 24 This is a schematic diagram of the static orientation calculation error for each experiment wave.
[0044] Figure 25 The image shows the results of the threshold segmentation algorithm.
[0045] Figure 26 This is a schematic diagram of the clustering and segmentation results.
[0046] Figure 27 A schematic diagram of the improved SAM segmentation results.
[0047] Figure 28 This is a flowchart illustrating the actual processing steps of the implementation method. Figure 29 This is a flowchart of the actual processing of step two in implementation method one.
[0048] Figure 30 This is a flowchart of the actual processing of step three in implementation method one.
[0049] Figure 31 This is a flowchart of the actual processing of step four in implementation method one.
[0050] Figure 32 This is a schematic diagram of the dynamic orientation solution results in Implementation Method 1. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0052] Implementation Method 1, see Figures 1 to 32 This embodiment describes an underwater polarized light navigation method and apparatus based on an improved Segment Anything image segmentation algorithm for occlusion removal. The method specifically includes: Image segmentation is a fundamental task in computer vision. Its core objective is to divide an image into several regions with specific semantics or homogeneity, ensuring that pixels within each region are consistent in certain attributes. Essentially, image segmentation divides an image into multiple sub-regions or objects by analyzing the similarities and differences between pixels. These sub-regions can be continuous (e.g., object boundaries) or discrete (e.g., different semantic categories), and the segmentation results are typically represented by masks or contours.
[0053] (1) Thresholding Thresholding segmentation is a classic segmentation method based on pixel grayscale values. It divides an image into different regions by setting one or more threshold values. Its core idea is to distinguish the target from the background using differences in pixel grayscale distribution. Thresholding segmentation divides the pixels of an image into several classes by selecting one or more grayscale thresholds T. The binarization segmentation formula is as follows:
[0054] in, For the input image, To output a binary image.
[0055] The core idea of thresholding is to compare the grayscale values or colors of image pixels with a preset threshold to divide the image into different regions (such as foreground and background). Classification methods include global thresholding, Otsu's algorithm, and adaptive thresholding.
[0056] Global thresholding segmentation applies a single threshold to the entire image. It is suitable for scenes with uniform lighting and clear contrast between the target and background. The threshold can be manually set based on experience or histograms, or an iterative thresholding method can be used. The specific process is as follows... Figure 1 As shown.
[0057] The core of the Otsu's algorithm is to separate the foreground from the background by maximizing the inter-class variance. The specific steps are as follows: (1) Statistical gray distribution: Generate a histogram to reflect the pixel proportion of each gray level.
[0058] (2) Segmentation and probability calculation: For each candidate threshold T, the pixels are divided into foreground and background pixels. and background Calculate the probability weights for the two classes. and .
[0059] (3) Between-class variance assessment: Calculate the between-class variance based on the probabilities and means of the two classes. The larger the variance, the more significant the segmentation.
[0060] (4) Determining the optimal threshold: Traverse all Select to make The largest threshold is used as the dividing point.
[0061] The principle of adaptive thresholding segmentation is to dynamically adjust the threshold based on the characteristics of local regions to solve the problem of uneven illumination. A common method is to divide the image into blocks, with the threshold calculated for each block individually. A typical algorithm is the `adaptiveThreshold` function in OpenCV, which supports mean or Gaussian weighted methods.
[0062] Thresholding segmentation has the advantages of being computationally simple and fast, making it suitable for real-time processing, and it is particularly effective for high-contrast images such as black and white documents. Its disadvantages include dependence on grayscale distribution, inability to handle textures or complex backgrounds, and sensitivity to noise, requiring preprocessing such as filtering.
[0063] (2) Clustering-Based Segmentation The core idea of clustering segmentation is to treat pixels as points in a high-dimensional feature space and group them using a clustering algorithm, with each cluster corresponding to a segmentation region. Commonly used methods include K-means clustering and Mean-Shift clustering. K-means is one of the most classic clustering algorithms, belonging to unsupervised learning methods, and is widely used in image segmentation, data classification, pattern recognition, and other fields. Its core idea is to divide the data into K clusters through iterative optimization, ensuring high similarity among data within the same cluster and significant differences between data in different clusters. The following provides a comprehensive analysis of K-means clustering from the aspects of principle, steps, optimization, code implementation, and application scenarios.
[0064] The K-means clustering process consists of two main steps: Assignment and Update. The detailed steps are as follows: (1) Select K value: Set the number of clusters.
[0065] (2) Initialize cluster centers: Randomly select data points as initial cluster centers (centroids).
[0066] (3) Assignment Step: For each point in the dataset, assign it to the cluster corresponding to the nearest cluster center. The "distance" here is usually Euclidean distance.
[0067] (4) Update Step: Based on the current cluster assignment, recalculate the center of each cluster, that is, calculate the mean of all points in the cluster as the new cluster center.
[0068] (5) Repeat the assignment and update steps until the cluster center no longer changes (convergence) or the specified maximum number of iterations is reached.
[0069] In image segmentation, the K-means clustering algorithm converts image pixels into feature vectors. These features are then normalized (e.g., normalized coordinates and color values). The K-means algorithm is then run to map the clustering results back into image space, generating a segmentation mask.
[0070] The advantage of clustering segmentation is its ability to handle complex color distributions, making it suitable for natural images such as vegetation classification in remote sensing images. Its disadvantages include high computational complexity and the need to balance feature weights (such as spatial location and color).
[0071] II. Improved SAM Image Segmentation Algorithm The improved SAM image segmentation algorithm proposed in this embodiment, which integrates the improved SegmentAnything Model (SAM), has significant advantages. Through an innovative learning framework, this technology can directly handle entirely new visual scenes that have not been trained on, successfully breaking away from the dependence of traditional methods on preset categories. Even when faced with object types that have never appeared in the training data, it can accurately complete the segmentation task without adjusting the model parameters.
[0072] The core goal of the Segment All Model (SAM) is to achieve "zero-shot open-world segmentation"—to segment any object in an image without task-specific training, including objects from never-before-seen categories or in complex scenes. Its structure is as follows: Figure 2 As shown.
[0073] SAM's generalized segmentation capability gives it the advantage of handling arbitrary objects, but this also means it cannot autonomously identify specific targets. In practical applications, each image segmentation requires manual interactive annotation (such as clicks or bounding boxes for hints). When faced with massive image processing demands, this hint-driven mechanism significantly increases labor costs and time consumption.
[0074] SAM's architecture is designed around decoupling and efficient interaction, and consists of three independent modules: ImageEncoder, PromptEncoder, and MaskDecoder. These modules work together to dynamically fuse image features with user interaction prompts, ultimately outputting high-quality segmentation results.
[0075] (1) Image Encoder The image encoder, as the model's fundamental feature extraction module, is built upon an improved Vision Transformer (ViT). It is responsible for efficiently converting the input image into a high-resolution image and supporting real-time inference. It receives a normalized image with a resolution of 1024×1024 and generates a 64×64 sparse feature map through block processing, with a feature dimension of 256 at each location. This process not only captures global scene information but also preserves local details and reduces computational complexity (from O(…)). The efficiency is reduced to O(N). The image encoder only needs to run once, and the generated embeddings can be cached and reused for different prompts, significantly improving interaction efficiency.
[0076] (2) Prompt Encoder The prompt encoder is the core of multimodal interaction, capable of uniformly mapping diverse prompts such as user input points, boxes, text, or doodles to a semantic space aligned with image features. It supports multimodal input and uniformly maps them to the same semantic space.
[0077] (3) Mask Decoder The mask decoder is the decision-making center of the architecture, dynamically integrating image features and cue information using a lightweight Transformer structure. It searches for cue-related regions within image features through a cross-attention mechanism, progressively refining the segmentation boundaries. This multi-candidate output strategy is particularly suitable for handling blurred boundaries, providing multiple reasonable choices. The entire decoding process is fast, meeting real-time interactive requirements while maintaining accuracy. Although SAM can segment any object without pre-training, it requires pre-setting points or bounding boxes and can only recognize one or a few images at a time. To address the problem that SAM cannot automatically and in batches segment target objects, this paper proposes an improved SAM algorithm. Only one target point needs to be labeled to process batches of images in the imported video, generating the corresponding mask through a three-step iteration.
[0078] The decoder generates multiple candidate masks in parallel (typically three), each with two key scores: an IoU score measuring the degree of overlap between the predicted region and the ideal segmentation, and a stability score assessing the mask's sensitivity to input perturbations. The mask decoder architecture is shown in the diagram below. Figure 3 As shown.
[0079] After generating the mask, it is extracted and binarized according to the characteristics of polarized light heading calculation, facilitating subsequent heading analysis and solution. The specific algorithm flowchart is as follows: Figure 4 As shown.
[0080] III. Principle of Polarized Light Heading Measurement Based on Solar Vector Any point in the sky Its vector direction E is always perpendicular to the direction vector of the sun. It is also perpendicular to the plane determined by the positions of the sun, the observation point, and the measured point. The sun's azimuth is extracted using the characteristics of the E vector direction, the slope k of the solar meridian in the carrier coordinate system is obtained, and the solar azimuth angle is calculated. As shown in the following formula.
[0081]
[0082] Let the light intensities of the four polarization images be respectively and Its Stokes parameters, polarization angle, and degree of polarization can be calculated. For a pixel in pixel coordinate system... Its polarization angle is calculated by the following formula.
[0083]
[0084] Next, a solar space vector is constructed by combining astronomical parameters. First, the solar azimuth is calculated in the geographic coordinate system, based on the observation time (UTC) and geographical location (longitude). ,latitude Calculate the solar hour angle t and declination. solar altitude angle The calculation formula is: ; The formula for the solar azimuth angle in a geographic coordinate system is: ; Converting the reference direction of the polarization angle to the local solar meridian direction, we get: ; Next, the transformation from the geographic coordinate system to the carrier coordinate system is performed. The most crucial step in this process is establishing the transformation from the geographic coordinate system (n-system) to the carrier coordinate system (b-system). The solar vector in the n-system can be represented by:
[0085] The conversion formula from the n-system to the b-system is: ,in, Given the rotation matrix, we can obtain:
[0086] The flowchart for polarized light heading measurement based on solar vector is as follows: Figure 5 As shown.
[0087] IV. Simulation Experiment Verification of Occlusion Removal Algorithm Since there are few open-source datasets containing polarization information, to verify the effectiveness of the algorithm proposed in this implementation, considering that polarization-guided navigation images mainly consist of the sky, an open-source Sky dataset was found. This dataset contains 60 images with a sky background and foreground aircraft, which were used for sky segmentation. Three sets of experiments were set up for comparison, segmenting the images in the sky. The experimental settings strictly maintained hardware platform consistency (NVIDIA GeForce RTX 4060 Laptop GPU, PyTorch CUDA version 12.1). The experimental processing was based on Python and OpenCV, including various segmentation methods, and the processed images were saved locally.
[0088] Experiment 1 focuses on threshold segmentation algorithms, including global thresholding, Otsu's algorithm, and adaptive thresholding. The former uses a manually set threshold of 127 (the midpoint of the 0-255 range); the latter automatically calculates the optimal threshold. Adaptive thresholding uses a Gaussian-weighted local threshold (block size 11, constant C=2). The results are as follows... Figure 6 As shown.
[0089] As can be seen, thresholding segmentation only segments grayscale, failing to completely separate foreground and background. This can lead to some low-grayscale areas, such as the ground and aircraft windows, being mistaken for sky areas, especially with the global thresholding method producing the most inconsistent grayscale distinctions. Test results using publicly available datasets indicate that this method has poor feasibility; further verification will be conducted using real-world polarized images.
[0090] Experiment 2 uses the K-means clustering segmentation algorithm to segment the dataset, as shown below. Figure 7 As shown.
[0091] Experiment 3 uses the improved SAM-based segmentation algorithm proposed in this implementation method. The segmentation results of the dataset are as follows: Figure 8 As shown.
[0092] Table 4-1 Comparison of SSIM in the Three Groups of Experiments
[0093] Of the three thresholding methods, the global thresholding method performed the worst because manually setting the threshold is not flexible enough and can lead to missegmentation. While Otsu's method calculates the threshold automatically, it may perform poorly due to grayscale overlap between foreground and background in the image. The adaptive thresholding method considers local variations, but parameter settings, such as the choice of block size and constant C, can affect the results. The SSIM score was only 0.55, indicating low structural similarity and poor segmentation performance.
[0094] Next, we tested K-means clustering, which improved the SSIM score to 0.77, indicating that clustering has an advantage in distinguishing different regions, especially color features. However, it may be sensitive to changes in lighting or insufficient feature selection, leading to inaccurate segmentation of some regions.
[0095] Finally, the improved SAM method was presented, achieving a maximum SSIM score of 0.84. Because it incorporates semantic information and a more complex model, it can better distinguish the sky from other objects. Further analysis will incorporate polarization information.
[0096] This implementation method experimentally verifies the polarization-based heading measurement method using solar vectors. The experiment was conducted on the rooftop of the Harbin Institute of Technology's Science and Technology Innovation Building, where unobstructed sky polarization information could be collected and used for heading calculation. The experimental equipment included... Figure 9 As shown, detailed information can be found in Table 4-2.
[0097] First, turn on the power bank. After the system is powered on, turn on the data acquisition device to check if it can receive data from the fiber optic gyroscope and image data from the polarization sensor. Perform initial alignment based on the values output by the fiber optic gyroscope inertial navigation system to ensure the system's initial state. After ensuring normal communication and initial alignment, manually rotate the polarization sensor at a frequency of once every 10 seconds, rotating 10° each time, and acquire 10 sky polarization images each time.
[0098] Table 4-2 Equipment Specific Parameters
[0099] The acquired AOP images were used to conduct heading measurement experiments and on-site calibration experiments for polarization sensors. Some of the actual images acquired, after AOP processing, are shown below. Figure 9 As shown.
[0100] The heading angle is calculated by combining the celestial model under the navigation system with the solar azimuth angle. The reference heading angle is derived from the fiber optic integrated navigation system. The solution results of the celestial Rayleigh model are as follows: Figure 10 As shown.
[0101] In the sky dynamic orientation calculation, the difference between the polarized light heading calculation result and the true value output by the fiber optic gyroscope (used as a reference) is used to obtain the sky dynamic orientation error. Figure 11 As shown.
[0102] To verify the orientation accuracy of the method presented in this paper, the mean square error and maximum error were calculated by using the solar azimuth angle to calculate the heading angle of the sky model under the navigation system. The error calculation results are shown in Table 4-3.
[0103] Table 4-3 Heading Angle Calculation Error
[0104] By calculating the solar azimuth angle in the navigation system and then the heading angle, the root mean square error (RMSE) and maximum error (ME) of the proposed solar vector polarization heading measurement method are verified to be small and feasible. This method will be used for polarization heading calculation in different scenarios in the future.
[0105] To further verify the effectiveness of the proposed algorithm, a biomimetic polarization sensor platform was first constructed. An underwater polarization sensor was built using a waterproof casing, and a waterproof test platform was constructed using a simple device. The waterproof polarization platform was placed inside and left to stand for 2 hours. The device showed good airtightness, with no water vapor infiltration, completing the preliminary waterproof test. The composition of the attitude measurement system is as follows: Figure 12 As shown in Table 5-1, the relevant experimental equipment parameters are as follows.
[0106] First, underwater image acquisition was performed using the biomimetic polarization light sensor, followed by outdoor data acquisition using the same sensor. The experiment was conducted at the Harbin Institute of Technology Science and Technology Building (longitude 126.6236, latitude 45.7261, altitude 148.74 m).
[0107] Table 5-1 Equipment Specific Parameters
[0108] The polarization sensor and fiber optic inertial navigation system are integrated into a waterproof device and fixed on a mobile cart, facilitating adjustment of the polarization sensor's pose during data acquisition. The experimental platform and polarization image acquisition scenario are as follows: Figure 12 As shown.
[0109] First, the waterproof experimental setup was placed in the constructed water tank, ensuring good airtightness. Then, the equipment was powered on. The main switch and power supply were turned on, and the data acquisition unit was activated to check if the fiber optic gyroscope data and polarized light image acquisition information were being received normally. Initial alignment was then performed based on the values output by the fiber optic gyroscope inertial navigation system to ensure the system's initial state. After verifying normal data communication transmission and initial alignment, underwater polarization data acquisition began. Using a trolley rotation device, the rotation was maintained at a frequency of once every 10 seconds, rotating 10° each time, and 10 sky polarization images were acquired each time. The total data acquisition time was 50 minutes, collecting 30,000 polarization images, including those of calm and wavy water surfaces, for subsequent experimental verification. Some of the acquired experimental images are shown below. Figure 13 As shown.
[0110] To verify the effectiveness of the proposed method in real-world experimental scenarios, the experimental setup maintained the same hardware platform as the simulation setup (NVIDIA GeForce RTX 4060 Laptop GPU, PyTorch CUDA version 12.1). The acquired actual wave images were cropped to 256×256 resolution RGB images, uniformly preserving the most severely disturbed parts of the waves in the center and the areas with obvious solar altitude angles.
[0111] Since the improved generative adversarial network has already been trained based on a wave model, real wave images were directly used as input. First, pseudo-color processing was performed, and then five groups of experiments were conducted for comparison to verify the effectiveness of the proposed algorithm in removing wave interference from real data. A static segment was selected for polarization information calculation. Qualitative analysis was performed on each group of experiments in the results, and finally, the RMSE and other indicators of each method were calculated and quantitatively analyzed.
[0112] (1) Experiment 1: colorNet_L1+VGG, training only the color network, using L1 and VGG loss. The result of removing wave interference from polarization images is as follows. Figure 14 As shown. In the polarization information orientation calculation, the result of the polarization light heading calculation is subtracted from the true value output by the fiber optic gyroscope used as a reference to obtain the static orientation calculation result, as shown. Figure 15 As shown.
[0113] First, a qualitative analysis of the results of Experiment 1 is conducted. Figure 14 as well as Figure 15 As can be seen, while the output of colorNet_L1+VGG in Experiment 1 somewhat suppresses wave interference, the Color network adds a series of noises to the edges of the polarized image. The analysis suggests that the network may be mistaking edges for interference during recognition. Figure 15 The heading calculation results show that, compared with the polarization calculation results before wave interference removal, the error of the heading angle calculation results of this method is reduced to a certain extent. The specific calculation results are given in Table 5-2.
[0114] (2) Experiment 2: colorNet_L1+VGG+Adv, training only the color network, using L1, VGG and Advance loss. The result of removing wave interference from polarization images is as follows. Figure 16 As shown. In the polarization information orientation calculation, the result of the polarization light heading calculation is subtracted from the true value output by the fiber optic gyroscope used as a reference to obtain the static orientation calculation result, as shown. Figure 17 As shown.
[0115] First, a qualitative analysis of the results of Experiment 2 is conducted. Figure 16 as well as Figure 17 As can be seen, Experiment 2, compared to Experiment 1, included an Adv network structure. While this resulted in some suppression of wave interference, both Color networks added a series of noises to the edges of the polarized image. The analysis suggests that the network may have mistaken edges for interference during the recognition process. Figure 17 The heading calculation results show that, compared with the polarization calculation results before wave interference removal, the error of the heading angle calculation results obtained by this method is reduced to a certain extent.
[0116] (3) Experiment 3: warp_L1_net, training only the warp network, using L1 loss. The result of removing wave interference from polarization images is as follows. Figure 18 As shown. In the polarization information orientation calculation, the result of the polarization light heading calculation is subtracted from the true value output by the fiber optic gyroscope used as a reference to obtain the static orientation calculation result, as shown. Figure 19 As shown.
[0117] First, a qualitative analysis of the results of Experiment 3 is conducted. Figure 18as well as Figure 19 As can be seen, warp_Net achieves more significant denoising results compared to color_Net, preserving clear image edges that are not considered as interference components. This preliminarily verifies the necessity of co-optimization of deformation modeling and adversarial training in network architecture design.
[0118] (4) Experiment 4: warp_L1+VGG_net, training a warped network using L1 and VGG loss. The result of removing wave interference from polarization images is as follows. Figure 20 As shown. In the polarization information orientation calculation, the result of the polarization light heading calculation is subtracted from the true value output by the fiber optic gyroscope used as a reference to obtain the static orientation calculation result, as shown. Figure 21 As shown.
[0119] First, a qualitative analysis of the results of Experiment 4 is conducted. Figure 21 As can be seen from the results, the L1+VGG performance of warp_Net, compared to Experiments 1 and 2, further illustrates the necessity of co-optimization of deformation modeling and adversarial training in the network structure design of warp_Net compared to color_Net. From... Figure 21 It can be seen that Experiment 4, which uses L1+VGG, has a better denoising effect on water surface noise compared to Experiment 3, which only uses L1 for training.
[0120] (5) Experiment 5: The method described in this implementation, bothNet_L1+VGG+Adv, is used to jointly train the warp and color networks, employing L1 loss, VGG perceptual loss, and Adversarial loss. The result of removing wave interference from polarized images is as follows: Figure 22 As shown. The static orientation solution results are as follows. Figure 23 As shown.
[0121] First, a qualitative analysis of the results of Experiment 5 is conducted. Figure 22 As can be seen, compared to Experiments 3 and 4, the L1+VGG+Adv method of warp_Net, with the addition of the Adv network, achieves better training results. The solution error of the five sets of experiments is... Figure 24 The comparison and analysis of the heading measurement error values of each method are given in Table 5-2.
[0122] Table 5-2 Comparison and Analysis of Heading Measurement Errors by Method (Unit: °)
[0123] By comparing and analyzing the root mean square error (RMSE) and maximum error (ME) of the actual heading measurements of each method, the results show that the method integrating the deformation correction network (warpNet) and the multi-task optimization architecture (BothNet) significantly outperforms the traditional colorNet scheme. Among them, the proposed BothNet_L1+VGG+Adv (Experiment 5) achieves the best overall performance with an RMSE of 0.71° and an ME of 1.44°, improving the RMSE and ME by 2.2° and 4.38° respectively compared to the original disturbed true error. The WarpNet series achieves a significant reduction in error compared to the colorNet series (Experiments 3 and 4 versus Experiments 1 and 2), verifying the necessity of co-optimization of deformation modeling and adversarial training in network structure design. Further analysis shows that VGG sensing loss has a significant effect on suppressing extreme errors. For example, in Experiment 4, after introducing VGG on top of WarpNet, the RMSE decreased by 10% compared to Experiment 3. Compared to the better results in the first four experiments, the BothNet method in this paper improves the RMSE and ME by 25% and 33%, respectively. The results show that this model structure effectively improves the accuracy of heading measurement when dealing with wave interference. Therefore, the BothNet_L1+VGG+Adv scheme has a stable average error of around 0.7° and significant controllability of the maximum error, making it suitable for high-precision heading measurement fields with wave interference underwater.
[0124] To verify the effectiveness of the proposed method in a real-world experimental setting, the experimental setup maintained consistency with the simulation hardware platform (NVIDIA GeForce RTX 4060 Laptop GPU, PyTorch CUDA version 12.1). Experimental processing was based on Python and OpenCV, with three sets of experiments using different segmentation methods. Acquired actual occluded images were used as input, and polarization information was preserved during image processing. The processed images were then saved locally.
[0125] Experiment 1 focuses on thresholding algorithms, including global thresholding, Otsu's algorithm, and adaptive thresholding. Global thresholding is used to segment a captured grayscale image containing polarization information into distant and near views of the sky. The image segmentation results are shown below. Figure 25 As shown.
[0126] As can be seen, for actual polarized images, global thresholding segmentation is based on a set grayscale threshold, which cannot distinguish between foreground and background, and the results cannot be used for polarized light navigation. Adaptive thresholding segmentation performs reasonably well in simulation experiments, but when processing real images, it cannot effectively distinguish between foreground and background, and the results cannot extract polarization information. While the Otsu thresholding method can distinguish between foreground and background to some extent, it mistakenly identifies some lighter-colored buildings as part of the sky, and the extracted sky contains gray areas, interfering with some polarization information.
[0127] Experiment 2 uses the K-means clustering segmentation algorithm. It employs clustering to segment the actual captured grayscale image containing polarization information into distant and foreground scenes. The image segmentation result is shown below. Figure 26 As shown.
[0128] In real-world scenarios, clustering segmentation demonstrates superior performance compared to thresholding. It effectively divides the image into two parts: the distant sky and the foreground obstacles, outperforming Otsu's thresholding method. While it can identify occlusions such as people, some misidentification occurs because the grayscale of some building areas is similar to that of the sky.
[0129] Experiment 3 uses the improved SAM-based segmentation algorithm proposed in this implementation method. The segmentation results of the dataset are as follows: Figure 27 As shown. Using the improved SAM method, only one annotation is needed on the actual captured grayscale image containing polarization information to achieve effective segmentation of the sky (distant and foreground). The image segmentation result is shown below. Figure 26 As shown.
[0130] As can be seen, compared to the K-means clustering method, the improved SAM clustering segmentation proposed in this embodiment can accurately identify human occlusion and various building outline occlusions. Based on the method proposed in Experiment 3, after segmenting the acquired polarization image, the polarization information is calculated. The specific steps are as follows: Step 1: Acquire continuous polarization images for subsequent calculation of AOP, DOP, and other polarization information, as well as to observe changes in polarization angle. Only one marking is required; subsequent polarization images with masks can be automatically generated. The specific processing flow is as follows... Figure 28 As shown.
[0131] Step 2: For each frame of the image, the Segment Anything algorithm generates three candidate masks based on the different semantic segmentation probabilities corresponding to the same location, and provides a confidence score for each mask. The specific processing flow is as follows: Figure 29 As shown.
[0132] Step 3: Select the mask segmentation results with high confidence scores, extract the corresponding mask, and binarize it to facilitate subsequent polarization information calculation. The specific processing flow is as follows: Figure 30 As shown.
[0133] Step 4: Based on the binarized image of the extracted target mask, calculate the polarization information, its AOP and DOP, and obtain a polarization image containing AOP and DOP information. This is for subsequent heading measurement. The specific processing flow is as follows: Figure 31 As shown.
[0134] The improved segment anything algorithm proposed in this embodiment is compared with the K-means clustering segmentation algorithm, which performed well in the previous two experiments. The method described in this embodiment binarizes the segmented results and calculates AOP and DOP polarization information. Then, using the true value provided by the fiber optic gyroscope as a reference, it performs orientation calculations for the dynamic changes in underwater polarized light navigation. The obtained heading angle calculation results are as follows: Figure 32 As shown.
[0135] The headings after image segmentation are calculated, and the accuracy of the calculated headings after segmentation is shown in Table 5-3 below.
[0136] Table 5-3 Heading calculation accuracy after segmentation
[0137] The polarization image segmentation and resolution method based on the improved Segment Anything algorithm proposed in this embodiment demonstrates significant advantages in occluded environments. Experimental results show that, compared with traditional segmentation methods, the proposed method has higher reliability in heading angle resolution accuracy, with significantly better RMSE (0.65°) and maximum error (1.03°) than the comparative method (RMSE of 0.86° and maximum error of 2.15°). This result proves the effectiveness of the proposed improved SAM algorithm in underwater navigation under occluded environments and also reflects the role of image segmentation in improving the accuracy of polarization heading information extraction.
[0138] In summary, this paper presents experimental verification of heading measurement using polarized images in a real underwater environment. First, an experimental platform for a polarization light sensor was built, and underwater images were acquired using a biomimetic polarization light sensor. Then, experiments were conducted to verify the polarization navigation method under wave interference and in occluded environments. The results show that the improved heading measurement method using polarized images in a real underwater environment can effectively improve heading measurement accuracy, fully verifying the effectiveness of the algorithm.
[0139] Those skilled in the art will understand that the above description is merely a preferred embodiment of the present invention, and the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. This is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0140] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.
Claims
1. An underwater polarized light navigation method based on an improved Segment Anything image segmentation algorithm for occlusion removal, characterized in that, The method includes the following steps: Step 1: The Segment Anything model includes three modules: an image encoder, a cue encoder, and a mask decoder. The mask decoder generates multiple candidate masks in parallel. Each mask is accompanied by two key scores: the IoU score measures the degree of overlap between the predicted region and the ideal segmentation, and the stability score evaluates the mask's sensitivity to input perturbations. Step 2: Based on the multiple candidate masks generated in Step 1, the generated masks are extracted and binarized according to the method of polarization light heading calculation to generate a sky light polarization distribution map without obstruction. Step 3: Based on the unobstructed sky polarization distribution map generated in Step 2, calculate the solar azimuth and heading angle of the sky under the navigation system, and calculate the root mean square error and maximum error to verify the polarization heading measurement algorithm of the solar vector.
2. The underwater polarized light navigation method based on the improved Segment Anything image segmentation algorithm for occlusion removal according to claim 1, characterized in that, The image encoder described in step 1 is used to convert the input image into a high-resolution image for efficient processing; The prompt encoder is used to uniformly map the diverse prompts of the target point input by the user to a semantic space aligned with the image features; The mask decoder is used to dynamically integrate image features and prompt information using a Transformer structure.
3. The underwater polarized light navigation method for removing occlusion based on the improved Segment Anything image segmentation algorithm according to claim 1, characterized in that, The improved Segment Anything image segmentation algorithm only needs to mark one target point, that is, process the imported batch of images and extract the corresponding mask through three iterations.
4. The underwater polarized light navigation method for removing occlusion based on the improved Segment Anything image segmentation algorithm according to claim 1, characterized in that, The method for calculating the solar azimuth and heading angle of the sky under the navigation system in step 3 is as follows: The solar azimuth is extracted using the E-vector direction feature, the slope k of the solar meridian in the carrier coordinate system is obtained, and the solar azimuth angle is calculated. , ; For pixels in pixel coordinate system The method for calculating its polarization angle is as follows: By constructing a solar space vector using astronomical parameters, the solar azimuth is first calculated in the geographic coordinate system. Then, the solar hour angle t and declination are calculated based on the observation time and geographical location. Calculate the solar altitude angle The calculation, The method for calculating the solar azimuth angle in a geographic coordinate system is as follows: Convert the reference direction of the polarization angle to the local solar meridian direction, that is, 。 5. The underwater polarized light navigation method for removing occlusion based on the improved Segment Anything image segmentation algorithm according to claim 4, characterized in that, Step 3 also includes the transformation from the geographic coordinate system to the carrier coordinate system, that is, the transformation from the n-system to the b-system. The solar vector is represented in the n-system as follows: , The conversion formula from the n-series to the b-series is: ,in, For rotation matrix, 。 6. An underwater polarized light navigation device based on an improved Segment Anything image segmentation algorithm for occlusion removal, characterized in that, The device includes: The input module for the Segment Anything model includes three modules: an image encoder, a cue encoder, and a mask decoder. The mask decoder generates multiple candidate masks in parallel, and each mask is accompanied by two key scores: an IoU score that measures the degree of overlap between the predicted region and the ideal segmentation, and a stability score that evaluates the mask's sensitivity to input perturbations. The unobstructed sky polarization distribution map generation module is used to extract and binarize the generated masks based on the multiple candidate masks generated by the preprocessing module according to the polarization light heading calculation method, and generate an unobstructed sky polarization distribution map. The navigation module is used to calculate the solar azimuth and heading angle of the sky under the navigation system based on the unobstructed sky polarization distribution map generated by the unobstructed sky polarization distribution map generation module, and to calculate the root mean square error and the maximum error, thereby verifying the polarization heading measurement algorithm of the solar vector.
7. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-5.
8. A computer device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method of any one of claims 1-5.