Real-time method and system for calculating six degrees of freedom of ship based on laser radar point cloud

By using lidar point cloud processing technology, the six degrees of freedom motion of a ship can be calculated in real time, solving the problem of inaccurate monitoring during ship berthing in existing technologies, and realizing high-precision ship motion monitoring and stable berthing operations.

CN122131318APending Publication Date: 2026-06-02TIANJIN RES INST FOR WATER TRANSPORT ENG M O T

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN RES INST FOR WATER TRANSPORT ENG M O T
Filing Date
2026-05-07
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies cannot monitor the movement of ships in real time and accurately, leading to difficulties in berthing operations, affecting the berthing of other ships and increasing the difficulty of mooring.

Method used

A real-time calculation method for the six degrees of freedom of a ship based on lidar point clouds is adopted. The six degrees of freedom motion of the ship is calculated by preprocessing, filtering, Euclidean clustering segmentation, feature recognition and iterative nearest point algorithm of point cloud data, and the ship attitude is optimized by combining singular value decomposition.

Benefits of technology

It enables high-precision, real-time monitoring of ship movement, reduces sea condition and human error, and improves the stability and accuracy of berthing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122131318A_ABST
    Figure CN122131318A_ABST
Patent Text Reader

Abstract

This invention proposes a real-time calculation method and system for six degrees of freedom of ships based on lidar point clouds, belonging to the field of shipbuilding technology. Addressing the shortcomings of existing ship monitoring technologies, which primarily rely on single-video surveillance and cannot analyze ship motion patterns or comprehensively grasp ship movement trends, this invention utilizes an iterative nearest-point point cloud matching algorithm. Through nearest-point search and singular value decomposition to solve for the optimal transformation matrix, iteratively optimizes the ship's position and attitude, finds the boundaries and centroids of feature data, obtains the main direction of ship motion, and continues iteratively calculating the optimal rigid body transformation between two point clouds. This further yields the core of the ship's motion in any two adjacent frames, achieving high-precision, real-time calculation of the ship's motion under six degrees of freedom (sway, pitch, heave, roll, pitch, and bow). Furthermore, it minimizes errors caused by sea conditions and human operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shipbuilding technology, and in particular to a method and system for real-time calculation of six degrees of freedom of ships based on lidar point clouds. Background Technology

[0002] The berthing of a vessel at a dock requires real-time monitoring. This is necessary for staff to quickly understand the vessel's attitude and movement, and also for remote monitoring of the berthing operation. However, current vessel monitoring primarily relies on video surveillance for real-time monitoring. This lacks methods for precise analysis of vessel movement and predicting future course, making it difficult to fully grasp the movement trends of critical components and provide effective early warnings for berthing operations. Consequently, some berthing accidents become unavoidable. Furthermore, the inability of vessels to quickly dock at their designated berths can cause congestion and other problems. Moreover, the impact of sea state changes on mooring further complicates the already challenging manual mooring process.

[0003] The main reason for these problems is that staff cannot accurately predict the overall on-site environment such as ships, berths, and sea conditions, and that current technology is limited, with monitoring devices having information lag and unable to provide real-time feedback on the status of ships during berthing, thus making it impossible to completely avoid the above problems.

[0004] Therefore, there is an urgent need for a method that can calculate and comprehensively control the real-time movement and changes of a ship in all directions during berthing operations, in order to reduce berthing difficulties and unpredictable impacts on mooring operations. This application proposes a real-time calculation method and system for six degrees of freedom of ships based on lidar point clouds. The system analyzes, denoises, and identifies feature points from the data collected by the data acquisition equipment. It measures the motion of the feature points and simultaneously calculates the motion of the entire ship. The system analyzes and predicts the on-site situation to form a new ship feature point recognition algorithm. Summary of the Invention

