Real-time detection system for ship draft

By establishing a three-dimensional dynamic coordinate system and using multi-source data fusion technology, the problem of ship draft measurement error caused by rapid water level changes in the lock was solved, and accurate draft detection was achieved in complex environments.

CN121084564BActive Publication Date: 2026-03-03FUJIAN PORT & SHIPPING SURVEY & DESIGN INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511646555.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-03-03
Estimated Expiration
2045-11-11

AI Technical Summary

Technical Problem

In situations where water levels change rapidly within locks, existing technologies cannot accurately reflect changes in a ship's draft in real time using laser point cloud data and image data, leading to measurement errors.

Method used

A three-dimensional dynamic coordinate system is established, and the water surface reference plane is updated in combination with real-time water level data. The laser point cloud and camera image are unified by a pre-calibrated transformation matrix. Water level data is matched using millisecond-level timestamps. The pure hull point cloud is separated by combining a region growing algorithm. The deck plane is fitted to extract the hull features. The side feature surface is corrected by combining the ship database. The initial draft is calculated and compared with the theoretical draft to output the final draft.

Benefits of technology

In complex water level change environments, accurate measurement of ship draft has been achieved, providing a reliable basis for ship navigation safety and lock chamber management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121084564B_ABST
    Figure CN121084564B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of ship draft detection, and provides a ship draft depth real-time detection system, which comprises: establishing a three-dimensional dynamic coordinate system, updating a water surface datum in combination with real-time water level data; calculating adjacent frame water level change and compensating point cloud Z-axis; separating pure ship body point cloud in combination with the water surface datum, ship body reflectivity and a region growing algorithm; fitting a deck plane of the pure ship body point cloud, extracting a ship side feature through edge detection, and correcting a side shell feature surface; converting the water surface datum into pixel coordinates and superimposing an auxiliary line; positioning a draft line, converting bow / midship / stern draft line coordinates to the three-dimensional dynamic coordinate system, and calculating initial draft depth; extracting average coordinates of the Z-axis of the deck, calculating the bow / midship / stern freeboard height in combination with the water surface datum coordinates; and calculating the theoretical draft depth in combination with the ship type depth deduction, comparing the initial draft depth, and outputting the final draft depth, so as to improve the ship draft depth detection precision in a complex water level change environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ship draft detection technology, specifically a real-time ship draft depth detection system. Background Technology

[0002] Draft, a key parameter for ship navigation, directly reflects the depth to which a ship is submerged in water, and its importance is self-evident. Draft depth has a profound and multifaceted impact on a ship's navigational performance.

[0003] When a ship enters or exits a lock, the rise and fall of the water level inside the lock chamber causes a change in the ship's position relative to the bottom of the chamber. For draft detection schemes based on laser point cloud data and image data, rapid changes in water level may prevent equipment such as laser level gauges from adapting to these changes in a timely and accurate manner. For example, during lock impoundment, the water level rises rapidly, and laser point cloud data and image data may not reflect changes in the ship's draft in real time, thus affecting the calculation of the freeboard height and draft at the ship's side, leading to errors in the final draft measurement.

[0004] To address this, the present invention provides a real-time ship draft detection system. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.

[0006] The technical solution adopted by this invention to solve its technical problem is: a real-time ship draft detection system, comprising the following modules:

[0007] Dynamic reference establishment module: A three-dimensional dynamic coordinate system is established based on the calibration origin at the bottom of the gate chamber. The water surface reference surface is updated in combination with real-time water level data. The laser point cloud and camera image are unified to the three-dimensional dynamic coordinate system through a pre-calibration transformation matrix.

[0008] The hull point cloud separation module: adds millisecond-level timestamps to the laser point cloud to match water level data, calculates the water level change between adjacent frames and compensates for the Z-axis of the point cloud; and combines the water surface reference plane, hull reflectivity and region growing algorithm to separate the pure hull point cloud.

[0009] Ship feature correction module: The RANSAC algorithm is used to fit the deck plane of the clean hull point cloud, edge detection is used to extract the hull features, and the side hull feature surface is corrected by combining static data from the ship database.

[0010] Initial draft calculation module: After enhancing the ship's side image by denoising and histogram equalization, the water surface reference plane is converted to pixel coordinates and auxiliary lines are superimposed; the grayscale threshold is adjusted according to the water level data, the waterline is located using Canny edge detection and Hough transform, the draft coordinates of the bow / midship / stern are converted to the three-dimensional dynamic coordinate system, and the initial draft depth is calculated.

[0011] Final draft output module: Extract the average Z-axis coordinates of the deck from the pure hull point cloud, calculate the freeboard height of the bow / midship / stern by combining it with the coordinates of the water surface reference plane; then, combine it with the theoretical draft derived from the ship's shape depth, compare it with the initial draft, and output the final draft.

[0012] As a further aspect of the present invention: the process of establishing a three-dimensional dynamic coordinate system and updating the water surface reference surface in conjunction with real-time water level data is as follows:

[0013] The pre-calibrated point at the bottom of the gate chamber is taken as the origin O. The coordinates are measured and recorded using a total station. Based on the origin O, a three-dimensional dynamic coordinate system is established according to the right-hand rule and denoted as CS_dynamic.

[0014] The height of the water surface from the bottom of the gate chamber is collected in real time using an ultrasonic level gauge and denoted as H. 实时 The water surface reference plane in CS_dynamic is defined as Z=H. 实时 .

