Ship water gauge reading semantic segmentation method

By combining deep learning and geometric constraints, the problems of inaccurate readings and low efficiency in ship draft readings under complex environments such as uneven lighting, specular reflection, and wave obstruction were solved. This enabled accurate identification of draft numbers and graduation lines and precise calculation of draft readings, improving automation and reliability.

CN121305079APending Publication Date: 2026-01-09GUOKE (SHANDONG) EQUIPMENT TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511587412.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing technologies face problems of inaccurate readings and low efficiency in ship draft readings under complex environments such as uneven lighting, specular reflection, and wave obstruction, making it difficult to achieve automation and reliability.

Method used

By employing a deep learning semantic segmentation model combined with prior geometric constraints, and through local contrast enhancement, specular reflection correction, composite loss function training, and geometric constraint-based connection algorithms, broken scale lines are repaired. Data smoothing is achieved by combining Kalman filters, enabling accurate identification of water gauge numbers and scale lines, and calculation of draft readings.

Benefits of technology

It significantly improves the automation level and accuracy of ship draft readings, solves the problems of inaccurate readings and low efficiency in complex environments, and improves the reliability and robustness of readings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121305079A_ABST
    Figure CN121305079A_ABST
Patent Text Reader

Abstract

The invention discloses a ship water gauge reading semantic segmentation method, relates to the technical field of ship water gauge scale calculation, and aims to solve the problems of inaccurate reading and low efficiency of traditional manual or conventional image processing in a complex environment. According to the method, firstly, a water gauge area image sequence is obtained and preprocessed, and then the water gauge area image sequence is input into a deep learning semantic segmentation model; when the model is trained, a composite loss function combining weighted cross entropy loss, Dice loss and a wave region prediction confidence penalty term is adopted so as to enhance segmentation robustness under a complex background. An initial segmentation image output by the model is further optimized through a prior geometric constraint-based connection algorithm, a water gauge number and a scale line are accurately positioned based on an optimized segmentation result, and a draft reading is smoothly calculated through data. And the accuracy, efficiency and reliability of water gauge reading automation are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of ship water gauge scale calculation, and in particular to a ship water gauge reading semantic segmentation method. BACKGROUND

[0002] As an important means of ship load state monitoring, ship water gauge reading has long been subject to the limitations of complex imaging environment and technical means. In the process of extracting ship water gauge information, existing technologies face many technical challenges.

[0003] Firstly, due to the particularity of the ship operation environment, the obtained image sequence often has significant uneven illumination, especially local highlights or shadow areas are easily formed on the surface of the cabin, which leads to the imbalance of the gray distribution of the water gauge scale line and the digital area, and the traditional global contrast enhancement method cannot effectively distinguish the subtle scale difference.

[0004] Secondly, the surface material of the ship body (such as metal or coating) is prone to mirror reflection, especially under the condition of direct sunlight or water surface reflection, the reflection spot will cover the key identification of the water gauge, causing local pixel overexposure or distortion, which seriously affects the character edge detection and semantic segmentation accuracy.

[0005] Furthermore, the waves generated during the ship navigation continuously impact the water gauge area, causing intermittent occlusion or fracture of the scale line, and existing image processing techniques cannot effectively connect and repair the fractured scale, which easily causes reading discontinuity. These technical bottlenecks jointly restrict the reliability and practicality of ship water gauge automatic reading. SUMMARY

[0006] The present application provides a ship water gauge reading semantic segmentation method, comprising the following steps: Step S1: obtaining a digital image sequence containing a ship water gauge area; Step S2: preprocessing the digital image sequence; Step S3: using a deep learning semantic segmentation model to process the preprocessed digital image sequence; Step S4: optimizing the initial segmentation map output by the semantic segmentation model, and using a connection algorithm based on prior geometric constraints to repair the scale line fracture; Step S5: based on the optimized segmentation result, positioning the water gauge digits and scale line, identifying the digital value and calculating the draft reading through interpolation.

[0007] Further, the preprocessing in step S2 comprises the following sub-steps: Step S2.1: dividing the digital image sequence into multiple local areas, and independently performing contrast enhancement based on local statistical characteristics for each area; Step S2.2: Identify the specular reflection regions in the digital image sequence and correct the pixel intensity based on the polarization optics model.