[0005] To address the difficulties and practical challenges in existing ship mooring operations, which make it difficult to grasp the overall ship's course and the impact of sea conditions, this invention first proposes a real-time calculation method for the six degrees of freedom of a ship based on lidar point clouds, specifically including the following steps: Step S1: Preprocess the collected ship hull point cloud data, including noise reduction of ground point cloud and water point cloud. Step S2: Filter the preprocessed point cloud data to remove discrete abnormal point clouds; Step S3: Perform Euclidean clustering on the filtered point cloud data and extract the cluster with the most point clouds as the hull point cloud. Step S4: Perform feature recognition on the hull point cloud. The hull point cloud is then subjected to the following steps in sequence: plane segmentation, edge line extraction, and corner point calculation to obtain the feature data of the hull point cloud. Step S5: Based on the feature data, calculate the optimal rigid body transformation matrix between two adjacent frames of ship hull point clouds using the iterative nearest point algorithm. Step S6: Calculate the six degrees of freedom motion and acceleration of the hull based on the optimal rigid body transformation matrix.

[0006] Furthermore, in step S1, removing ground point clouds further includes: iteratively fitting the ground plane model using a random sampling consensus algorithm, marking point clouds belonging to the ground plane model as ground point clouds and removing them.

[0007] Furthermore, in step S1, removing water point clouds further includes: identifying and fitting water planes based on the reflection intensity, normal vector, and curvature characteristics of the point clouds, marking point clouds belonging to the water planes as water point clouds and removing them.

[0008] Furthermore, in step S2, filtering includes: calculating the average distance between each target point in the point cloud and its K nearest neighbors, constructing a Gaussian distribution model based on the statistical values ​​of the average distance of all points, and removing points whose average distance exceeds the set range of the model as outliers.

[0009] Furthermore, in step S3, the method further includes: selecting a seed point from all unclustered points, grouping neighboring points whose Euclidean distance to the seed point is less than a set threshold into the same cluster, and iteratively growing until no new points are added to form multiple point cloud clusters; counting the number of point clouds in each cluster, and identifying the cluster with the most point clouds as the hull point cloud.

[0010] Furthermore, in step S4, the hull point cloud is segmented into planes to extract the point cloud that constitutes the main plane of the hull. Extract the edge lines of the hull based on the intersection lines of adjacent planes; Calculate the key corner points of the bow and stern of the ship based on the spatial intersection points of multiple planes.

[0011] Furthermore, step S5 also includes: calculating the centroids of the target point cloud P and the reference point cloud Q; and using the singular value decomposition algorithm to solve for the rotation matrix R and translation vector t that minimizes the mean square error between corresponding points of the two sets of point clouds, as the optimal rigid body transformation matrix.

[0012] Furthermore, step S5 also includes: applying the optimal rigid body transformation matrix to the point cloud, calculating the mean square error between the transformed point cloud and the reference point cloud, and iteratively optimizing until the error converges or reaches the preset number of iterations, to obtain the final ship point cloud position and attitude.

[0013] Furthermore, in step S6, the six degrees of freedom motion quantities include real-time values ​​of sway, pitch, heave, roll, pitch, and yaw.

[0014] According to another aspect of the present invention, a real-time computing system for six degrees of freedom of ships based on lidar point clouds is also proposed. The system is applicable to any of the above-mentioned methods for real-time computing systems for six degrees of freedom of ships based on lidar point clouds, and specifically includes the following modules: The point cloud data preprocessing module is used to perform noise reduction and filtering on the collected ship hull point cloud data; The hull point cloud extraction module is connected to the point cloud data preprocessing module and is used to extract the hull point cloud from the preprocessed point cloud through Euclidean clustering. The feature recognition module is connected to the hull point cloud extraction module and is used to perform feature recognition on the hull point cloud to obtain feature data including planes, edge lines and corners. The matching calculation module, connected to the feature recognition module, is used to calculate the optimal rigid body transformation of the ship's hull point cloud in adjacent frames based on the iterative nearest point algorithm, and to solve for the six degrees of freedom motion of the ship's hull.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: Firstly, the real-time calculation method for six degrees of freedom of ships using lidar point clouds in this invention processes the point cloud data to find the boundary and centroid of the point cloud feature data in the point cloud data, so as to obtain the main direction of the ship's motion. It continues to iterate to calculate the optimal rigid body transformation between two point clouds, so as to obtain the core of the motion of any two adjacent frames of the ship, so as to achieve comprehensive control of the ship's motion. This method achieves high-precision and real-time calculation of the motion of the ship under six degrees of freedom, including sway, pitch, heave, roll, pitch, and bow roll. Secondly, by setting a threshold to construct proximity relationships, closely connected points are aggregated into a cluster. Then, the largest cluster is selected from these clusters as the ship's point cloud, thereby achieving nearest point search. Singular value decomposition is used to solve for the optimal transformation matrix, and the ship's attitude is iteratively optimized to minimize the errors caused by sea conditions and human operation. Thirdly, when performing noise reduction and noise removal operations, this invention significantly reduces the point cloud density through voxel grid filtering, thereby reducing the amount of computation and the amount of error, improving the speed and accuracy of real-time calculation, and also improving the reliability of the entire calculation method. This provides stable and accurate data support for ship berthing operations and minimizes the impact of external factors. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 Flowchart of a method for real-time calculation of six degrees of freedom of a ship for lidar point clouds; Figure 2 A structural diagram of a six-degree-of-freedom real-time computing system for LiDAR point clouds on a ship. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] The specific embodiments of the present invention will be described below.