[0015] As a further aspect of the present invention: the process of unifying the laser point cloud and camera image to a three-dimensional dynamic coordinate system through a pre-calibrated transformation matrix is ​​as follows:

[0016] The lidar and camera are calibrated in advance using a calibration board. By scanning the calibration target with known coordinates, the transformation matrix T_L of the lidar's own coordinate system → CS_dynamic is calculated. Each lidar point cloud is transformed to CS_dynamic through T_L, and the Z coordinate is automatically associated with the dynamic water surface.

[0017] The intrinsic parameters and the transformation matrix T_C between the camera coordinate system and the CS_dynamic coordinate system are calculated using a checkerboard calibration board. The pixel coordinates are then converted to 3D CS_dynamic coordinates using the intrinsic parameters and T_C, ensuring that the water surface in the image corresponds to Z=H in the coordinate system. 实时 Total overlap.

[0018] As a further aspect of the present invention: the process of matching water level data with millisecond-level timestamps for laser point clouds, calculating water level changes in adjacent frames, and compensating for the Z-axis of the point cloud is as follows:

[0019] Each frame of laser point cloud is stamped with a millisecond-level timestamp, corresponding one-to-one with the water level data at the same moment. The water level change ΔH corresponding to two adjacent frames of laser point cloud is calculated, and ΔH is added to the Z-axis of the next frame of point cloud.

[0020] As a further aspect of the present invention: the process of separating the pure hull point cloud is as follows:

[0021] B1, based on water surface reference plane H 实时 And the normal range of point cloud values ​​for hull height [H]实时 H 实时 [+hull height], remove point clouds whose Z coordinate is not within the normal range of the point cloud;

[0022] B2, remove laser point clouds with reflectivity below the reflectivity threshold;

[0023] B3. In the point cloud remaining after the B1-B2 steps, take the point with the highest Z coordinate as the initial seed point S, add S to the candidate growth point set P, and mark it as processed; at the same time, search all unprocessed points within its neighborhood radius, calculate the angle between the normal vector of all unprocessed points and S, and add the points with the required angle to the candidate growth point set P.

[0024] Select the point S with the smallest angle between the candidate growth point set P and the average normal vector of the candidate growth point set P, add it to P and mark it as processed; then search for unprocessed points in the neighborhood of S, calculate the angle between these points and the normal vector of S, and add the points with the required angle but not in P to P. Repeat this process until P is empty or the size of P no longer increases. At this time, the first point cloud cluster is obtained.

[0025] The size of all point cloud clusters is counted, and the point cloud clusters that meet the requirements in terms of the number of points are selected. The spatial distance between each cluster is calculated, and the clusters that meet the distance requirements are merged into the hull total cluster. The final merged point set is the pure hull point cloud set.

[0026] As a further aspect of the present invention: the process of fitting the deck plane of the pure hull point cloud using the RANSAC algorithm is as follows:

[0027] From the clean hull point cloud, three points are randomly selected to fit a plane. The distances from other points to this plane are calculated, and the number of interior points whose distances are ≤ the error threshold is counted. This process is repeated, and the plane with the most interior points is selected as the deck plane.

[0028] The process of edge detection to extract ship hull features is as follows:

[0029] For each point in the clean hull point cloud, calculate the normal vector. If the angle between the normal vectors of adjacent points is greater than the angle threshold, then it is determined to be an edge point.

[0030] Using Euclidean distance clustering, edge points are divided into multiple edge clusters. The length of each edge cluster is calculated, and the cluster with the longest length is retained as the ship's side edge point cluster. The ship's side edge point clusters are arranged in the order of bow → midship → stern, and fitted into a spatial straight line using the least squares method to obtain the ship's side contour line. The ship's side point cloud is selected on both sides of the ship's side contour line to form a ship's side point cloud subset. The ship's side feature surface is obtained by fitting based on the ship's side point cloud subset.

[0031] The process of correcting the side hull feature surface is as follows:

[0032] Retrieve the ship's static data and compare it with the fitted output hull feature surface. If the error is within the allowable range, the output hull feature surface is used directly; otherwise, the ship's static data is used for correction.

[0033] As a further aspect of the present invention: the process of converting the water surface reference plane to pixel coordinates and superimposing auxiliary lines is as follows:

[0034] The water surface reference plane in the three-dimensional dynamic coordinate system is converted into pixel coordinates in the image using camera intrinsic parameters and transformation matrix T_C;

[0035] A red auxiliary line is overlaid on the image, coinciding with the converted water surface pixel coordinates, as a visual reference.

[0036] As a further aspect of the present invention: the process of calculating the initial draft is as follows:

[0037] Adjusting the grayscale threshold based on water level data, the image is divided into two parts: the ship's side and the water surface, thus initially segmenting the waterline region;

[0038] The Canny algorithm is used to extract image edges, and the Hough transform is used to detect straight lines to locate the pixel coordinates of the bow / midship / stern waterline in the image.

[0039] Convert the pixel coordinates of the waterline at the bow, midships, and stern into Z-coordinates of the dynamic coordinate system, and calculate the initial draft, where the initial draft = waterline Z-coordinate - water surface reference plane Z-coordinate.

[0040] As a further aspect of the present invention: the process of calculating the freeboard height of the bow / midship / stern by combining the coordinates of the water surface reference plane is as follows:

[0041] From the pure hull point cloud, points within the deck plane are selected, and the average Z-axis coordinate of these points is calculated and denoted as Z. 甲板平均 ;

[0042] Based on Z 甲板平均 Calculate the freeboard height at the bow, midships, and stern, where freeboard height = Z 甲板平均 - Z-coordinate of the water surface reference plane.

[0043] As a further aspect of the present invention: the process of outputting the final draft is as follows:

[0044] Obtain the ship's molded depth, which is the vertical distance from the deck to the bottom, from the ship database, and calculate the theoretical draft, where theoretical draft = molded depth - freeboard height;

[0045] Compare the initial draft with the theoretical draft. If the deviation between the initial draft and the theoretical draft is within the error range, then the initial draft and the theoretical draft are taken as valid data; otherwise, the theoretical draft is taken as valid data.

[0046] The final draft is obtained by performing a moving average on the valid data.

[0047] The beneficial effects of this invention are as follows: A dynamic benchmark establishment module establishes a three-dimensional dynamic coordinate system with the origin at the bottom of the lock chamber. This system updates the water surface reference plane using real-time water level data, unifying the laser point cloud and camera images to this coordinate system, effectively eliminating the interference of water level changes on measurements. The hull point cloud separation module timestamps the laser point cloud with millisecond-level data to match water level data, compensates for the Z-axis of the point cloud, and separates the pure hull point cloud using multiple methods. Subsequent modules accurately acquire ship characteristics based on this, calculate the initial draft, and derive the theoretical draft using the ship's shape depth. After comparison and moving average processing, the final draft is output. The entire scheme achieves multi-source data fusion and dynamic adjustment, ensuring accurate measurement of ship draft even in complex water level change environments, providing a reliable basis for ship navigation safety and lock chamber management. Attached Figure Description

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

[0049] Figure 1 This is a flowchart of the real-time ship draft detection system described in an embodiment of the present invention;

[0050] Figure 2 This is a flowchart illustrating the steps involved in determining a ship's draft in the real-time ship draft detection system described in this embodiment of the invention. Detailed Implementation

[0051] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0052] Example: Please refer to Figure 1-2 As shown in the figure, the real-time ship draft detection system according to an embodiment of the present invention specifically includes the following steps:

[0053] Dynamic reference establishment module: A three-dimensional dynamic coordinate system is established based on the calibration origin at the bottom of the gate chamber. The water surface reference surface is updated in combination with real-time water level data. The laser point cloud and camera image are unified to the three-dimensional dynamic coordinate system through a pre-calibration transformation matrix.

[0054] In the dynamic reference establishment module, the process of establishing a three-dimensional dynamic coordinate system and updating the water surface reference surface in conjunction with real-time water level data is as follows:

[0055] A1. Take the pre-calibrated point at the bottom of the gate chamber (such as the metal embedded part of the concrete base plate) as the origin O, measure and record the coordinates with a total station, and establish a three-dimensional dynamic coordinate system according to the right-hand rule based on the origin O, and denot it as CS_dynamic.

[0056] Wherein, the X-axis: along the length of the gate chamber (e.g., from the gate inlet to the outlet);

[0057] Y-axis: Along the width of the gate chamber (perpendicular to the X-axis, pointing towards the inside of the gate chamber);

[0058] Z-axis: Vertically upward (initially Z=0 corresponds to the bottom plane of the gate chamber, and subsequently changes dynamically with the water level);

[0059] For example, suppose the origin O is at the southwest corner of the gate chamber bottom plate, the X-axis is east (gate chamber length 50m), and the Y-axis is north (gate chamber width 10m). At this time, the coordinates of the point at the bottom of the northeast corner of the gate chamber are (50m, 10m, 0m) in this coordinate system.

[0060] A2. The height of the water surface from the bottom of the gate chamber (Z=0) is collected in real time using an ultrasonic level gauge (sampling frequency ≥10Hz), and denoted as H. 实时 (e.g. H) 实时 =3 meters); define the water surface reference plane in CS_dynamic as Z=H 实时 That is, the Z-coordinate of the water surface reference plane in the three-dimensional dynamic coordinate system CS_dynamic is fixed at H. 实时 ;

[0061] For example, if H_real-time = 3.2m at time t1 and H_real-time = 3.5m at time t2, then the water surface reference level at time t1 is Z = 3.2m, and it is updated to Z = 3.5m at time t2. The reference zero point of the Z-axis of the coordinate system changes synchronously with the water level.

[0062] In the dynamic reference establishment module, the process of unifying the laser point cloud and camera image to a three-dimensional dynamic coordinate system through a pre-calibrated transformation matrix is ​​as follows:

[0063] The lidar and camera are calibrated in advance using a calibration board. By scanning the calibration target with known coordinates, the transformation matrix T_L (4×4 matrix, including rotation and translation) of the lidar's own coordinate system → CS_dynamic is calculated. Each lidar point cloud is transformed to CS_dynamic through T_L, and the Z coordinate is automatically associated with the dynamic water surface.

[0064] The intrinsic parameters (focal length, principal point) and the transformation matrix T_C from the camera coordinate system to CS_dynamic are calculated using a checkerboard calibration board. Pixel coordinates are then converted to 3D CS_dynamic coordinates using the intrinsic parameters and T_C, ensuring that the water surface in the image corresponds to Z=H in the coordinate system. 实时 completely coincident;