[0008] Further, step S2.1 specifically includes: For each pixel (x, y) in the input image I, its normalized brightness value I_normalized(x, y) is calculated using the following formula: I_normalized(x,y)=[I(x,y)-μ_Ω(x,y)] / [σ_Ω(x,y)+ε]; Where μ_Ω(x,y) and σ_Ω(x,y) represent the mean and standard deviation of pixel brightness in a local region of size Ω centered at pixel (x,y), respectively, and ε is a constant.

[0009] Furthermore, the polarization optical model in sub-step S2.2 is specifically as follows: Based on the physical relationship model between polarization angle and reflected light intensity, intensity correction is applied to the specular reflection region in the image. The correction formula is as follows: I_corrected(x,y)=I(x,y)-ρ×[I_max(θ)-I_min(θ)]×M(x,y); Where I_corrected(x,y) is the compensated pixel value, ρ is the reflection coefficient related to the hull material, I_max(θ) and I_min(θ) are the maximum and minimum light intensities measured at the polarization angle θ, respectively, and M(x,y) is the binary mask of the reflection area.

[0010] Furthermore, in step S3, the expression for the loss function L used to train the semantic segmentation model is: L=λ1×L_WCE+λ2×L_Dice+λ3×L_Uncertainty; Wherein, L_WCE is the weighted cross-entropy loss, L_Dice is the Dice loss, and L_Uncertainty is the penalty term calculated based on the confidence of the wave coverage area prediction by the model. The weight coefficients λ1, λ2, λ3 satisfy the relationship: λ1+λ2+λ3=1, and λ3>λ1>λ2.

[0011] Furthermore, the connection algorithm used in step S4 includes: Step S4.1: Extract the connected components identified as tick lines in the initial segmentation map; Step S4.2: Fit a straight line to each connected component and calculate its tilt angle; Step S4.3: Group connected components with similar tilt angles into the same group; Step S4.4: For broken segments within the same group, calculate the connection cost function Cost_connect. If the cost is lower than the threshold T_connect, then connect them; wherein, the connection cost function Cost_connect is defined as: Cost_connect=α×Distance_term+β×Angle_diff_term; Where Distance_term represents the Euclidean distance between the endpoints of the two broken segments, Angle_diff_term represents the absolute value of the angle between the directions of the two broken segments, α and β are preset weight coefficients, and α+β=1.

[0012] Further, step S5 specifically includes: assuming the waterline lies between the draft gauge numbers D_upper and D_lower, and their corresponding baseline positions are Y_upper and Y_lower respectively, with the waterline position being Y_water, then the formula for calculating the draft reading is: Draft=D_lower+((Y_water-Y_lower) / (Y_upper-Y_lower))×(D_upper-D_lower).

[0013] Furthermore, the method further includes step S6, which specifically includes: The calculation results of the digital image sequence are smoothed using a Kalman filter; The state vector of the Kalman filter is defined as X_k=[d_k,v_k]^T, where d_k represents the draft reading of the k-th frame and v_k represents the rate of change of the draft reading. The observation equation of the filter is: Z_k=H×X_k+V_k; where Z_k is the calculated reading of the k-th frame, which is used as the observation value; H is the observation matrix, which takes the value [1,0], indicating that the observation value is only directly related to the draft reading d_k in the state vector; V_k is the observation noise.

[0014] The embodiments of this application have the following beneficial effects: This patent application proposes a semantic segmentation method for ship draft readings, which realizes accurate identification of ship draft numbers and scale lines and accurate calculation of draft readings, thereby solving the problems of inaccurate readings and low efficiency of traditional manual reading or conventional image processing methods in complex environments (such as uneven lighting, specular reflection, wave obstruction, etc.), and improving the automation level and reliability of draft readings.