[0020] To address the challenges of monitoring the overall environment of berths and sea conditions in existing technologies, as well as the lack of records for ship berthing operations that hinder retrieval, a non-contact monitoring and prediction method is proposed. This method enables real-time calculations of ship movements. By processing point cloud data, the boundaries and centroids of point cloud feature data are identified to determine the main direction of ship motion. Iterative calculations of the nearest point are then performed to determine the optimal rigid body transformation between two point clouds, thus revealing the core motion of the ship in any two adjacent frames. This provides technical support for the stability, safety, and adaptability of ship mooring operations, solving the challenges of ensuring mooring safety for ships susceptible to sea conditions and those requiring high stability.

[0021] Example 1 like Figure 1 As shown, this invention proposes a real-time calculation method for six degrees of freedom of ships based on lidar point clouds, which specifically includes the following steps: Step S1 involves preprocessing the collected ship hull point cloud data, including denoising of both ground and water point clouds. Preprocessing the collected ship hull point cloud data involves removing noise from the data. This removal is divided into ground noise removal and water noise removal. Ground noise removal removes outliers from the LiDAR scans, while water noise removal removes outliers where the LiDAR reflection intensity is lower than the ground level. Since the core function of radar is to perform precise three-dimensional measurements of ships berthed at docks via high-speed laser scanning, accurate to ±2cm, it can accurately capture the surface contours and subtle motion changes of ships, providing crucial spatial position data for calculating the six degrees of freedom motion of the ship. The binocular imaging sensor, through stereo imaging technology, provides a stable and accurate image data source for real-time calculation of ship sway, pitch, heave, roll, pitch, bow roll, and bow-stern acceleration monitoring. Noise removal based on data obtained from such equipment ensures the accuracy of real-time calculations.

[0022] The removal of ground point clouds further includes: iteratively fitting a ground plane model using a random sampling consensus algorithm, marking point clouds belonging to the ground plane model as ground point clouds and removing them. Ground clutter removal involves randomly sampling to fit the plane with the widest coverage area and removing points within that plane. Specifically, when detecting outliers in a LiDAR scan, the point cloud density is first reduced using voxel grid filtering, followed by initialization through random sampling and then iterative calculation, as shown in the following equation: ; Where N is the number of iterations, and the inlier rate is the point cloud density; Three non-collinear points a, b, and c are randomly selected, and a planar model is fitted. The expression of the planar model is: ; Where d is a set distance threshold, and points in the point cloud data that are less than or equal to d are taken as ground points; Calculate the perpendicular distance from all points to the plane using the following formula: ; The number of inliers with a distance less than or equal to d is counted. If the number of inliers exceeds k and is the current optimal value, the planar model is updated, where k is the minimum number of inliers. Points in the optimal plane are marked and retained, and the remaining points are removed as non-ground points. This process removes ground anomalies from the LiDAR scan.

[0023] The removal of water point clouds further includes: identifying and fitting water planes based on the reflection intensity, normal vector, and curvature characteristics of the point clouds; marking point clouds belonging to the water planes as water point clouds and removing them. When ground clutter removal is performed before water clutter removal, since both the water surface and the ground in the dock scene are planes, but there are differences in reflection intensity, normal vector, and curvature, the water clutter removal process includes removing outliers where the reflection intensity of the LiDAR scan is lower than that of the ground. Based on the point cloud after ground clutter removal, suspected water points are marked. Suspected water points include: water surface normal vectors that are nearly vertical; water surfaces are smooth planes, so their curvature is close to 0; and the reflection intensity of the LiDAR on the water surface is usually significantly lower than that on the ground.