[0065] For example, a laser point cloud obtained by lidar scanning has coordinates of (2.1m, 0.8m, 3.5m) in its own coordinate system. After transformation by T_L (translation amount: X+5m, Y+2m, Z+0), the coordinates in CS_dynamic are (7.1m, 2.8m, 3.5m). If H is 3.2m at this time, it can be directly determined that the point is 0.3m above the water surface.

[0066] Understandably, the significance of the dynamic benchmark establishment module lies in its role as the cornerstone of the entire measurement system. Its main function is to establish a three-dimensional dynamic coordinate system, CS_dynamic, by setting a pre-calibrated point at the bottom of the lock chamber as the origin. The X, Y, and Z axes of this coordinate system are determined based on the length, width, and vertical direction of the lock chamber, respectively, and the water surface reference plane is updated in conjunction with real-time data collected by the ultrasonic level gauge. Simultaneously, a pre-calibration transformation matrix is ​​used to unify the laser point cloud and camera images into this three-dimensional dynamic coordinate system. This process effectively eliminates the interference of water level changes on the measurement, providing a unified and dynamic spatial benchmark for subsequent modules such as hull point cloud separation and ship feature correction, ensuring the accuracy and consistency of measurement data at each stage.

[0067] The hull point cloud separation module: adds millisecond-level timestamps to the laser point cloud to match water level data, calculates the water level change between adjacent frames and compensates for the Z-axis of the point cloud; and combines the water surface reference plane, hull reflectivity and region growing algorithm to separate the pure hull point cloud.

[0068] In the hull point cloud separation module, the process of matching the laser point cloud with water level data by adding millisecond-level timestamps, calculating the water level change between adjacent frames, and compensating for the Z-axis of the point cloud is as follows:

[0069] Each frame of laser point cloud is stamped with a millisecond-level timestamp (e.g., 1699999999.123ms), which corresponds one-to-one with the water level data (H real-time) at the same moment, ensuring that the water level at the time of point cloud acquisition is completely consistent with the water level at the time of calculation;

[0070] Calculate the water level change ΔH (e.g., ΔH = 0.05m) corresponding to two adjacent frames of laser point cloud. The water level change ΔH is obtained by subtracting the water level data at the same moment corresponding to the next frame of laser point cloud and the water level data at the same moment corresponding to the previous frame of laser point cloud.

[0071] ΔH is uniformly added to the Z-axis of the point cloud in the next frame to offset the vertical shift of the point cloud caused by water level changes and to ensure the spatial continuity of the point cloud in adjacent frames.

[0072] For example, in frame t1 (1699999999.123ms), the water level H1 = 3.2m, and in frame t2 (1699999999.223ms), the water level H2 = 3.25m, with ΔH = 0.05m. Therefore, the Z-coordinate of all point clouds in frame t2 is increased by 0.05m to avoid the illusion that the ship's point cloud is sinking due to rising water levels.

[0073] In the hull point cloud separation module, the process of separating clean hull point clouds by combining the water surface reference plane, hull reflectivity, and region growing algorithm is as follows:

[0074] B1, based on water surface reference plane H 实时 And the normal range of point cloud values ​​for hull height [H] 实时 H 实时 [+hull height], remove point clouds whose Z coordinates are not within the normal range of point clouds, and eliminate aerial interference points and underwater impurity points;

[0075] B2, remove laser point clouds with reflectivity below the reflectivity threshold;

[0076] It should be noted that the laser reflectivity of a ship's hull (metal / wood) is usually higher than that of the water surface (water has low laser reflectivity). A reflectivity threshold (e.g., reflectivity ≥ 21%) should be set. This threshold can be set by: scanning a standard ship hull (covering common materials such as steel cargo ships and wooden fishing boats) moored in the lock chamber with a lidar system, recording the reflectivity data of different parts (hull side, deck, cabin) to form a "hull reflectivity dataset." For the water surface sample: scanning the water surface under different conditions (calm water, rippling water, water with bubbles / scum), recording its reflectivity data to form a water surface sample. The reflectivity dataset is statistically analyzed to identify the reflectivity boundary between two types of targets. For example, the reflectivity of ship hulls is 28%~65% for steel hulls and 22%~45% for wooden hulls, with the overall distribution concentrated above 22%. The reflectivity of water surfaces is 3%~15% for calm water surfaces and 5%~20% for water surfaces with bubbles, with the overall distribution concentrated below 20%. In this case, the "boundary interval" is 20%~22%, and the threshold can be set to 21% (or take the middle value). This will prevent wooden hulls (minimum 22%) from being misidentified as water surfaces and will also eliminate the vast majority of water surface points (maximum 20%).

[0077] B3. In the remaining point cloud after the B1-B2 steps, take the point with the highest Z coordinate as the initial seed point S, add S to the candidate growth point set P, and mark it as processed; at the same time, search all unprocessed points within its neighborhood radius of 0.05m, calculate the angle between the normal vector of all unprocessed points and S, and add points with an angle ≤15° to the candidate growth point set P.

[0078] Select the point S with the smallest angle between the candidate growth point set P and the average normal vector of the candidate growth point set P, add it to P and mark it as processed; then search for unprocessed points in the neighborhood of S, calculate the angle between these points and the normal vector of S, and add points with an angle ≤15° that are not in P to P. Repeat this process: each time select the best expansion point from P and add it to P, then expand the neighborhood candidate points until P is empty or the size of P no longer increases. At this time, the first point cloud cluster is obtained.