[0015] A sequence of digital images containing the ship's draft gauge area is acquired, and these images are then preprocessed. The preprocessed images are input into a deep learning semantic segmentation model for further processing. During model training, a composite loss function is used, comprehensively considering weighted cross-entropy loss, Dice loss, and a penalty term for the prediction confidence of wave-covered areas to ensure accurate segmentation of draft gauge-related regions even in complex backgrounds. The initial segmentation map output by the model is further optimized using a connection algorithm based on prior geometric constraints. This algorithm extracts connected components of the scale lines, calculates the tilt angle by fitting straight lines, groups connected components with similar tilt angles, and calculates the connection cost for broken segments based on Euclidean distance and direction angle. When the cost is below a set threshold, the break is repaired to ensure the continuity of the scale lines. Based on the optimized segmentation results, the method locates the draft gauge numbers and scale lines. Through the synergistic effect of image preprocessing, deep learning segmentation, geometric optimization, and data smoothing, the method significantly improves the automation, accuracy, and robustness of ship draft gauge readings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 An exemplary schematic diagram illustrates a semantic segmentation method for ship draft readings provided in an embodiment of this application; Figure 2 An exemplary flowchart of step S2 provided in an embodiment of this application is shown; Figure 3 An exemplary flowchart of step S4 provided in an embodiment of this application is shown. Detailed Implementation

[0018] 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.

[0019] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application.

[0020] refer to Figure 1As shown, this application provides a semantic segmentation method for ship draft readings, including the following steps: Step S1: Acquire a sequence of digital images containing the ship's draft area. Step S1 involves acquiring a sequence of digital images containing the ship's draft area to provide the raw data foundation for subsequent image processing and analysis. By acquiring continuous images of draft marks near the ship's waterline, visual information about the draft marks at different times and under different external conditions can be captured, ensuring that subsequent steps have sufficient and timely data.

[0021] This image sequence is typically captured by image acquisition devices deployed on docks or inspection equipment, reflecting dynamic changes in the visual characteristics of the scale lines caused by waves, ship swaying, or changes in lighting. The setup for acquiring digital image sequences allows the method to analyze multiple frames, helping to improve the accuracy and robustness of the final draft reading calculation through time-series information, and overcoming misjudgments that may be caused by transient interference from a single image.

[0022] Step S2: Preprocess the digital image sequence. The preprocessing in step S2 includes the following sub-steps, please refer to [link / reference needed]. Figure 2 As shown.

[0023] Step S2.1: Divide the digital image sequence into multiple local regions, and perform contrast enhancement on each region independently based on local statistical characteristics.

[0024] Step S2.1 specifically includes: For each pixel (x, y) in the input image I, its normalized brightness value I_normalized(x, y) is calculated using the following formula: I_normalized(x,y)=[I(x,y)-μ_Ω(x,y)] / [σ_Ω(x,y)+ε].

[0025] Where μ_Ω(x,y) and σ_Ω(x,y) represent the mean and standard deviation of pixel brightness in a local region of size Ω centered at pixel (x,y), respectively, and ε is a constant.

[0026] In step S2.1, the acquired digital image sequence is preprocessed by first dividing it into multiple local regions, and then independently performing contrast enhancement based on local statistical characteristics on each region. This process aims to address the problem of decreased overall image contrast caused by factors such as uneven ambient lighting, shadows, or reflections of light from water surfaces.

[0027] By calculating the mean and standard deviation of brightness in the neighborhood of each pixel, this method can adaptively adjust the pixel value distribution in local areas.

[0028] Specifically, the normalization operation centers the local brightness mean to eliminate the influence of background brightness differences; simultaneously, it scales the contrast using the local standard deviation, enhancing details in areas with low original contrast while avoiding over-enhancement in high-contrast areas. The constant ε is introduced to prevent computational instability when the standard deviation in a local area is too small.

[0029] This local statistical enhancement method can significantly improve the distinction between the water level gauge lines and the background, providing higher quality and more distinctive input images for subsequent semantic segmentation steps.

[0030] Step S2.2: Identify the specular reflection regions in the digital image sequence and correct the pixel intensity based on the polarization optics model.

[0031] The polarization model in step S2.2 specifically involves: based on a physical relationship model between polarization angle and reflected light intensity, intensity correction is applied to the specular reflection region in the image, using the following formula: I_corrected(x,y)=I(x,y)-ρ×[I_max(θ)-I_min(θ)]×M(x,y).