[0024] Three more suspected water body points are randomly sampled to fit a water surface plane. The consistency of the mean reflection intensity and normal vector of the points within the plane is verified. The consistency of the mean reflection intensity and normal vector of the points within the plane is further verified to ensure that the fitted plane is a water body and not another plane. The consistent points are determined as interior points of the fitted plane, and the remaining points are removed from the point cloud.

[0025] Step S2 involves filtering the preprocessed point cloud data to remove discrete outliers. Filtering includes: calculating the average distance between each target point and its K nearest neighbors; constructing a Gaussian distribution model based on the statistical values ​​of the average distances of all points; and removing points whose average distances exceed the model's set range as outliers. The preprocessed point cloud data is then filtered and denoised. A target point is set, the average distance between the target point and its neighbors is calculated, neighbors are determined based on the point cloud density obtained from the LiDAR, the Gaussian distribution parameters of the distances between the target point and most neighbors are statistically analyzed, outliers deviating from the range are removed, and the denoised point cloud is output. Here, the number of neighbors is set to K, which is typically chosen as 10-20 in practical applications to balance computational complexity and statistical reliability.

[0026] The deviation coefficient is n, which takes a value of 1.0-2.0. Generally, the smaller n is, the more stringent the noise reduction is.

[0027] Calculate the average distance d from each point in the original point cloud to K. avg Set the average distance d avg To calculate the characteristic distance, the mean and standard deviation of the characteristic distance are calculated based on the Gaussian distribution parameters, such as: in, It is the mean of the average distance across the entire point cloud. It is the standard deviation of the average distance of the entire point cloud. It is a standard multiplier; Remove points whose distance is greater than the average distance and remove them as outliers.

[0028] Step S3 involves performing Euclidean clustering on the filtered point cloud data and extracting the cluster with the most points as the ship's hull point cloud. This includes selecting a seed point from all unclustered points, grouping neighboring points whose Euclidean distance to the seed point is less than a set threshold into the same cluster, and iteratively growing this cluster until no new points are added, forming multiple point cloud clusters. The number of points in each cluster is counted, and the cluster with the most points is identified as the ship's hull point cloud. By extracting the ship's hull point cloud through Euclidean clustering, using the Euclidean distance between two points in the point cloud as a metric, and constructing proximity relationships by setting a threshold, closely connected points are clustered into a single cluster. The largest cluster is then selected as the ship's hull point cloud, enabling rapid ship location and data extraction. In complex point clouds at the dock, the ship's hull target is accurately separated and extracted, providing data support for subsequent applications such as ship berthing monitoring and tonnage estimation.

[0029] Specifically, let any two points in the point cloud be point1(x1,y1,z1) and point2(x2,y2,z2), and let the Euclidean distance formula D be: ; Set the distance threshold to D. 距离 , making D 距离 The value is taken as 0.3m-0.8m, with 0.3m-0.5m for small vessels and 0.5m-0.8m for large vessels. After calculation, the value is greater than 2D. 距离 The distance directly reflects the physical distance between two points in three-dimensional space, indicating that points on the same object's surface are relatively close in space. In the dock scene, the ship hull is the largest entity besides the ground, and its point cloud contains far more points than other objects. Therefore, after clustering, the largest cluster has a strong correspondence with the ship hull. This prior knowledge can quickly filter out interfering clusters without requiring complex feature recognition.

[0030] First, randomly select a point from all unclustered points as a seed point. Add the seed point to each of its neighboring clusters and mark the clusters containing the seed point as clustered. Using a tree-like data structure, find all neighboring points of the seed point. Further, filter and mark unclustered points whose Euclidean distance from the seed point is less than D. 距离 The selected points are added to the cluster, and the selected points are used as new seed points to form new clusters, until no more points can be added. All clusters are then numbered.

[0031] The clusters with the most point clouds in each numbered cluster are further filtered, and the cluster with the most point clouds is designated as the hull cluster. This hull cluster is then output as the hull point cloud, while other numbered clusters are retained. Cluster information is statistically analyzed: the number of point clouds in each cluster is calculated, and the size data of all clusters is recorded. Based on prior knowledge of the wharf berth dimensions, if the spatial span of a candidate cluster exceeds a reasonable range, the second largest cluster is selected for re-validation to avoid interference from outlier aggregations.