[0079] The size of all point cloud clusters is counted, and point cloud clusters with ≥500 points are selected (small clusters formed by discrete points in the water body are removed). The spatial distance between each cluster is calculated, and clusters with a distance ≤0.5m are merged into the total ship hull cluster. The final merged point set is the pure ship hull point cloud set, which includes continuous structural point clouds such as ship side and deck, and has completely removed discrete interference points such as water body scattering points and bottom sediment points.

[0080] The significance of the hull point cloud separation module is understandable: it primarily adds millisecond-level timestamps to the laser point cloud to match water level data. By calculating water level changes between adjacent frames and compensating for the Z-axis of the point cloud, it offsets the point cloud shift caused by water level changes. Simultaneously, combining the water surface reference plane, hull reflectivity, and region growing algorithms, it removes interfering points based on the normal range of point cloud values ​​and reflectivity thresholds. The remaining point cloud is then clustered using the region growing algorithm, ultimately separating a clean hull point cloud. This module effectively eliminates aerial interference points, underwater impurities, and water scattering points, obtaining a clean point cloud of continuous structures such as the ship's sides and decks. This provides a reliable data foundation for subsequent ship feature analysis and draft calculation, ensuring the accuracy of subsequent analysis and calculations.

[0081] Ship feature correction module: The RANSAC algorithm is used to fit the deck plane of the clean hull point cloud, edge detection is used to extract the hull features, and the side hull feature surface is corrected by combining static data from the ship database.

[0082] In the ship feature correction module, the process of fitting the deck plane of the clean hull point cloud using the RANSAC algorithm is as follows:

[0083] From the clean hull point cloud, randomly select 3 points to fit a plane, calculate the distance from other points to this plane, and count the number of interior points with a distance ≤0.03m (error threshold, i.e., the allowable error in the distance from a point to a plane, usually taken as the ranging accuracy of the lidar (e.g., ±3cm), set to 0.03m); repeat this process several times (e.g., usually 1000~2000 times. The more times, the easier it is to find the optimal plane with the most interior points), and select the plane with the most interior points as the deck plane;

[0084] In the ship feature correction module, the process of extracting ship hull features through edge detection is as follows:

[0085] For each point in the pure hull point cloud, calculate the normal vector. If the angle between the normal vectors of adjacent points is greater than the angle threshold (e.g., 30°, the threshold is set according to the hull structure, the normal vector at the ship's side will change from vertical upward on the deck to tilted outward on the ship's side, the angle changes abruptly), then these two points are determined to be edge points.

[0086] For example, the normal vector of a point on the deck is almost vertically upward (angle with the Z-axis < 5°), while the normal vector of a point on the ship's side is inclined outward (angle with the Z-axis > 40°), and the angle between the normal vectors of adjacent points reaches 35°, which are identified as edge points;

[0087] Using Euclidean distance clustering (e.g., adjacent edge points with a distance ≤ 0.1m belong to the same cluster), the edge points are divided into multiple edge clusters. The length of each edge cluster is calculated, and the cluster with the longest length is retained as the ship's side edge point cluster.

[0088] Arrange the cluster of points on the edge of the ship's side in the order of bow → midship → stern (along the X-axis direction), and fit them into a spatial straight line (or curve, depending on the shape of the ship) using the least squares method to obtain the outline of the ship's side.

[0089] Within a 0.5m range on both sides of the ship's side outline (adjusted according to the ship's side thickness), select the ship's hull point cloud to form a subset of the ship's side point cloud. Fit the ship's side point cloud subset to obtain the ship's side feature surface.

[0090] The fitting method is as follows: if the hull is a regular cargo ship and the ship's side is close to a plane, a plane equation is used for fitting (e.g., 2X+3Y-Z+5=0); if it is an irregular ship (e.g., a fishing boat), a quadratic surface is used for fitting, and the final output is the ship's side feature surface.

[0091] In the ship feature correction module, the process of correcting the side feature surface by combining static data from the ship database is as follows:

[0092] Retrieve the ship's static data (such as standard hull slope), compare it with the fitted output hull feature surface. If the error is within the allowable range (such as slope error ≤ 0.03), the output hull feature surface is used directly. If not, the ship's static data is used for correction.

[0093] For example, the fitted ship hull slope (-0.2) has an error of 0.02 compared to the database standard value (-0.22), which is within the allowable range. The final ship hull feature surface is determined to be Z=-0.2X+5.5.

[0094] The significance of the ship feature correction module is understandable: it uses the RANSAC algorithm to fit the deck plane of a clean hull point cloud, randomly selecting points to fit the plane and determining the optimal deck plane based on the number of inner points. Simultaneously, it employs edge detection technology to extract hull features, identifying edge points based on the angle between normal vectors, and obtaining the hull contour line and feature surface through clustering and fitting. This module also incorporates static data from the ship database to correct the side hull feature surface, ensuring its accuracy. This module can accurately acquire key structural features of the ship, such as the deck and hull, effectively correcting feature surface deviations caused by data errors or hull irregularities, and improving the accuracy of ship draft calculation.