[0032] Where I_corrected(x,y) is the compensated pixel value, ρ is the reflection coefficient related to the hull material, I_max(θ) and I_min(θ) are the maximum and minimum light intensities measured at the polarization angle θ, respectively, and M(x,y) is the binary mask of the reflection area.

[0033] In step S2.2, specular reflection areas are identified and pixel intensity is corrected in the digital image sequence. This step aims to address the problem of localized overexposure in images caused by strong specular reflections from the water surface or wet hull, which can obscure key texture information of the water gauge markings.

[0034] By applying a polarization optics model, it is possible to distinguish between specular reflection components and diffuse reflection components of an object's surface based on the polarization characteristics of light waves.

[0035] The specific correction process is based on the physical relationship between polarization angle and reflected light intensity. The reflection coefficient ρ is used to quantify the reflection characteristics of a specific hull material, making the correction more targeted. The maximum light intensity I_max(θ) and minimum light intensity I_min(θ) measured at a specific polarization angle θ define the range of reflection intensity variation, and their difference reflects the intensity of specular reflection. The specular reflection region in the image is precisely located using a binary mask M(x,y), ensuring that the correction operation only applies to the affected pixels.

[0036] The correction formula subtracts the reflection component calculated by the above parameters from the original pixel value I(x,y), thereby effectively suppressing the highlight area, restoring the masked image details, and providing image data with lower noise and clearer features for subsequent semantic segmentation steps.

[0037] The preprocessing methods in step S2 are set up in conjunction with the deep learning semantic segmentation model in step S3 to overcome the technical obstacles caused by the complex imaging environment during ship draft reading.

[0038] The preprocessing stage provides optimized input data for subsequent semantic segmentation through targeted image enhancement and correction, thereby improving the robustness and accuracy of the overall method. The semantic segmentation model in step S3, based on the preprocessing results, achieves accurate identification of key regions of the water level gauge. The combination of these two methods effectively addresses practical problems such as uneven illumination, specular reflection, and wave interference.

[0039] Step S2 preprocessing includes local contrast enhancement and specular reflection correction. Local contrast enhancement divides the image into multiple regions and independently calculates local statistical characteristics, adaptively adjusting pixel brightness distribution to solve the problem of detail blurring caused by uneven global illumination and enhance the distinction between scale lines and background.

[0040] Specular reflection correction utilizes a polarization optics model to identify and compensate for highlight areas, suppress overexposure, and restore masked texture information. These processing techniques collectively ensure the quality of the input image and reduce the impact of environmental noise on the segmentation process.

[0041] The deep learning semantic segmentation model in step S3 is trained using a composite loss function, which integrates weighted cross-entropy loss, Dice loss, and a penalty term for uncertainty in the wave region.

[0042] Weighted cross-entropy loss addresses class imbalance and strengthens the model's focus on key features such as water level gauge lines and numbers; Dice loss optimizes the consistency of segmentation boundaries, promoting the continuity and integrity of regions; uncertainty penalty term imposes additional constraints on low-confidence regions such as wave coverage, reducing the risk of missegmentation caused by external interference.

[0043] Step S3: Process the preprocessed digital image sequence using a deep learning semantic segmentation model. In step S3, the expression for the loss function L used when training the semantic segmentation model is: L=λ1×L_WCE+λ2×L_Dice+λ3×L_Uncertainty.

[0044] Wherein, L_WCE is the weighted cross-entropy loss, L_Dice is the Dice loss, and L_Uncertainty is the penalty term calculated based on the confidence of the wave coverage area prediction by the model. The weight coefficients λ1, λ2, λ3 satisfy the relationship: λ1+λ2+λ3=1, and λ3>λ1>λ2.

[0045] In step S3, the preprocessed digital image sequence is processed using a deep learning semantic segmentation model to accurately segment the scale lines and digital information in the ship's draft area. The loss function L used in this step is composed of a weighted cross-entropy loss L_WCE, a Dice loss L_Dice, and a penalty term L_Uncertainty calculated based on the model's confidence in predicting the wave coverage area. Its expression is L=λ1×L_WCE+λ2×L_Dice+λ3×L_Uncertainty.

[0046] The loss function is designed to address common challenges in ship draft reading segmentation, such as class imbalance, boundary ambiguity, and wave interference, thereby improving the model's segmentation accuracy and robustness.