[0032] Step S4 involves feature recognition of the hull point cloud to obtain feature data including planes, edge lines, and corner points. Planar segmentation is performed on the hull point cloud to extract the point cloud that constitutes the main planes of the hull. Edge lines of the hull are extracted based on the intersection lines of adjacent planes. Key corner points of the bow and stern of the hull are calculated based on the spatial intersection points of multiple planes. Specifically, feature recognition of the hull point cloud involves sequentially performing plane segmentation, edge line extraction, and corner point calculation to obtain the feature data of the hull point cloud.

[0033] The planar segmentation process involves: collecting three points to generate a pre-plane; calculating the distance from all points to the plane; filtering out interior points with a distance less than d; and iterating multiple times to select the plane with the most interior points as the valid plane. The ship's hull is then fitted, followed by the deck. The plane with the most interior points is typically the horizontal plane, with its normal vector close to the z-axis, and the port and starboard sides are also fitted. The deck is characterized by being a vertical or inclined plane, with its normal vector close to key planes such as the x-axis and y-axis. Overfitting is avoided by removing interior points from already fitted planes.

[0034] Since the edge of the hull is the intersection of two planes, continuous edge lines can be obtained by performing Euclidean distance clustering on the edge points. Edge line extraction is as follows: the edge line is the intersection of two effective planes. The normal vector is obtained through eigenvalue decomposition of the covariance matrix of neighboring points. The angle between the current point and the normal vector of K is calculated. If the angle is greater than a threshold, the point is considered an edge point. Continuous edge lines are obtained by performing Euclidean distance clustering on the edge points.

[0035] Corner point calculation: Locate the planes of the bow, stern, bow and stern of the hull in the hull point cloud, the port side of the bow and stern, and the starboard side of the bow and stern, and set a protruding point set to fit the bow plane. Using the port side edge line of the bow and stern and the starboard side edge line of the bow and stern as spatial straight lines, calculate the spatial intersection point, and then calculate all corner points.

[0036] Step S5, based on feature data, calculates the optimal rigid body transformation matrix between two adjacent frame ship point clouds using the iterative nearest point algorithm. This also includes calculating the centroids of the target point cloud P and the reference point cloud Q. The rotation matrix R and translation vector t that minimize the mean square error between corresponding points in the two sets of point clouds are obtained using the singular value decomposition algorithm, serving as the optimal rigid body transformation matrix. Point cloud matching calculations are performed based on the feature data, calculating the boundaries and centroids of the point cloud feature data to obtain the main direction of ship motion. The iterative nearest point algorithm is then used to calculate the optimal rigid body transformation between the two point clouds, thus obtaining the core of the ship's motion in any two adjacent frames. In practical applications, point cloud recognition algorithms accurately segment the target ship from scenes containing docks, water surfaces, ships, and other debris, and then calculate the oriented bounding box and centroid of each segmented ship point cloud. Among these, the ICP algorithm (Iterative Closest Point) is widely used in 3D reconstruction and visual SLAM for point cloud registration. By iteratively finding the optimal rotation and translation matrix between the two sets of point clouds, the optimal rigid body transformation between the two point clouds is calculated to obtain the core of the ship's motion in the two frames before and after.

[0037] Specifically, the optimal rigid body transformation matrix is ​​applied to the point cloud, the mean square error between the transformed point cloud and the reference point cloud is calculated, and iterative optimization is performed until the error converges or the preset number of iterations is reached, thus obtaining the final position and attitude of the ship's point cloud. Specifically, two points are set as p and q, where p is the closest point and q is the corresponding point with the closest Euclidean distance. The centroids of the two point clouds are: ; ; in, Let P be the centroid. Let p be the centroid of point q, N be the number of iterations, and p be the centroid of point q. i For any point p, q i Let be any point q.

[0038] The ICP algorithm is an algorithm used for point cloud registration. It iteratively finds the optimal rotation and translation matrix between two sets of point clouds, thus achieving precise alignment. The ICP algorithm calculates the optimal rigid body transformation between two point clouds and sets the target point cloud. With reference point cloud If the overall error is minimized, then: ; in, , p i With q i These are corresponding points.