[0095] Initial draft calculation module: After the ship's side image is enhanced by Gaussian filtering and histogram equalization, the water surface reference plane is converted to pixel coordinates and auxiliary lines are superimposed; the grayscale threshold is adjusted according to the water level data, the waterline is located using Canny edge detection and Hough transform, the draft coordinates of the bow / midship / stern are converted to the three-dimensional dynamic coordinate system, and the initial draft depth is calculated.

[0096] In the initial draft calculation module, after the ship's side image is enhanced by Gaussian filtering and histogram equalization, the process of converting the water surface reference plane to pixel coordinates and overlaying auxiliary lines is as follows:

[0097] Gaussian filtering for noise reduction: Smooth the image with a 5×5 Gaussian filter to eliminate camera noise (such as snowflakes in the image) and preserve the clear outline of the waterline.

[0098] Histogram equalization enhancement: enhances image contrast—the area near the waterline (the boundary between the water surface and the ship's side) usually has a large difference in brightness. After equalization, the waterline can be made more obvious, avoiding feature loss due to insufficient light.

[0099] The water surface reference plane (Z=H) in the three-dimensional dynamic coordinate system 实时 The coordinates of the water surface are converted into pixel coordinates in the image using camera intrinsics and transformation matrix T_C (e.g., the water surface reference plane is a horizontal line with Y=280 pixels in the image).

[0100] A red auxiliary line is overlaid on the image, coinciding with the converted water surface pixel coordinates, as a visual reference to help locate the waterline later;

[0101] For example, the current H 实时 =3.2m, which translates to Y=280 in image pixel coordinates. A red horizontal line (Y=280) is overlaid on the image, perfectly aligned with the actual water surface, visually marking its location.

[0102] In the initial draft calculation module, the process of calculating the initial draft depth is as follows:

[0103] Adjust the grayscale threshold (e.g., H) based on water level data. 实时 When the height is 3.2m, the threshold is set to 120. The image is divided into two parts: the ship's side (grayscale < 120) and the water surface (grayscale > 120), thus initially segmenting the waterline region.

[0104] The Canny algorithm is used to extract image edges, and then the Hough transform is used to detect straight lines. The waterline is the straight line where the ship's side meets the water surface. The Hough transform is used to locate the pixel coordinates of the bow / midship / stern waterline in the image. For example, the bow waterline Y=285, the midship waterline Y=283, and the stern waterline Y=286.

[0105] Convert the pixel coordinates of the waterline at the bow, midships, and stern to Z-coordinates in a dynamic coordinate system. For example, if Z = 3.25m at the bow, Z = 3.23m at midships, and Z = 3.26m at the stern, calculate the initial draft. The initial draft is calculated as: Initial draft = Waterline Z-coordinate - Water surface Z-coordinate (H... 实时 =3.2m), that is, the draft at the bow is 0.05m, the draft at midships is 0.03m, and the draft at the stern is 0.06m;

[0106] For example, the waterline at the bow is Y=285 in the image, which is converted to three-dimensional coordinates Z=3.25m. The initial draft is 3.25m-3.2m=0.05m (5cm). Similarly, the draft is 3cm in the middle and 6cm at the stern.

[0107] Understandably, the significance of the initial draft calculation module lies in its operation, which primarily revolves around images of the ship's side. First, Gaussian filtering removes image noise, and histogram equalization enhances image contrast, making the waterline features more prominent. Then, the water surface reference plane in the 3D dynamic coordinate system is converted to image pixel coordinates, and a red auxiliary line is overlaid as a visual reference. Next, the grayscale threshold is adjusted based on the water level data to segment the waterline region. The Canny algorithm and Hough transform are used to locate the waterline's pixel coordinates in the image, which are then converted to the Z-coordinate in the dynamic coordinate system to calculate the initial draft depth. This module, through a series of image processing and analysis operations, provides preliminary data for measuring the ship's draft depth.

[0108] Final draft output module: Extract the average Z-axis coordinates of the deck from the pure hull point cloud, calculate the freeboard height of the bow / midship / stern by combining it with the coordinates of the water surface reference plane; then, combine it with the theoretical draft derived from the ship's shape depth, compare it with the initial draft, and output the final draft.

[0109] In the final draft module, the process of extracting the average Z-axis coordinates of the deck from the pure hull point cloud and calculating the freeboard height at the bow, midships, and stern by combining them with the coordinates of the water surface reference plane is as follows:

[0110] From the clean hull point cloud, points within the deck plane (points ≤ 0.03m from the deck plane) are selected, and the average Z-axis coordinate of these points is calculated and denoted as Z. 甲板平均 ;

[0111] Based on Z 甲板平均 Calculate the freeboard height at the bow, midships, and stern, where freeboard height = Z 甲板平均 - Z-coordinate of water surface reference plane (H 实时 );

[0112] For example, there are 5000 points in the deck plane, with Z-coordinates ranging from 4.50m to 4.52m. After averaging, the Z-coordinates are... 甲板平均 =4.51m. Current H 实时 =3.2m, freeboard height =4.51-3.2=1.31m;

[0113] In the final draft output module, the process of comparing the theoretical draft derived from the ship's shape depth with the initial draft and outputting the final draft is as follows:

[0114] Obtain the ship's molded depth, which is the vertical distance from the deck to the bottom, from the ship database, and calculate the theoretical draft. The theoretical draft = molded depth - freeboard height. The theoretical draft includes the theoretical draft at the bow, midships, and stern.

[0115] For example, in the database, the ship's draft is 1.8m, the freeboard height is 1.31m, and the theoretical draft at the bow is 1.8-1.31=0.49m (49cm).

[0116] Compare the initial draft with the theoretical draft. If the deviation between the initial draft and the theoretical draft is within the error range, then the initial draft and the theoretical draft are taken as valid data. If the deviation between the initial draft and the theoretical draft is not within the error range, then the theoretical draft is taken as valid data.

[0117] It should be noted that the error range is set based on the following: Image preprocessing error: Gaussian filtering and histogram equalization may cause blurring of the waterline edge, with an error of approximately 2-3 cm; Canny + Hough transform error: Edge detection and line fitting may cause the waterline pixel coordinates to shift, with an error of approximately 1-2 cm; Coordinate transformation error: During camera intrinsic parameter calibration and 3D coordinate transformation, the error is approximately 2-3 cm; Overall, the upper limit of the technical error for the initial draft is approximately 5-8 cm; Point cloud deck fitting error: The RANSAC algorithm fits the deck plane, which is affected by point cloud density, Outlier error: approximately 1-2cm. Ship depth error: the ship depth in the database is the design value, and the actual hull may have slight deviations due to aging and maintenance, with an error of approximately 2-3cm. Freeboard height calculation error: the difference between the average deck height and the waterline reference plane is affected by the accuracy of the water level sensor (approximately 1-2cm). Overall, the upper limit of the technical error for theoretical draft is approximately 4-7cm. The total allowable error range should cover the overlapping area of ​​the initial draft error (5-8cm) + theoretical draft error (4-7cm), usually taken as 5-10cm.

[0118] The effective data is processed by moving average to obtain the final draft, which includes the draft at the bow, midship and stern.

[0119] For example, let the current frame be the nth frame and the effective data be hn. Perform a 5-frame moving average process. The effective data of the first 4 frames are hn-4, hn-3, hn-2, and hn-1, respectively. The moving average calculation formula is: final draft = hn + hn-4 + hn-3 + hn-2 + hn-1.

[0120] Understandably, the significance of the final draft output module lies in the following: It primarily extracts the average Z-axis coordinates of the deck from the clean hull point cloud. By calculating the average Z-axis coordinates of these points and combining them with the waterline coordinates, it determines the freeboard height at the bow, midships, and stern. Then, it derives the theoretical draft based on the ship's shape depth and compares it with the initial draft. This module comprehensively considers multi-source data, effectively reducing the error impact of a single data source. Through comparison and analysis of the initial and theoretical drafts, it selects more accurate draft data, performs moving average processing, and outputs the final draft. This process ensures the reliability and stability of the draft depth data.

[0121] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A real-time ship draft detection system, characterized in that: Includes the following modules: Dynamic reference establishment module: A three-dimensional dynamic coordinate system is established based on the calibration origin at the bottom of the gate chamber. The water surface reference surface is updated in combination with real-time water level data. The laser point cloud and camera image are unified to the three-dimensional dynamic coordinate system through a pre-calibration transformation matrix. The hull point cloud separation module: adds millisecond-level timestamps to the laser point cloud to match water level data, calculates the water level change between adjacent frames and compensates for the Z-axis of the point cloud; and combines the water surface reference plane, hull reflectivity and region growing algorithm to separate the pure hull point cloud. Ship feature correction module: The RANSAC algorithm is used to fit the deck plane of the clean hull point cloud, edge detection is used to extract the hull features, and the side hull feature surface is corrected by combining static data from the ship database. Initial draft calculation module: After enhancing the ship's side image by denoising and histogram equalization, the water surface reference plane is converted to pixel coordinates and auxiliary lines are superimposed; the grayscale threshold is adjusted according to the water level data, the waterline is located using Canny edge detection and Hough transform, the draft coordinates of the bow / midship / stern are converted to the three-dimensional dynamic coordinate system, and the initial draft depth is calculated. Final draft output module: Extract the average Z-axis coordinates of the deck from the pure hull point cloud, and calculate the freeboard height of the bow / midship / stern by combining it with the coordinates of the water surface reference plane; Then, by combining the theoretical draft derived from the ship's hull depth with the initial draft, the final draft is output. The process of updating the water surface reference level by combining real-time water level data is as follows: The pre-calibrated point at the bottom of the gate chamber is taken as the origin O. The coordinates are measured and recorded using a total station. Based on the origin O, a three-dimensional dynamic coordinate system is established according to the right-hand rule and denoted as CS_dynamic. The height of the water surface from the bottom of the gate chamber is collected in real time using an ultrasonic level gauge and denoted as H. 实时 The water surface reference plane in CS_dynamic is defined as Z=H. 实时 ; The process of unifying the laser point cloud and camera image into a three-dimensional dynamic coordinate system through a pre-calibrated transformation matrix is ​​as follows: The lidar and camera are calibrated in advance using a calibration board. By scanning the calibration target with known coordinates, the transformation matrix T_L of the lidar's own coordinate system → CS_dynamic is calculated. Each lidar point cloud is transformed to CS_dynamic through T_L, and the Z coordinate is automatically associated with the dynamic water surface. The intrinsic parameters and the transformation matrix T_C between the camera coordinate system and the CS_dynamic coordinate system are calculated using a checkerboard calibration board. The pixel coordinates are then converted to 3D CS_dynamic coordinates using the intrinsic parameters and T_C, ensuring that the water surface in the image corresponds to Z=H in the coordinate system. 实时 completely coincident; The process of calculating the water level change between adjacent frames and compensating the Z-axis of the point cloud is as follows: Each frame of laser point cloud is stamped with a millisecond-level timestamp, corresponding one-to-one with the water level data at the same moment. The water level change ΔH corresponding to two adjacent frames of laser point cloud is calculated, and ΔH is added to the Z-axis of the next frame of point cloud.

2. The real-time ship draft detection system according to claim 1, characterized in that: The process of separating the pure ship hull point cloud is as follows: B1, based on water surface reference plane H 实时 And the normal range of point cloud values ​​for hull height [H] 实时 H 实时 [+hull height], remove point clouds whose Z coordinate is not within the normal range of the point cloud; B2, remove laser point clouds with reflectivity below the reflectivity threshold; B3. In the point cloud remaining after the B1-B2 steps, take the point with the highest Z coordinate as the initial seed point S, add S to the candidate growth point set P, and mark it as processed; at the same time, search all unprocessed points within its neighborhood radius, calculate the angle between the normal vector of all unprocessed points and S, and add the points with the required angle to the candidate growth point set P. Select the point S with the smallest angle between the candidate growth point set P and the average normal vector of the candidate growth point set P, add it to P and mark it as processed; then search for unprocessed points in the neighborhood of S, calculate the angle between these points and the normal vector of S, and add the points with the required angle but not in P to P. Repeat this process until P is empty or the size of P no longer increases. At this time, the first point cloud cluster is obtained. The size of all point cloud clusters is counted, and the point cloud clusters that meet the requirements in terms of the number of points are selected. The spatial distance between each cluster is calculated, and the clusters that meet the distance requirements are merged into the hull total cluster. The final merged point set is the pure hull point cloud set.

3. The real-time ship draft detection system according to claim 1, characterized in that: The process of fitting the deck plane of the pure hull point cloud using the RANSAC algorithm is as follows: From the clean hull point cloud, three points are randomly selected to fit a plane. The distances from other points to this plane are calculated, and the number of interior points whose distances are ≤ the error threshold is counted. This process is repeated, and the plane with the most interior points is selected as the deck plane. The process of edge detection to extract ship hull features is as follows: For each point in the clean hull point cloud, calculate the normal vector. If the angle between the normal vectors of adjacent points is greater than the angle threshold, then it is determined to be an edge point. Using Euclidean distance clustering, edge points are divided into multiple edge clusters. The length of each edge cluster is calculated, and the cluster with the longest length is retained as the ship's side edge point cluster. The ship's side edge point clusters are arranged in the order of bow → midship → stern, and fitted into a spatial straight line using the least squares method to obtain the ship's side contour line. The ship's side point cloud is selected on both sides of the ship's side contour line to form a ship's side point cloud subset. The ship's side feature surface is obtained by fitting based on the ship's side point cloud subset. The process of correcting the side hull feature surface is as follows: Retrieve the ship's static data and compare it with the fitted output hull feature surface. If the error is within the allowable range, the output hull feature surface is used directly; otherwise, the ship's static data is used for correction.

4. The real-time ship draft detection system according to claim 1, characterized in that: The process of converting the water surface reference plane to pixel coordinates and overlaying auxiliary lines is as follows: The water surface reference plane in the three-dimensional dynamic coordinate system is converted into pixel coordinates in the image using camera intrinsic parameters and transformation matrix T_C; A red auxiliary line is overlaid on the image, coinciding with the converted water surface pixel coordinates, as a visual reference.

5. The real-time ship draft detection system according to claim 1, characterized in that: The process for calculating the initial draft is as follows: Adjusting the grayscale threshold based on water level data, the image is divided into two parts: the ship's side and the water surface, thus initially segmenting the waterline region; The Canny algorithm is used to extract image edges, and the Hough transform is used to detect straight lines to locate the pixel coordinates of the bow / midship / stern waterline in the image. Convert the pixel coordinates of the waterline at the bow, midships, and stern into Z-coordinates of the dynamic coordinate system, and calculate the initial draft, where the initial draft = waterline Z-coordinate - water surface reference plane Z-coordinate.

6. The real-time ship draft detection system according to claim 1, characterized in that: The process of calculating the freeboard height of the bow, midships, and stern by combining the coordinates of the water surface reference plane is as follows: From the pure hull point cloud, points within the deck plane are selected, and the average Z-axis coordinate of these points is calculated and denoted as Z. 甲板平均 ; Based on Z 甲板平均 Calculate the freeboard height at the bow, midships, and stern, where freeboard height = Z 甲板平均 - Z-coordinate of the water surface reference plane.

7. The real-time ship draft detection system according to claim 1, characterized in that: The process of outputting the final draft is as follows: Obtain the ship's molded depth, which is the vertical distance from the deck to the bottom, from the ship database, and calculate the theoretical draft, where theoretical draft = molded depth - freeboard height; Compare the initial draft with the theoretical draft. If the deviation between the initial draft and the theoretical draft is within the error range, then the initial draft and the theoretical draft are taken as valid data; otherwise, the theoretical draft is taken as valid data. The final draft is obtained by performing a moving average on the valid data.

Citation Information

Patent Citations

  • Navigation channel ship lock-in safety detection method and device thereof

    CN116912285A

  • Method, system, medium and equipment for detecting draft of underway ship

    CN119389379A