[0047] The weighted cross-entropy loss L_WCE aims to address the uneven distribution of foreground and background pixels in an image. By assigning weights to different categories, it enhances the model's attention to key features such as tick marks and numbers, thereby reducing missegmentation. The Dice loss L_Dice focuses on optimizing the consistency of segmentation boundaries. By calculating the overlap between the predicted results and the ground truth annotations, it promotes the continuity and integrity of segmented regions, avoiding breaks or blurring.

[0048] L_Uncertainty, as a penalty term, is set to directly address the impact of uncertain regions such as wave coverage. It applies additional penalties to low-confidence regions based on the model's prediction confidence, driving the model to handle complex environments more robustly during training and reducing errors caused by external interference.

[0049] The weighting coefficients λ1, λ2, and λ3 satisfy λ1+λ2+λ3=1 and λ3>λ1>λ2. This weighting distribution emphasizes the dominant role of L_Uncertainty, reflects the high importance attached to the management of uncertainty in the wave coverage area, and balances the needs of category balance and boundary optimization.

[0050] This composite loss function enables the model to learn draft gauge features more effectively, ensuring accurate and reliable segmentation results and laying the foundation for subsequent scale line repair and reading calculation. Overall, this loss function plays a crucial role in the semantic segmentation method for ship draft gauge readings, improving the practicality and anti-interference capability of the entire system through multi-objective optimization.

[0051] Step S4: Optimize the initial segmentation map output by the semantic segmentation model. Use a connection algorithm based on prior geometric constraints to repair the broken scale lines. Please refer to [link / reference needed] for details. Figure 3 As shown. The connection algorithm used in step S4 includes: Step S4.1: Extract the connected components identified as tick lines in the initial segmentation map.

[0052] Step S4.2: Perform a straight line fit on each connected component and calculate its tilt angle.

[0053] Step S4.3: Group connected components with similar tilt angles into the same group.

[0054] Step S4.4: For broken segments within the same group, calculate the connection cost function Cost_connect. If the cost is lower than the threshold T_connect, then connection is performed. The connection cost function Cost_connect is defined as follows: Cost_connect=α×Distance_term+β×Angle_diff_term.

[0055] Where Distance_term represents the Euclidean distance between the endpoints of the two broken segments, Angle_diff_term represents the absolute value of the angle between the directions of the two broken segments, α and β are preset weight coefficients, and α+β=1.

[0056] In step S4, the initial segmentation map output by the semantic segmentation model is optimized to address the issue of broken scale lines caused by image noise, wave occlusion, or limitations of the segmentation model, thereby improving the accuracy and reliability of water level gauge reading recognition. This step employs a connection algorithm based on prior geometric constraints, which intelligently repairs broken segments by utilizing the inherent straightness and parallelism of the scale lines, ensuring the continuity and integrity of the segmentation results.

[0057] By extracting the connected components identified as tick marks in the initial segmentation image, we can accurately locate each independent tick mark segment, providing basic units for subsequent processing. Line fitting and tilt angle calculation are performed on each connected component to capture the geometric directional characteristics of the tick marks, thereby reflecting their true arrangement.

[0058] Grouping connected components with similar tilt angles into the same group helps to classify broken segments belonging to the same scale line, avoids misconnection between different scale lines, and improves the targeted nature of the repair.

[0059] For broken segments within the same group, the connection cost function Cost_connect is calculated. This function takes into account both the spatial distance and directional consistency between segments. The distance term ensures that the connection operation is performed only between adjacent segments, reducing the possibility of irrelevant connections; the angle difference term ensures that the scale lines after connection maintain directional consistency, conforming to actual geometric constraints.

[0060] By balancing the effects of distance and angle through preset weighting coefficients α and β, and combining this with a threshold T_connect to determine whether to establish a connection, the repair process becomes both efficient and reliable. Overall, this optimization step effectively compensates for the output deficiencies of the semantic segmentation model, enhances its adaptability to complex environments through geometric prior knowledge, and lays a solid foundation for the accurate calculation of the final water level reading.