[0039] The optimal transformation matrix for the centroid transformation is then determined through Singular Value Decomposition (SVD) calculation, followed by separation. The transformation is then applied to the point cloud to calculate the target point cloud. With reference point cloud The mean square error between the two values ​​is used to iterate multiple times to obtain the position and attitude of the ship point cloud.

[0040] The centroid coordinates are obtained by calculation. , Next, calculate the covariance matrix. The covariance matrix is ​​obtained by performing SVD decomposition. The optimal rotation is The optimal translation is .

[0041] Applying the calculated transformation results to the point cloud P yields the following result. Iteratively compare the transformed points with the reference point cloud. If the mean square error between the steps exceeds the threshold or the number of iterations has not been reached, the process will return to the previous step to continue.

[0042] Step S6: Based on the optimal rigid body transformation matrix, calculate the six degrees of freedom (DOF) motion and acceleration of the hull. The six DDF motion includes real-time values ​​under sway, pitch, heave, roll, pitch, and bow roll. The hull's six DDF and acceleration are obtained based on the point cloud matching calculation results. The specific values ​​of the bow, stern, and bow-stern planes, as well as the edge lines of the bow and stern relative to the port and starboard sides, are calculated, along with the motion values ​​of each part. This yields real-time data for the ship's six DDF and the acceleration at each point.

[0043] This invention presents a real-time calculation method for six degrees of freedom (DOF) of ship motion using lidar point clouds. It employs non-contact monitoring to calculate and predict the ship's overall motion. By processing point cloud data, it identifies the boundaries and centroids of the point cloud feature data to determine the main direction of the ship's motion. It then iteratively calculates the optimal rigid body transformation between two point clouds using the nearest point, thus obtaining the core of the ship's motion in any two adjacent frames. This enables comprehensive control over the ship's motion and allows for high-precision, real-time calculation of the six DDF motions: sway, pitch, heave, roll, pitch, and bow. By setting thresholds to construct proximity relationships, closely connected points are clustered into a single cluster. The largest cluster is then selected as the ship's point cloud for nearest point search. Singular value decomposition is used to solve for the optimal transformation matrix, and the ship's attitude is iteratively optimized. This achieves high-precision, real-time calculation of the ship's overall motion and its six DDF motions, minimizing errors caused by sea conditions and human intervention.

[0044] Example 2 like Figure 2As shown, the present invention also proposes a real-time computing system for six degrees of freedom of ships based on lidar point clouds, using the real-time computing method for six degrees of freedom of ships based on lidar point clouds as described in any of Embodiment 1, including the following modules: The point cloud data preprocessing module is used to denoise and filter the collected ship hull point cloud data, remove noise and filter the collected ship hull point cloud data, and classify and remove noise from the ship hull point cloud data. The hull point cloud extraction module is connected to the point cloud data preprocessing module. It is used to extract the hull point cloud from the preprocessed point cloud through Euclidean clustering. Based on the preprocessed hull point cloud data, it calculates the point cloud clusters composed of adjacent points and selects the largest point cloud cluster as the hull point cloud. The feature recognition module is connected to the hull point cloud extraction module. It is used to perform feature recognition on the hull point cloud, obtain feature data including planes, edge lines and corners, extract features from the hull point cloud, perform plane segmentation, edge line extraction and corner calculation to obtain the feature data of the hull point cloud, and obtain the motion core of the hull point cloud. The matching calculation module, connected to the feature recognition module, is used to calculate the optimal rigid body transformation of the ship's hull point cloud in adjacent frames based on the iterative nearest point algorithm, and to solve for the six degrees of freedom motion of the ship's hull. It is also connected to the feature recognition module to match and compare the acquired point cloud data with the recognized point cloud to obtain the six degrees of freedom and acceleration of the ship's hull.

[0045] The present invention provides a real-time six-degree-of-freedom calculation system for ship point clouds using lidar. Through non-contact monitoring technology, the present invention significantly reduces point cloud density by using voxel grid filtering during noise reduction and noise removal operations. This reduces the amount of computation and the amount of error, improves the speed and accuracy of real-time calculation, and enhances the reliability of the entire calculation method. It provides stable and accurate data support for ship berthing operations and minimizes the influence of external factors.

[0046] Example 3 An electronic device, comprising: Processor and memory; The processor executes the steps of the real-time calculation method for a six-degree-of-freedom ship laser radar point cloud, as described in any of Embodiment 1, by calling programs or instructions stored in memory.