[0061] Step S5: Based on the optimized segmentation results, locate the water gauge numbers and scale lines, identify the numerical values, and calculate the draft reading through interpolation. Specifically, Step S5 includes: assuming the water level line lies between the water gauge numbers D_upper and D_lower, with corresponding baseline positions Y_upper and Y_lower, and the water level line position Y_water, then the formula for calculating the draft reading is: Draft=D_lower+((Y_water-Y_lower) / (Y_upper-Y_lower))×(D_upper-D_lower).

[0062] In step S5, the draft gauge numbers and scale lines are located based on the optimized segmentation results. The purpose is to convert the pixel position information in the image into accurate ship draft readings. By identifying the draft gauge numbers and their corresponding baseline positions, a mapping relationship between the image coordinate system and the actual physical scale values ​​can be established.

[0063] When the water level line lies between two adjacent draft gauge numbers D_upper and D_lower, a linear interpolation method is used to calculate the draft reading.

[0064] In the specific calculation process, Y_upper and Y_lower represent the vertical coordinates of the baseline corresponding to the numbers D_upper and D_lower in the image, respectively, and Y_water is the detected water surface position.

[0065] This calculation formula calculates the relative position ratio of the waterline to the baseline below, applies this ratio to the difference between the two scale values, and finally obtains an accurate draft reading. This interpolation method can effectively compensate for reading deviations caused by ship attitude, shooting angle, or wave fluctuations, significantly improving the accuracy of water level measurement and providing reliable data for ship load management.

[0066] The method further includes step S6, which specifically includes: smoothing the calculation results of the digital image sequence using a Kalman filter.

[0067] The state vector of the Kalman filter is defined as X_k=[d_k,v_k]^T, where d_k represents the draft reading in the k-th frame and v_k represents the rate of change of the draft reading.

[0068] The observation equation for the filter is: Z_k = H × X_k + V_k. In this equation, Z_k is the calculated reading of the k-th frame, which is used as the observed value. H is the observation matrix, taking values ​​of [1,0], indicating that the observed value is directly related only to the draft reading d_k in the state vector. V_k is the observation noise.

[0069] In the aforementioned semantic segmentation method for ship draft readings, step S6 uses a Kalman filter to smooth the calculation results of the digital image sequence. The purpose of this step is to solve the problem of instantaneous fluctuations in draft readings caused by wave undulations, ship swaying, or environmental interference in the image sequence, thereby improving the stability and reliability of the final reading.

[0070] By introducing a Kalman filter, draft readings can be dynamically estimated based on time series data, effectively suppressing the influence of random noise, ensuring smooth and continuous output results, and meeting the requirements for data consistency in practical applications.

[0071] The state vector of a Kalman filter is defined as X_k = [d_k, v_k]^T, where d_k represents the draft reading in the k-th frame, and v_k represents the rate of change of the draft reading. This state vector design allows the filter to simultaneously track the reading and its changing trend, thus more accurately modeling the dynamic behavior of the readings.

[0072] In the observation equation Z_k=H×X_k+V_k, Z_k is the directly calculated value of the k-th frame, which serves as the observation input; the observation matrix H takes the value [1,0], indicating that the observed value is only directly related to the draft reading d_k in the state vector, while the rate of change v_k is indirectly optimized through the state transition process; V_k is the observation noise, representing the uncertainty introduced from the semantic segmentation and interpolation calculation steps.

[0073] Step S6, as a post-processing step, follows the interpolation calculation results from step S5. Through the prediction and update mechanism of Kalman filtering, it fuses the current observations with the prior state estimate to generate the optimal draft reading estimate. This process adaptively adjusts the reading sequence, reducing fluctuations caused by single-frame image segmentation errors or transient interference, thus providing more consistent output in continuous monitoring. This smoothing process enhances the method's practicality in complex maritime environments, providing high-precision data support for applications such as ship load management and safe navigation.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A semantic segmentation method for ship draft readings, characterized in that, Includes the following steps: Step S1: Obtain a digital image sequence containing the ship's draft area; Step S2: Preprocess the digital image sequence; Step S3: Process the preprocessed digital image sequence using a deep learning semantic segmentation model; Step S4: Optimize the initial segmentation map output by the semantic segmentation model, and use a connection algorithm based on prior geometric constraints to repair the broken scale lines; Step S5: Based on the optimized segmentation results, locate the water gauge numbers and scale lines, identify the numerical values, and calculate the draft reading through interpolation.

2. The method according to claim 1, characterized in that, The preprocessing in step S2 includes the following sub-steps in sequence: Step S2.1: Divide the digital image sequence into multiple local regions, and independently perform contrast enhancement based on local statistical characteristics on each region; Step S2.2: Identify the specular reflection regions in the digital image sequence and correct the pixel intensity based on the polarization optics model.

3. The method according to claim 2, characterized in that, Step S2.1 specifically includes: For each pixel (x, y) in the input image I, its normalized brightness value I_normalized(x, y) is calculated using the following formula: I_normalized(x,y)=[I(x,y)-μ_Ω(x,y)] / [σ_Ω(x,y)+ε]; Where μ_Ω(x,y) and σ_Ω(x,y) represent the mean and standard deviation of pixel brightness in a local region of size Ω centered at pixel (x,y), respectively, and ε is a constant.

4. The method according to claim 2, characterized in that, The polarization optical model in sub-step S2.2 is specifically as follows: Based on the physical relationship model between polarization angle and reflected light intensity, intensity correction is applied to the specular reflection region in the image. The correction formula is as follows: I_corrected(x,y)=I(x,y)-ρ×[I_max(θ)-I_min(θ)]×M(x,y); Where I_corrected(x,y) is the compensated pixel value, ρ is the reflection coefficient related to the hull material, I_max(θ) and I_min(θ) are the maximum and minimum light intensities measured at the polarization angle θ, respectively, and M(x,y) is the binary mask of the reflection area.

5. The method according to claim 1, characterized in that, In step S3, the expression for the loss function L used to train the semantic segmentation model is: L=λ1×L_WCE+λ2×L_Dice+λ3×L_Uncertainty; Wherein, L_WCE is the weighted cross-entropy loss, L_Dice is the Dice loss, and L_Uncertainty is the penalty term calculated based on the confidence of the wave coverage area prediction by the model. The weight coefficients λ1, λ2, λ3 satisfy the relationship: λ1+λ2+λ3=1, and λ3>λ1>λ2.

6. The method according to claim 1, characterized in that, The connection algorithm used in step S4 includes: Step S4.1: Extract the connected components identified as tick lines in the initial segmentation map; Step S4.2: Fit a straight line to each connected component and calculate its tilt angle; Step S4.3: Group connected components with similar tilt angles into the same group; Step S4.4: For broken segments within the same group, calculate the connection cost function Cost_connect. If the cost is lower than the threshold T_connect, then connect them; wherein, the connection cost function Cost_connect is defined as: Cost_connect=α×Distance_term+β×Angle_diff_term; Where Distance_term represents the Euclidean distance between the endpoints of the two broken segments, Angle_diff_term represents the absolute value of the angle between the directions of the two broken segments, α and β are preset weight coefficients, and α+β=1.

7. The method according to claim 1, characterized in that, Step S5 specifically includes: assuming the water level line lies between the draft gauge numbers D_upper and D_lower, and their corresponding baseline positions are Y_upper and Y_lower respectively, with the water level line position being Y_water, then the formula for calculating the draft reading is: Draft=D_lower+((Y_water-Y_lower) / (Y_upper-Y_lower))×(D_upper-D_lower).

8. The method according to claim 1, characterized in that, The method further includes step S6, which specifically includes: The calculation results of the digital image sequence are smoothed using a Kalman filter; The state vector of the Kalman filter is defined as X_k=[d_k,v_k]^T, where d_k represents the draft reading of the k-th frame and v_k represents the rate of change of the draft reading. The observation equation of the filter is: Z_k=H×X_k+V_k; where Z_k is the calculated reading of the k-th frame, which is used as the observation value; H is the observation matrix, which takes the value [1,0], indicating that the observation value is only directly related to the draft reading d_k in the state vector; V_k is the observation noise.

Citation Information

Cited By

  • Reservoir water gauge identification method based on polarization imaging and heterogeneous target integration

    CN121747090A

  • A reservoir water gauge recognition method based on polarization imaging and heterogeneous target integration

    CN121747090B