[0047] Example 4 A computer-readable storage medium includes computer program instructions that cause a computer to perform the steps of a real-time calculation method for a six-degree-of-freedom ship laser radar point cloud as described in any of Embodiment 1.

[0048] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A real-time calculation method for six degrees of freedom of ships based on lidar point clouds, characterized in that, Includes the following steps: Step S1: Preprocess the collected ship hull point cloud data, including noise reduction processing of ground point cloud and water point cloud. Step S2: Filter the preprocessed point cloud data to remove discrete abnormal point clouds; Step S3: Perform Euclidean clustering on the filtered point cloud data and extract the cluster with the most point clouds as the hull point cloud. Step S4: Perform feature recognition on the hull point cloud to obtain feature data including planes, edge lines, and corner points; Step S5: Based on the feature data, calculate the optimal rigid body transformation matrix between two adjacent frames of ship hull point clouds using the iterative nearest point algorithm. Step S6: Calculate the six degrees of freedom motion and acceleration of the hull based on the optimal rigid body transformation matrix.

2. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 1, characterized in that, In step S1, removing ground point clouds further includes: iteratively fitting a ground plane model using a random sampling consensus algorithm, marking point clouds belonging to the ground plane model as ground point clouds and removing them.

3. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 2, characterized in that, In step S1, removing water point clouds further includes: identifying and fitting water planes based on the reflection intensity, normal vector, and curvature characteristics of the point clouds, marking point clouds belonging to the water planes as water point clouds and removing them.

4. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 3, characterized in that, In step S2, the filtering includes: calculating the average distance between each target point in the point cloud and its K nearest neighbors, constructing a Gaussian distribution model based on the statistical values ​​of the average distance of all points, and removing points whose average distance exceeds the set range of the model as outliers.

5. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 4, characterized in that, In step S3, the method further includes: selecting a seed point from all unclustered points, grouping neighboring points whose Euclidean distance to the seed point is less than a set threshold into the same cluster, and iteratively growing until no new points are added to form multiple point cloud clusters; counting the number of point clouds in each cluster, and identifying the cluster with the most point clouds as the hull point cloud.

6. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 5, characterized in that, In step S4, the hull point cloud is segmented into planes to extract the point cloud that constitutes the main plane of the hull. Extract the edge lines of the hull based on the intersection lines of adjacent planes; Calculate the key corner points of the bow and stern of the ship based on the spatial intersection points of multiple planes.

7. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 6, characterized in that, Step S5 further includes: calculating the centroids of the target point cloud P and the reference point cloud Q; and using the singular value decomposition algorithm to solve for the rotation matrix R and translation vector t that minimizes the mean square error between corresponding points of the two point clouds, as the optimal rigid body transformation matrix.

8. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 7, characterized in that, In step S5, the method further includes: applying the optimal rigid body transformation matrix to the point cloud, calculating the mean square error between the transformed point cloud and the reference point cloud, and iteratively optimizing until the error converges or reaches the preset number of iterations, to obtain the final ship point cloud position and attitude.

9. The method for real-time calculation of six degrees of freedom of a ship using lidar point clouds according to claim 8, characterized in that, In step S6, the six degrees of freedom motion quantities include real-time values ​​under the action of sway, pitch, heave, roll, pitch and yaw.

10. A real-time calculation system for six degrees of freedom of a ship using lidar point clouds, the system being applicable to the real-time calculation method for six degrees of freedom of a ship using lidar point clouds as described in any one of claims 1 to 9, characterized in that, Specifically, it includes the following modules: The point cloud data preprocessing module is used to perform noise reduction and filtering on the collected ship hull point cloud data; The hull point cloud extraction module is connected to the point cloud data preprocessing module and is used to extract the hull point cloud from the preprocessed point cloud through Euclidean clustering segmentation. The feature recognition module is connected to the hull point cloud extraction module and is used to perform feature recognition on the hull point cloud to obtain feature data including planes, edge lines and corner points. The matching calculation module, connected to the feature recognition module, is used to calculate the optimal rigid body transformation of the ship's hull point cloud in adjacent frames based on the iterative nearest point algorithm, and to solve for the six degrees of freedom motion of the ship's hull.