A ship berthing position detection method and system based on a shore end laser radar
Patent Information
- Application Number
- CN202511365493.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2045-09-23
AI Technical Summary
[0005]为解决传统靠泊位置检测过程中存在的主观性强、易受天气影响以及难以实现全船体动态监测等问题,本发明提供了一种基于岸端激光雷达的船舶靠泊位置检测方法,能够有效解决码头复杂场景中船舶位置检测的漂移、抖动及干扰抑制问题,实现毫米级实时监测与分级预、报警
[0030]本发明提供的一种基于岸端激光雷达的船舶靠泊位置检测方法,先在岸端的不同位置部署多台激光雷达,以扩大扫描视野,避免单台雷达因遮挡或角度问题导致点云缺失,提高对船舶整体轮廓的覆盖度。通过异步线程模型并行采集原始点云数据,提高了系统响应速度和数据吞吐能力,能有效应对多雷达系统中可能出现的通信延迟或处理速度差异。再根据安装姿态参数构建刚性变换矩阵对原始点云数据进行坐标校正,消除安装激光雷达所带来的安装偏差(即消除安装偏角导致的拼接错位问题),实现高精度空间对齐,极大的减小了检测误差。然后对融合点云数据进行多级复合滤波处理,确保激光雷达所扫描的区域是船体,逐级剔除超出预设空间范围的无效点云、剔除融合点云数据中缆绳及岸线的环境干扰点、剔除离群点抑制动态噪声干扰点,以保留船舶目标的有效点云,提高检测精度,引入多级复合滤波模式得到有效点云用来计算船舶位置与姿态动态。并通过迭代最近点算法ICP将当前滤波后融合点云数据与滤波后历史点云数据进行配准计算得到配准变换矩阵,从配准变换矩阵中提取出船舶的姿态角,从而实现船舶姿态动态更新。然后提取码头前沿预设坐标范围内的3D几何边缘点作为近岸点云,基于近岸点云计算船岸最小距离,以聚焦于当前靠泊船舶区域,排除远岸侧船体、相邻船舶及码头设施干扰,确保后续计算基于真实靠岸侧数据。再结合AIS船艏向与分割阈值,沿X轴分割船艏/船艉区域,以适应不同靠泊方向(船头朝X正/负方向),避免误判,提升算法通用性;并对船艏/船艉点云按Y坐标排序,选取前N个边缘点求坐标平均值,通过优先保留最贴近岸线的点,抑制因船体倾斜或点云稀疏导致的噪声影响,获得稳定、抗抖动的空间位置代表值,提高靠泊检测鲁棒性。最后构建状态机驱动决策机制判断岸桥状态与船舶靠泊状态以确定检测模式,通过引入状态机驱动决策机制,将检测频率动态调整,有效降低了算力需求和响应延迟,通过岸桥状态与船舶状态联合判断,智能切换靠泊/在泊检测模式,避免非作业时段误触发报警,提升系统智能化水平,在靠泊检测模式下,通过比对实际船艏/船艉位置与预期船艏/船艉位置,可及时发现靠泊偏移、斜靠等问题,防止碰撞码头设备;在泊检测模式下,以首次检测距离为基准计算漂移量,消除绝对定位误差影响,提高相对位移检测精度。此外,将漂移距离、姿态角及其变化率与多级阈值比对进行分级预警与报警,通过引入多级阈值分级响应机制(预警+报警),预警用于提示轻微漂移或姿态变化,提醒操作人员关注,实现在船舶碰撞前预警,降低碰撞风险;报警则用于严重偏离,触发紧急通知或联动控制系统,同时监测漂移距离与姿态角变化率,兼顾位置偏移与运动趋势,避免漏报突发性剧烈晃动;实现了从“静态检测”到“动态连续监控”的跨越,满足高安全等级港口对船舶在泊状态的全天候、自动化监测需求。
Smart Images

Figure CN121091297B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lidar-assisted berthing technology, specifically to a method and system for detecting the berthing position of a ship based on shore-based lidar. Background Technology
[0002] Ship berthing is a core aspect of port operations, and the accuracy of its position detection directly impacts berthing safety and efficiency. According to statistics from the International Association of Ports and Harbors, global ports suffer annual losses exceeding $1 billion due to berthing collisions, and this risk continues to rise with increasing port throughput and the proliferation of larger vessels.
[0003] Traditional berthing position detection mainly relies on manual visual judgment, fixed sensors at the dock (such as pressure sensors, displacement sensors, and laser rangefinders), or shipboard equipment. However, these methods have significant limitations: manual judgment is highly subjective and susceptible to weather conditions; fixed sensors have limited coverage, making it difficult to achieve dynamic monitoring of the entire ship; shipboard equipment is limited by its installation location, cannot reflect the actual distance to the shore, and data sharing suffers from delays and interface barriers.
[0004] Therefore, there is an urgent need to develop a shore-based lidar method for detecting ship berthing positions in mobile environments. This method should effectively suppress nonlinear motion distortion, have strong anti-interference capabilities, and achieve precise integration with AIS information to improve the intelligent and accurate monitoring level of the berthing process. Summary of the Invention
[0005] To address the problems of high subjectivity, susceptibility to weather conditions, and difficulty in achieving full-hull dynamic monitoring in traditional berthing position detection methods, this invention provides a ship berthing position detection method based on shore-based lidar. This method effectively solves the drift, jitter, and interference suppression problems in complex dock environments, achieving millimeter-level real-time monitoring and tiered early warning and alarm functions. This invention also relates to a ship berthing position detection system based on shore-based lidar.
[0006] The technical solution of the present invention is as follows:
[0007] A method for detecting the berthing position of a ship based on shore-based lidar, characterized by comprising the following steps:
[0008] Parallel acquisition and fusion steps of multi-radar data: Multiple lidars are deployed at different locations on the shore, and the raw point cloud data of the ship detected by each lidar is acquired in parallel through an asynchronous thread model; then, a corresponding rigid transformation matrix is constructed according to the installation attitude parameters of each lidar, and the raw point cloud data is coordinate corrected using the rigid transformation matrix. The coordinate corrected raw point cloud data is then fused to generate fused point cloud data in a unified world coordinate system; the world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis.
[0009] Point cloud filtering and attitude angle extraction steps: The fused point cloud data is subjected to multi-level composite filtering, including spatial range filtering, environmental interference filtering and noise suppression filtering. The fused point cloud data after multi-level composite filtering at the current moment is registered with the historical point cloud data after the same multi-level composite filtering in advance by the iterative nearest point algorithm to obtain the registration transformation matrix. The attitude angle of the ship is extracted from the registration transformation matrix.
[0010] The steps for calculating distance and average coordinates are as follows: First, extract all 3D geometric edge points within a preset coordinate range at the wharf's edge from the fused point cloud data after multi-level composite filtering. This is used as nearshore point cloud data. Based on the nearshore point cloud data and the Euclidean distance method, calculate the minimum ship-shore distance. Then, based on the bow direction in the pre-acquired ship AIS data and a preset segmentation threshold, segment the nearshore point cloud data along the x-axis into bow and stern point clouds. Sort all 3D geometric edge points in the bow and stern point clouds according to their ordinate values from smallest to largest, generating bow and stern point cloud sequences. Select a certain number of 3D geometric edge points within the bow and stern point cloud sequences, respectively, and denote them as the bow edge point set and stern edge point set. Calculate the average coordinates of the bow and stern edge point sets, respectively, as the average coordinates of the bow and stern regions.
[0011] Berthing position detection and alarm steps: A state machine-driven decision-making mechanism is constructed. The state machine-driven decision-making mechanism determines the detection mode by judging the status of the quay crane and the berthing status of the ship. When it is determined that the quay crane is in a prohibited movement state and the ship is not in a berthing state, the berthing detection mode is entered. The bow area coordinate average x-coordinate deviation value and the pre-acquired expected bow position x-coordinate are calculated respectively, as well as the stern area coordinate average x-coordinate deviation value and the pre-acquired expected stern position x-coordinate are calculated respectively. The bow deviation value and the stern deviation value are compared with the first preset threshold respectively. If the bow deviation value or the stern deviation value is greater than the preset deviation threshold, the berthing inaccurate alarm is triggered.
[0012] When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-to-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-to-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are then compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame rate of change of the attitude angle exceeds the preset rate of change threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
[0013] Preferably, in the multi-radar data parallel acquisition and fusion step, the ship's AIS data is also acquired, and the fused point cloud data is clustered to obtain at least one point cloud target cluster and its center position; then the ship's latitude and longitude coordinates in the AIS data are transformed to a world coordinate system consistent with the fused point cloud data to obtain the AIS ship position; and the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship is calculated using the Euclidean distance method, and the AIS ship with the smallest spatial distance that is less than a preset matching threshold is identified as the current detection target, thus completing the ship identity matching.
[0014] Preferably, in the point cloud filtering and attitude angle extraction steps, the multi-level composite filtering process includes using pass-through filtering to constrain the spatial range of the fused point cloud data, using conditional filtering to eliminate environmental interference from cables and shorelines in the fused point cloud data, and using outlier suppression methods to eliminate dynamic noise interference in the fused point cloud data.
[0015] Preferably, in the step of calculating the distance and average coordinates, the calculation of the minimum ship-to-shore distance based on nearshore point cloud data and using the Euclidean distance method specifically includes: calculating the vertical distance between each 3D geometric edge point and the wharf shoreline based on the coordinates of each 3D geometric edge point in the nearshore point cloud data and using the Euclidean distance method, and taking the minimum vertical distance as the minimum ship-to-shore distance.
[0016] Preferably, in the step of calculating the distance and average coordinates, dividing the near-shore point cloud data into bow and stern point clouds along the x-axis specifically includes:
[0017] First, determine the ship's heading based on its bow direction. If the bow direction is in the positive direction of the x-axis, set a segmentation threshold along the x-axis. 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than the segmentation threshold are classified as stern region point clouds. If the bow direction is in the negative direction of the x-axis, then 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than the segmentation threshold are classified as stern region point clouds.
[0018] A ship berthing position detection system based on shore-based lidar is characterized by comprising, in sequence, a multi-radar data parallel acquisition and fusion module, a point cloud filtering and attitude angle extraction module, a distance and coordinate mean calculation module, and a berthing position detection and alarm module.
[0019] The multi-radar data parallel acquisition and fusion module deploys multiple lidars at different locations on the shore, and acquires the raw point cloud data of the ship detected by each lidar in parallel through an asynchronous thread model. Then, it constructs a corresponding rigid transformation matrix based on the installation attitude parameters of each lidar, uses the rigid transformation matrix to perform coordinate correction on the raw point cloud data, and fuses the coordinate-corrected raw point cloud data to generate fused point cloud data in a unified world coordinate system. The world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis.
[0020] The point cloud filtering and attitude angle extraction module performs multi-level composite filtering on the fused point cloud data, including spatial range filtering, environmental interference filtering, and noise suppression filtering. It then uses an iterative nearest point algorithm to register the fused point cloud data after multi-level composite filtering at the current moment with historical point cloud data that has undergone the same multi-level composite filtering in advance, and obtains a registration transformation matrix. The attitude angle of the ship is then extracted from the registration transformation matrix.
[0021] The distance and coordinate mean calculation module extracts all 3D geometric edge points within a preset coordinate range at the pier's front edge from the fused point cloud data after multi-level composite filtering, using this as nearshore point cloud data. Based on the nearshore point cloud data and using the Euclidean distance method, it calculates the minimum ship-shore distance. Then, based on the bow direction in the pre-acquired ship AIS data and a preset segmentation threshold, it segments the nearshore point cloud data along the x-axis into bow and stern point clouds. All 3D geometric edge points in the bow and stern point clouds are sorted according to their ordinate values from smallest to largest, generating bow and stern point cloud sequences. A certain number of 3D geometric edge points are selected from the bow and stern point cloud sequences, respectively, and denoted as the bow edge point set and stern edge point set. The average coordinates of the bow and stern edge point sets are calculated as the average coordinates of the bow and stern regions, respectively.
[0022] The berthing position detection and alarm module constructs a state machine-driven decision-making mechanism. This mechanism determines the detection mode by judging the status of the quay crane and the berthing status of the vessel. When it is determined that the quay crane is in a prohibited movement state and the vessel is not in a berthing state, the berthing detection mode is entered. The module calculates the deviation value between the horizontal coordinate of the average coordinate of the bow area and the pre-acquired expected horizontal coordinate of the bow position, and the deviation value between the horizontal coordinate of the average coordinate of the stern area and the pre-acquired expected horizontal coordinate of the stern position. The module then compares the bow deviation value and the stern deviation value with a first preset threshold. If the bow deviation value or the stern deviation value is greater than the preset deviation threshold, an inaccurate berthing alarm is triggered.
[0023] When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-to-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-to-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are then compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame rate of change of the attitude angle exceeds the preset rate of change threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
[0024] Preferably, the multi-radar data parallel acquisition and fusion module also acquires the ship's AIS data and performs clustering processing on the fused point cloud data to obtain at least one point cloud target cluster and its center position; then, the ship's latitude and longitude coordinates in the AIS data are transformed to a world coordinate system consistent with the fused point cloud data to obtain the AIS ship position; and the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship is calculated using the Euclidean distance method, and the AIS ship with the smallest spatial distance that is less than a preset matching threshold is identified as the current detection target, thus completing the ship identity matching.
[0025] Preferably, in the point cloud filtering and attitude angle extraction module, the multi-level composite filtering process includes using pass-through filtering to constrain the spatial range of the fused point cloud data, using conditional filtering to eliminate environmental interference from cables and shorelines in the fused point cloud data, and using outlier suppression methods to eliminate dynamic noise interference in the fused point cloud data.
[0026] Preferably, in the distance and coordinate mean calculation module, the calculation of the minimum ship-to-shore distance based on nearshore point cloud data and using the Euclidean distance method specifically includes: calculating the vertical distance between each 3D geometric edge point and the wharf shoreline based on the coordinates of each 3D geometric edge point in the nearshore point cloud data and using the Euclidean distance method, and taking the minimum vertical distance as the minimum ship-to-shore distance.
[0027] Preferably, in the distance and coordinate mean calculation module, dividing the near-shore point cloud data into bow and stern point clouds along the x-axis specifically includes:
[0028] First, determine the ship's heading based on its bow direction. If the bow direction is in the positive direction of the x-axis, set a segmentation threshold along the x-axis. 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than the segmentation threshold are classified as stern region point clouds. If the bow direction is in the negative direction of the x-axis, then 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than the segmentation threshold are classified as stern region point clouds.
[0029] The technical effects of this invention are as follows:
[0030] This invention provides a method for detecting ship berthing position based on shore-based lidar. First, multiple lidars are deployed at different locations on the shore to expand the scanning field of view, avoiding point cloud gaps caused by single lidar obstruction or angle issues, and improving the coverage of the overall ship outline. Asynchronous threading is used to collect raw point cloud data in parallel, improving system response speed and data throughput, effectively addressing potential communication delays or processing speed differences in multi-liquidity systems. Then, a rigid transformation matrix is constructed based on installation attitude parameters to perform coordinate correction on the raw point cloud data, eliminating installation deviations caused by lidar installation (i.e., eliminating splicing misalignment caused by installation angle), achieving high-precision spatial alignment, and significantly reducing detection errors. Next, multi-level composite filtering is applied to the fused point cloud data to ensure that the area scanned by the lidar is the ship hull. Invalid point clouds exceeding a preset spatial range are removed step-by-step, as are environmental interference points from cables and shorelines in the fused point cloud data, and outliers are removed to suppress dynamic noise interference points, thus retaining the effective point cloud of the ship target and improving detection accuracy. The effective point cloud obtained through multi-level composite filtering is used to calculate the ship's position and attitude dynamics. The ICP (Intermediate Closest Point) algorithm is used to register the current filtered and fused point cloud data with the filtered historical point cloud data to obtain a registration transformation matrix. The ship's attitude angle is extracted from the registration transformation matrix, thereby achieving dynamic updates of the ship's attitude. Then, 3D geometric edge points within a preset coordinate range at the wharf's edge are extracted as nearshore point clouds. The minimum ship-shore distance is calculated based on the nearshore point cloud to focus on the area of the currently berthed ship, eliminating interference from the ship's hull on the far shore side, adjacent ships, and wharf facilities, ensuring that subsequent calculations are based on real berthed side data. Combining the AIS bow direction and segmentation threshold, the bow / stern region is segmented along the X-axis to adapt to different berthing directions (bow facing the positive / negative X direction), avoiding misjudgments and improving the algorithm's versatility. The bow / stern point clouds are sorted by Y-coordinate, and the average coordinate of the top N edge points is calculated. By prioritizing the retention of points closest to the shoreline, the noise impact caused by ship tilt or sparse point clouds is suppressed, obtaining stable and vibration-resistant spatial positional representation values, improving the robustness of berthing detection. Finally, a state machine-driven decision-making mechanism is constructed to determine the detection mode by judging the status of the quay crane and the berthing status of the vessel. By introducing the state machine-driven decision-making mechanism, the detection frequency is dynamically adjusted, effectively reducing the computing power requirement and response latency. Through joint judgment of the quay crane status and the vessel status, the berthing / in-berthing detection mode is intelligently switched to avoid false alarms during non-operation periods and improve the system's intelligence level. In the berthing detection mode, by comparing the actual bow / stern position with the expected bow / stern position, problems such as berthing deviation and tilting can be detected in a timely manner to prevent collisions with terminal equipment. In the in-berthing detection mode, the drift amount is calculated based on the initial detection distance to eliminate the influence of absolute positioning error and improve the accuracy of relative displacement detection.Furthermore, the drift distance, attitude angle, and rate of change are compared with multi-level thresholds for graded early warning and alarm. By introducing a multi-level threshold graded response mechanism (early warning + alarm), the early warning is used to indicate slight drift or attitude changes, reminding operators to pay attention and achieving early warning before ship collision, reducing the risk of collision; the alarm is used for serious deviations, triggering emergency notifications or linkage control systems. At the same time, the drift distance and rate of change of attitude angle are monitored, taking into account both position deviation and movement trend, avoiding missed reports of sudden and violent shaking. This realizes the leap from "static detection" to "dynamic continuous monitoring", meeting the all-weather, automated monitoring needs of high-safety-level ports for the berthing status of ships.
[0031] This invention provides a complete, robust, and high-precision shore-based lidar system for detecting ship berthing positions. Through multi-radar collaborative sensing and intelligent data processing, it achieves automated, all-weather, and highly reliable monitoring of the entire ship berthing process. Compared to traditional methods, this solution offers the following significant technical advantages: 1) Improved detection completeness and coverage: By employing distributed deployment of multiple lidars for parallel acquisition, blind spots in the field of view of a single lidar are effectively eliminated, and point cloud distortion caused by nonlinear ship motion is overcome, ensuring continuous and complete ship point cloud data can be acquired even in complex dynamic environments. 2) Achieved high-precision spatial unification and fusion: The introduction of multi-radar fusion and coordinate correction technology greatly reduces detection errors. A rigid transformation matrix is constructed based on the radar installation attitude, accurately correcting multi-source point clouds to a unified world coordinate system with the dock as the reference. This supports seamless integration with systems such as AIS and TOS, providing a unified spatiotemporal reference for cross-system data fusion and intelligent decision-making. 3) Enhanced anti-interference capability and data reliability: Through multi-level composite filtering and near-shore point cloud screening, the introduction of dynamic cables, shoreline shielding zones, and multi-level filtering chains greatly improves the feature retention rate in complex environments, effectively suppressing environmental interference such as water surface reflection, mobile equipment, and fender deformation, and to a certain extent overcoming point cloud distortion caused by rain, fog, and surges; combined with ICP registration and coordinate averaging strategies, noise impact is significantly reduced, and pose calculation stability is improved. 4) Achieve accurate ship identification and dynamic tracking: Spatially matching radar-detected targets with AIS information solves the problem of "seeing but not recognizing," supports target association and independent monitoring in multi-ship berthing scenarios, and improves system practicality and scalability. 5) Support for refined berthing status judgment and graded early warning: By dividing the bow / stern area and calculating the average coordinate, accurate comparison with the expected berthing position is achieved, and berthing deviations are detected in a timely manner; during the berthing phase, multi-level threshold criteria for drift distance and attitude angle change rate are introduced to achieve graded "early warning + alarm" response, balancing safety and operational flexibility. 6) Promote intelligent and unmanned port operations: The entire process does not rely on shipboard equipment and has independent perception capabilities. It can be widely used in scenarios such as automated terminals, intelligent quay crane collision avoidance, and ship berthing safety monitoring, significantly reducing the risk of human misjudgment and improving port operation efficiency and inherent safety level.
[0032] Furthermore, the fused point cloud data is clustered to obtain at least one point cloud target cluster and its center position. The ship latitude and longitude coordinates in the AIS data are then transformed to a world coordinate system consistent with the fused point cloud data to obtain the AIS ship positions. The Euclidean distance method is used to calculate the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship. The AIS ship with the smallest spatial distance that is less than a preset matching threshold is identified as the current detection target, thus completing the ship identity matching. By fusing the position information detected by the lidar with the AIS ship information, the system can identify which ship is being detected. This achieves automatic association between shore-based radar point cloud targets and AIS ship information, solving the target confusion problem in multi-ship environments. It ensures that the system can accurately identify currently berthed ships, providing a reliable identity basis for accurate berthing judgment and berthing status monitoring, while also supplementing the drawback of radar detection data lacking ship information.
[0033] Furthermore, the multi-level composite filtering process includes using spatial range filtering (direct-pass filtering) to constrain the spatial range of the fused point cloud data, retaining the effective area for ship position detection, and removing irrelevant objects (such as other ships or buildings) or invalid points below ground level, thus reducing the processing area and improving efficiency. Conditional filtering is also employed to eliminate environmental interference from cable swaying and shorelines in the fused point cloud data. This environmental interference filtering (conditional filtering) focuses on fixed environmental facilities such as cables and shorelines, accurately removing them using their known characteristics (such as shape and position) to ensure that the area scanned by the lidar is the ship's hull, reducing the false detection rate. Additionally, outlier suppression methods are used to eliminate dynamic noise (such as water wave reflections, birds, rain, fog, dust, etc.) in the fused point cloud data. This noise suppression filtering (outlier suppression, statistical filtering) focuses on dynamic random interference such as water wave reflections, birds, rain, and fog, removing them using their sparse distribution and unstable statistical characteristics, improving the cleanliness and stability of the point cloud, increasing detection accuracy, and greatly enhancing the robustness of the solution.
[0034] This invention also relates to a ship berthing position detection system based on shore-based lidar. This system corresponds to the aforementioned ship berthing position detection method based on shore-based lidar and can be understood as a system that implements the aforementioned ship berthing position detection method based on shore-based lidar. It includes a multi-radar data parallel acquisition and fusion module, a point cloud filtering and attitude angle extraction module, a distance and coordinate mean calculation module, and a berthing position detection and alarm module connected in sequence. Each module works in concert with each other. Through multi-radar synchronous fusion, unified coordinate modeling, point cloud filtering and AIS matching, high-precision, anti-interference, and all-weather detection of ship berthing position is achieved. Combined with bow and stern area division and multi-level threshold criteria, the accuracy of berthing can be accurately judged and drift graded early warning can be achieved, significantly improving the safety and intelligence level of port operations. Attached Figure Description
[0035] Figure 1 This is a flowchart of the ship berthing position detection method based on shore-based lidar of the present invention. Detailed Implementation
[0036] The present invention will now be described with reference to the accompanying drawings.
[0037] This invention relates to a method for detecting ship berthing positions based on shore-based lidar in a mobile environment. Through multi-radar collaborative sensing and a dynamic decision-making mechanism, it solves the problems of drift, jitter, and interference suppression in ship position detection in complex port scenarios. It can indicate whether a ship is berthing accurately and whether drift has occurred, achieving millimeter-level real-time monitoring and tiered pre- and post-alarm functions. It also matches the currently detected ship with AIS ship information, providing high-precision sensing and support for automated port berthing. The flowchart of this method is shown below. Figure 1 As shown, the steps are as follows:
[0038] I. Parallel Acquisition and Fusion Steps for Multi-Radar Data: (e.g.) Figure 1The process includes radar drive initialization, real-time point cloud acquisition, installation deviation compensation, coordinate system transformation, and multi-radar point cloud fusion. Multiple lidar units are deployed at different locations on the shore and initialized with radar drive. Trigger signal generators can also be configured to collect raw point cloud data of the ship detected by each lidar in parallel through an asynchronous thread model. Simultaneously, the trigger signal generators can be controlled to periodically output synchronization pulse signals to the external synchronization interfaces of each lidar, ensuring that multiple lidars collect data at the same time, thus obtaining time-synchronized raw point cloud data of the ship, i.e., real-time point cloud acquisition. Then, a corresponding rigid transformation matrix (used to model installation deviations) is constructed according to the installation attitude parameters of each lidar. The rigid transformation matrix is used to perform coordinate correction on the raw point cloud data, which not only realizes the mathematical compensation of installation deviations, but also transforms the point cloud from the lidar's local coordinate system to a unified world coordinate system. The coordinate-corrected raw point cloud data is then fused to generate fused point cloud data in a unified world coordinate system, eliminating spatial misalignment caused by differences in the installation of multiple lidars and realizing spatiotemporal synchronization and fusion of multi-liquidity point clouds. The world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis.
[0039] Specifically, firstly, multiple multi-line lidar units (such as 16-line, 32-line, or 64-line lidars) are deployed at different locations on the shore (on the port quay crane). The installation attitude parameters (including installation position, pitch angle, yaw angle, roll angle, etc.) of each multi-line lidar are measured using precision measuring instruments such as a total station. Then, the raw point cloud data from each lidar is acquired in parallel using an asynchronous thread model. That is, the system starts an asynchronous thread model, under which an independent data acquisition thread is created for each lidar, and the threads work in parallel, thereby achieving parallel acquisition of raw point cloud data from each multi-line lidar.
[0040] Because the installation positions and angles of each multi-line lidar are different, and the raw point cloud data collected is located in their respective independent local coordinate systems, a rigid transformation matrix (containing rotation and translation transformations, belonging to the hardware-level coordinate correction matrix) is first constructed for each multi-line lidar based on its installation attitude parameters (such as installation position, pitch angle, yaw angle, roll angle, etc.). Subsequently, the rigid transformation matrix is used to perform coordinate correction (also known as mathematical transformation) on each frame of raw point cloud data, and the coordinate-corrected raw point cloud data is then fused to generate fused point cloud data in a unified world coordinate system. This fused point cloud data is used to transform the raw point cloud data collected by each multi-line lidar from its local coordinate system (lidar coordinate system) to a unified world coordinate system (this world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upwards as the z-axis), in order to eliminate installation deviations caused by the installation of the lidars.
[0041] Preferably, the AIS data of the ship is also acquired, and the fused point cloud data is clustered to obtain at least one point cloud target cluster and its center position; then the ship's latitude and longitude coordinates in the AIS data are transformed to a world coordinate system that is consistent with the fused point cloud data to obtain the AIS ship position; and the spatial distance between the center position of each point cloud target cluster and each AIS ship position is calculated using the Euclidean distance method. The AIS ship with the smallest spatial distance and less than a preset matching threshold (such as less than 30 meters) is identified as the current detection target, thus completing the ship identity matching.
[0042] II. Point cloud filtering and attitude angle extraction steps: as follows Figure 1 The process includes multi-level composite filtering correction and attitude analysis. Multi-level composite filtering correction: A multi-level intelligent filter chain is used to perform multi-level composite filtering on the fused point cloud data. This multi-level composite filtering includes spatial range filtering, environmental interference filtering, and noise suppression filtering. Spatial range filtering constrains the spatial range of the fused point cloud data; environmental interference filtering eliminates interference from cables and shorelines; and noise suppression filtering eliminates dynamic noise in the fused point cloud data. Attitude analysis: The iterative nearest-point algorithm is used to register the fused point cloud data after multi-level composite filtering at the current moment with pre-acquired historical point cloud data that has undergone the same multi-level composite filtering, obtaining a registration transformation matrix. The ship's attitude angles are then extracted from the registration transformation matrix.
[0043] Specifically, the fused point cloud data contains a large amount of data from objects such as ships, water surfaces, cables, and shorelines. Filtering is required to extract useful information. Therefore, the fused point cloud data first undergoes multi-level composite filtering. This multi-level composite filtering includes spatial range filtering, such as direct-pass filtering to constrain the spatial range of the fused point cloud data. This involves setting a three-dimensional spatial range (e.g., X: 0–100 meters, Y: -50–50 meters, Z: -10–30 meters), retaining only the fused point cloud data within this range. This range is constrained to areas where ships might appear, thereby removing irrelevant objects (such as other ships or buildings) or invalid points below ground level, reducing the processing area and improving efficiency. Environmental interference filtering is also employed, such as conditional filtering to eliminate interference from fixed environmental facilities like cables and shorelines in the fused point cloud data. This involves setting specific filtering rules based on the intensity and geometric characteristics of the fused point cloud data. For example, filtering out points with intensity characteristics similar to cables, or points with height characteristics consistent with the shoreline (dock edge), thereby eliminating interference from cables and shoreline environments. Noise suppression filtering, such as outlier suppression methods, can be used to eliminate dynamic noise interference in fused point cloud data. This involves statistically analyzing the point density in the neighborhood of each point in the fused point cloud data and removing isolated points whose surrounding point density is significantly lower than the average density. These isolated points are usually dynamic noise, such as birds, splashing water, and sensor misdetections. This method can effectively suppress dynamic noise and improve the cleanliness and stability of the fused point cloud data.
[0044] Then, the iterative nearest point algorithm (also known as the ICP algorithm) is used to register the fused point cloud data of the current moment (current frame) after multi-level composite filtering with the pre-acquired historical point cloud data after the same multi-level composite filtering. The ICP algorithm continuously iterates to find an optimal registration transformation matrix (containing rotation R and translation T, which is a motion registration matrix at the point cloud level) that minimizes the point-to-point distance between the fused point cloud data of the current moment and the historical point cloud data. After registration, a transformation matrix describing the motion of the current frame relative to the historical frame is obtained. The ship's attitude angles (roll and yaw angles) are decomposed and extracted from the rotation matrix, that is, the roll angle (left and right tilt of the hull) around the X-axis and the yaw angle (left and right yaw of the bow) around the Z-axis are extracted. Registration and angle extraction are performed for each frame. The above registration transformation matrix is introduced to extract the roll and yaw angles and update them dynamically, thereby realizing continuous and real-time monitoring of the ship's attitude.
[0045] III. Steps for calculating distance and coordinate mean: (e.g.) Figure 1as shown includes ship-shore distance output, point cloud segmentation (bow / stern), sequence sorting, and coordinate mean calculation. All 3D geometric edge points located within the preset coordinate range at the front of the wharf are extracted from the fused point cloud data processed by multi-level composite filtering as near-shore point cloud data, and the minimum ship-shore distance is calculated using the Euclidean distance method based on the near-shore point cloud data; then, based on the pre-acquired bow direction in the ship's AIS data and the preset segmentation threshold, the near-shore point cloud data is segmented along the x-axis direction into a bow area point cloud and a stern area point cloud; all 3D geometric edge points in the bow area point cloud and the stern area point cloud are respectively sorted in ascending order according to the ordinate values to generate a bow point cloud sequence and a stern point cloud sequence; a certain number of 3D geometric edge points in the front part of the bow point cloud sequence and the stern point cloud sequence are respectively selected, denoted as a bow edge point set and a stern edge point set; and the coordinate average values of the bow edge point set and the stern edge point set are respectively calculated as the bow area coordinate average value and the stern area coordinate average value.
[0046] Specifically, first, all 3D geometric edge points located within the preset coordinate range (for example, Y_min<Y<Y_max) at the front of the wharf are extracted from the fused point cloud data processed by multi-level composite filtering as near-shore point cloud data; that is, from the fused point cloud data processed by multi-level composite filtering, all 3D geometric edge points whose Y coordinates fall within this preset coordinate range are screened out, and this part of the screened 3D geometric edge points is used as near-shore point cloud data, representing the area on the hull that is most likely to be close to the shore crane. Subsequently, according to the coordinates of each 3D geometric edge point in the near-shore point cloud data, the Euclidean distance method is used to calculate the vertical distance between each 3D geometric edge point and the wharf shoreline (which can also be called the shore crane reference plane), and the minimum value among them (i.e., the minimum vertical distance) is taken as the minimum ship-shore distance. This minimum ship-shore distance directly reflects the minimum gap between the ship and the shore crane, and is a key indicator for collision warning.
[0047] Then, in order to calculate the berthing conditions of the bow and the stern respectively, the near-shore point cloud data needs to be segmented into two parts: the bow and the stern, and the segmentation is based on the X coordinate value (i.e., the abscissa value) of the 3D geometric edge point coordinates. First, the real-time heading of the current ship is obtained from the AIS data, and the bow orientation is judged accordingly. If the bow points to the positive direction of the X-axis, a segmentation threshold X_split in the X direction is set (which can be determined according to the median value of the X coordinates of the near-shore point cloud data or the estimated position based on the AIS ship length), 3D geometric edge points with X coordinates greater than or equal to X_split are classified as the bow area point cloud, and 3D geometric edge points with X coordinates less than X_split are classified as the stern area point cloud. If the bow points to the negative direction of the X-axis, the division rule is reversed.
[0048] The point clouds of the bow and stern regions obtained after segmentation are then processed as follows: a) Sorting: All 3D geometric edge points in the bow and stern point clouds are sorted in ascending order of their Y-coordinate (vertical coordinate) values, generating an ordered bow point cloud sequence and an ordered stern point cloud sequence. After sorting, the first point in each sequence is the point closest to the quay crane. b) Selecting edge points: To obtain stable representative positions, instead of selecting a single first point, a certain range of 3D geometric edge points are selected from the bow and stern point cloud sequences (e.g., the first 10% of the total number of 3D geometric edge points in each sequence, or a fixed first N points), which are denoted as the bow edge point set and the stern edge point set, respectively. This set represents the edge portion of the region (bow or stern) closest to the quay crane. Then, the average coordinates of the point sets at the bow and stern edges are calculated (i.e., their geometric centers are calculated). The arithmetic mean of the X, Y, and Z coordinates of all points in each point set is obtained. The calculated three-dimensional coordinates (X_avg_bow, Y_avg_bow, Z_avg_bow) are the average coordinates of the bow region, and (X_avg_stern, Y_avg_stern, Z_avg_stern) are the average coordinates of the stern region. These two average points are not real laser points, but rather calculated virtual feature points used to robustly represent the geometric positions of the outermost edges of the bow and stern.
[0049] IV. Dock position detection and alarm procedures: (e.g.) Figure 1The diagram includes state machine decision-making (quay crane status + ship berthing status), branch 1: berthing detection mode (bow / stern deviation alarm); branch 2: in-berthing detection mode (drift analysis and early warning). A state machine-driven decision-making mechanism is constructed. This mechanism determines the detection mode (dual state detection: either branch 1's berthing detection mode or branch 2's in-berthing detection mode) by judging the quay crane status and the ship's berthing status. When it is determined that the quay crane is in a prohibited movement state and the ship is not in a berthing state, the berthing detection mode is entered. The bow deviation value (the horizontal coordinate of the average bow area coordinates compared to the pre-obtained expected bow position horizontal coordinates) and the stern deviation value (the horizontal coordinate of the average stern area coordinates compared to the pre-obtained expected stern position horizontal coordinates) are calculated. These deviation values are then compared to a first preset threshold. If either the bow or stern deviation value is greater than the preset threshold, the error is considered cleared. If the threshold is exceeded, an inaccurate berthing alarm is triggered. When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame change rate of the attitude angle exceeds the preset change rate threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
[0050] Specifically, this step can be divided into mode switching judgment, berthing detection mode execution process, and in-berthing detection mode execution process. Among them, 1) Mode switching judgment: Continuously receive quay crane trolley / gantry operation status signals from quay crane status sensors (such as the PLC control system) to determine whether the quay crane is in a moving state or a prohibited moving state. Simultaneously, obtain the vessel's berthing status (such as mooring completion signal) by parsing AIS / VTS messages or receiving instructions from the terminal operating system. The operating mode is determined based on the combination of these two statuses.
[0051] When the quay crane is in a prohibited movement state and the vessel is not berthed (such as approaching or not moored), the lidar will generate point cloud data, and the system will switch to berthing detection mode.
[0052] When the quay crane is in a prohibited movement state and the ship is berthed (moored), the lidar will generate point cloud data, and the system will switch to the berthed detection mode.
[0053] When the quay crane is in a moving state, the system suspends all detection calculations and clears the historical state queue to avoid invalid calculations and false alarms.
[0054] 2) Execution process of berthing detection mode: In this mode, the accuracy of berthing position is verified.
[0055] a. Obtain the expected position: Query the expected berth information assigned to a certain vessel from the Terminal Operating System (TOS) to obtain the x-coordinate of the expected bow position (or expected bow position in meters or expected bow meters) and the x-coordinate of the expected stern position (or expected stern position in meters or expected stern meters) of the berth. These two values define the precise X-axis coordinate range of the expected vessel berthing (e.g., from x = 100 meters to x = 250 meters).
[0056] b. Calculate the actual position and deviation: Read the average coordinates of the bow and stern regions, extract their X-coordinate values, and use them as the actual position x-coordinates (X_avg_bow, X_avg_stern) of the bow and stern, respectively. Then, calculate the bow deviation (X_avg_bow) between the average bow coordinate (X_avg_bow) and the pre-obtained expected bow position x-coordinate (D_bow_expected), and the stern deviation (X_avg_stern) between the average stern coordinate (X_avg_stern) and the pre-obtained expected stern position x-coordinate (D_stern_expected), i.e., calculate the absolute difference between the actual and expected positions.
[0057] Bow deviation value = |X_avg_bow - D_bow_expected|
[0058] Stern deviation value = |X_avg_stern - D_stern_expected|
[0059] c. Deviation Judgment and Alarm: The calculated bow and stern deviation values are compared with a preset deviation threshold (e.g., 0.5 meters). If either the bow or stern deviation value exceeds the preset threshold, the vessel is determined not to have accurately berthed at the designated berth, and a berthing inaccuracy alarm is immediately triggered. This alarm signal, along with the specific deviation value, is uploaded to the Terminal Operating System (TOS) and display terminal, prompting operators to intervene and make adjustments.
[0060] 3) Execution process of in-station detection mode: In this mode, the system performs in-station safety monitoring and drift warning.
[0061] a. Initial calibration: When the system just switches to the berthing detection mode, the minimum ship-to-shore distance calculated at this moment (first time) is recorded as the initial distance (D_initial).
[0062] b. Drift Calculation and Attitude Monitoring: The system continuously monitors the latest minimum ship-to-shore distance (D_current) and calculates the difference between it and the initial distance in real time to obtain the drift distance (D_drift = D_current - D_initial). At the same time, the system continuously monitors the changing trend of the calculated ship attitude angles (roll and yaw angles) and calculates their inter-frame change rate.
[0063] c. Tiered Early Warning and Alarm: Early Warning Processing: When the detected drift distance exceeds the first preset distance threshold (e.g., 20 cm), or the inter-frame change rate of the attitude angle (roll or yaw) exceeds the preset change rate threshold (e.g., 1 degree / second) for three consecutive frames, the system triggers early warning processing. The early warning indicates that the vessel is beginning to exhibit slight displacement or abnormal swaying, and the system will issue a primary warning (e.g., a yellow warning signal) to alert relevant personnel. Drift Alarm: When the detected drift distance exceeds the second preset distance threshold (e.g., 30 cm) for three consecutive frames, or the attitude angle continuously exceeds the preset angle threshold (e.g., the roll angle continuously exceeds 3 degrees), the system determines that the vessel has experienced significant dangerous displacement and immediately triggers a drift alarm. The alarm indicates a risk of collision or unberthing, and the system will issue a high-level alarm (e.g., a red alarm signal, audible and visual alarm) and immediately push the alarm information to the ship's crew and shore personnel, requiring immediate countermeasures.
[0064] This invention also relates to a ship berthing position detection system based on shore-based lidar. This system corresponds to the aforementioned ship berthing position detection method based on shore-based lidar and can be understood as a system that implements the above method. The system includes a multi-radar data parallel acquisition and fusion module, a point cloud filtering and attitude angle extraction module, a distance and coordinate mean calculation module, and a berthing position detection and alarm module, connected sequentially. Specifically,
[0065] The multi-radar data parallel acquisition and fusion module deploys multiple lidars at different locations on the shore, and acquires the raw point cloud data of the ship detected by each lidar in parallel through an asynchronous thread model. Then, it constructs a corresponding rigid transformation matrix based on the installation attitude parameters of each lidar, uses the rigid transformation matrix to perform coordinate correction on the raw point cloud data, and fuses the coordinate-corrected raw point cloud data to generate fused point cloud data in a unified world coordinate system. The world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis.
[0066] The point cloud filtering and attitude angle extraction module performs multi-level composite filtering on the fused point cloud data, including spatial range filtering, environmental interference filtering, and noise suppression filtering. It then uses an iterative nearest point algorithm to register the fused point cloud data after multi-level composite filtering at the current moment with historical point cloud data that has undergone the same multi-level composite filtering in advance, and obtains a registration transformation matrix. The attitude angle of the ship is then extracted from the registration transformation matrix.
[0067] The distance and coordinate mean calculation module extracts all 3D geometric edge points within a preset coordinate range at the pier's front edge from the fused point cloud data after multi-level composite filtering, using this as nearshore point cloud data. Based on the nearshore point cloud data and using the Euclidean distance method, it calculates the minimum ship-shore distance. Then, based on the bow direction in the pre-acquired ship AIS data and a preset segmentation threshold, it segments the nearshore point cloud data along the x-axis into bow and stern point clouds. All 3D geometric edge points in the bow and stern point clouds are sorted according to their ordinate values from smallest to largest, generating bow and stern point cloud sequences. A certain number of 3D geometric edge points are selected from the bow and stern point cloud sequences, respectively, and denoted as the bow edge point set and stern edge point set. The average coordinates of the bow and stern edge point sets are calculated as the average coordinates of the bow and stern regions, respectively.
[0068] The berthing position detection and alarm module constructs a state machine-driven decision-making mechanism. This mechanism determines the detection mode by judging the status of the quay crane and the berthing status of the vessel. When it is determined that the quay crane is in a prohibited movement state and the vessel is not in a berthing state, the berthing detection mode is entered. The module calculates the deviation value between the horizontal coordinate of the average coordinate of the bow area and the pre-acquired expected horizontal coordinate of the bow position, and the deviation value between the horizontal coordinate of the average coordinate of the stern area and the pre-acquired expected horizontal coordinate of the stern position. The module then compares the bow deviation value and the stern deviation value with a first preset threshold. If the bow deviation value or the stern deviation value is greater than the preset deviation threshold, an inaccurate berthing alarm is triggered.
[0069] When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-to-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-to-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are then compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame rate of change of the attitude angle exceeds the preset rate of change threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
[0070] Preferably, in the multi-radar data parallel acquisition and fusion module, AIS data of the ship is also acquired, and the fused point cloud data is clustered to obtain at least one point cloud target cluster and its center position; then the ship's latitude and longitude coordinates in the AIS data are transformed to a world coordinate system consistent with the fused point cloud data to obtain the AIS ship position; and the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship is calculated using the Euclidean distance method, and the AIS ship with the smallest spatial distance that is less than a preset matching threshold is identified as the current detection target, thus completing the ship identity matching.
[0071] Preferably, in the point cloud filtering and attitude angle extraction module, the multi-level composite filtering process includes using pass-through filtering to constrain the spatial range of the fused point cloud data, using conditional filtering to eliminate environmental interference from cables and shorelines in the fused point cloud data, and using outlier suppression methods to eliminate dynamic noise interference in the fused point cloud data.
[0072] Preferably, in the distance and coordinate mean calculation module, the calculation of the minimum ship-to-shore distance based on nearshore point cloud data and using the Euclidean distance method specifically includes: calculating the vertical distance between each 3D geometric edge point and the wharf shoreline based on the coordinates of each 3D geometric edge point in the nearshore point cloud data and using the Euclidean distance method, and taking the minimum vertical distance as the minimum ship-to-shore distance.
[0073] Preferably, in the distance and coordinate mean calculation module, segmenting the nearshore point cloud data into bow and stern point clouds along the x-axis direction specifically includes: first, determining the ship's bow orientation based on the bow orientation; if the bow orientation is in the positive direction of the x-axis, then setting a segmentation threshold along the x-axis direction; dividing 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than or equal to the segmentation threshold into bow point clouds, and dividing 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than the segmentation threshold into stern point clouds; if the bow orientation is in the negative direction of the x-axis, then dividing 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than or equal to the segmentation threshold into bow point clouds, and dividing 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than the segmentation threshold into stern point clouds.
[0074] This invention provides an objective and scientific method and system for detecting ship berthing positions based on shore-based lidar. By simultaneously fusing multiple radars, creating unified coordinate models, filtering point clouds, and matching with AIS, it achieves high-precision, anti-interference, and all-weather detection of ship berthing positions. Combined with bow and stern area division and multi-level threshold criteria, it can accurately determine berthing accuracy and provide drift-level early warning, significantly improving the safety and intelligence level of port operations.
[0075] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail with reference to the accompanying drawings and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention patent.
Claims
1. A method for detecting the berthing position of a ship based on shore-based lidar, characterized in that, Includes the following steps: Parallel acquisition and fusion steps of multi-radar data: Multiple lidars are deployed at different locations on the shore, and the raw point cloud data of the ship detected by each lidar is acquired in parallel through an asynchronous thread model; then, a corresponding rigid transformation matrix is constructed according to the installation attitude parameters of each lidar, and the raw point cloud data is coordinate corrected using the rigid transformation matrix. The coordinate corrected raw point cloud data is then fused to generate fused point cloud data in a unified world coordinate system; the world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis. Point cloud filtering and attitude angle extraction steps: The fused point cloud data is subjected to multi-level composite filtering, including spatial range filtering, environmental interference filtering and noise suppression filtering. The fused point cloud data after multi-level composite filtering at the current moment is registered with the historical point cloud data after the same multi-level composite filtering in advance by the iterative nearest point algorithm to obtain the registration transformation matrix. The attitude angle of the ship is extracted from the registration transformation matrix. The steps for calculating distance and average coordinates are as follows: First, extract all 3D geometric edge points within a preset coordinate range at the wharf's edge from the fused point cloud data after multi-level composite filtering. This is used as nearshore point cloud data. Based on the nearshore point cloud data and the Euclidean distance method, calculate the minimum ship-shore distance. Then, based on the bow direction in the pre-acquired ship AIS data and a preset segmentation threshold, segment the nearshore point cloud data along the x-axis into bow and stern point clouds. Sort all 3D geometric edge points in the bow and stern point clouds according to their ordinate values from smallest to largest, generating bow and stern point cloud sequences. Select a certain number of 3D geometric edge points within the bow and stern point cloud sequences, respectively, and denote them as the bow edge point set and stern edge point set. Calculate the average coordinates of the bow and stern edge point sets, respectively, as the average coordinates of the bow and stern regions. Berthing position detection and alarm steps: A state machine-driven decision-making mechanism is constructed. The state machine-driven decision-making mechanism determines the detection mode by judging the status of the quay crane and the berthing status of the ship. When it is determined that the quay crane is in a prohibited movement state and the ship is not in a berthing state, the berthing detection mode is entered. The bow area coordinate average x-coordinate deviation value and the pre-acquired expected bow position x-coordinate are calculated respectively, as well as the stern area coordinate average x-coordinate deviation value and the pre-acquired expected stern position x-coordinate are calculated respectively. The bow deviation value and the stern deviation value are compared with the first preset threshold respectively. If the bow deviation value or the stern deviation value is greater than the preset deviation threshold, the berthing inaccurate alarm is triggered. When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-to-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-to-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are then compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame rate of change of the attitude angle exceeds the preset rate of change threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
2. The method for detecting ship berthing position based on shore-based lidar according to claim 1, characterized in that, In the parallel acquisition and fusion step of multi-radar data, AIS data of the ship is also acquired, and the fused point cloud data is clustered to obtain at least one point cloud target cluster and its center position. Then, the latitude and longitude coordinates of the ship in the AIS data are transformed to the same world coordinate system as the fused point cloud data to obtain the AIS ship position. The Euclidean distance method is used to calculate the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship. The AIS ship with the smallest spatial distance that is less than the preset matching threshold is identified as the current detection target, and the ship identity matching is completed.
3. The method for detecting ship berthing position based on shore-based lidar according to claim 1, characterized in that, In the point cloud filtering and attitude angle extraction steps, the multi-level composite filtering process includes using pass-through filtering to constrain the spatial range of the fused point cloud data, using conditional filtering to eliminate environmental interference from cables and shorelines in the fused point cloud data, and using outlier suppression methods to eliminate dynamic noise interference in the fused point cloud data.
4. The method for detecting ship berthing position based on shore-based lidar according to claim 1, characterized in that, In the step of calculating the distance and average coordinates, the calculation of the minimum ship-to-shore distance based on nearshore point cloud data and using the Euclidean distance method specifically includes: calculating the vertical distance between each 3D geometric edge point and the wharf shoreline based on the coordinates of each 3D geometric edge point in the nearshore point cloud data and using the Euclidean distance method, and taking the minimum vertical distance as the minimum ship-to-shore distance.
5. The method for detecting a ship's berthing position based on shore-based lidar according to any one of claims 1 to 4, characterized in that, In the step of calculating the distance and average coordinates, the near-shore point cloud data is divided into bow and stern point clouds along the x-axis, specifically including: First, determine the ship's heading based on its bow direction. If the bow direction is in the positive direction of the x-axis, set a segmentation threshold along the x-axis. 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than the segmentation threshold are classified as stern region point clouds. If the bow direction is in the negative direction of the x-axis, then 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than the segmentation threshold are classified as stern region point clouds.
6. A ship berthing position detection system based on shore-based lidar, characterized in that, It includes a multi-radar data parallel acquisition and fusion module, a point cloud filtering and attitude angle extraction module, a distance and coordinate mean calculation module, and a berthing position detection and alarm module, which are connected in sequence. The multi-radar data parallel acquisition and fusion module deploys multiple lidars at different locations on the shore, and acquires the raw point cloud data of the ship detected by each lidar in parallel through an asynchronous thread model. Then, it constructs a corresponding rigid transformation matrix based on the installation attitude parameters of each lidar, uses the rigid transformation matrix to perform coordinate correction on the raw point cloud data, and fuses the coordinate-corrected raw point cloud data to generate fused point cloud data in a unified world coordinate system. The world coordinate system is established with a preset fixed reference point on the dock as the origin, the horizontal direction parallel to the dock shoreline as the x-axis, the direction perpendicular to the dock shoreline and pointing towards the water as the y-axis, and the direction perpendicular to the horizontal plane upward as the z-axis. The point cloud filtering and attitude angle extraction module performs multi-level composite filtering on the fused point cloud data, including spatial range filtering, environmental interference filtering, and noise suppression filtering. It then uses an iterative nearest point algorithm to register the fused point cloud data after multi-level composite filtering at the current moment with historical point cloud data that has undergone the same multi-level composite filtering in advance, and obtains a registration transformation matrix. The attitude angle of the ship is then extracted from the registration transformation matrix. The distance and coordinate mean calculation module extracts all 3D geometric edge points within a preset coordinate range at the pier's front edge from the fused point cloud data after multi-level composite filtering, using this as nearshore point cloud data. Based on the nearshore point cloud data and using the Euclidean distance method, it calculates the minimum ship-shore distance. Then, based on the bow direction in the pre-acquired ship AIS data and a preset segmentation threshold, it segments the nearshore point cloud data along the x-axis into bow and stern point clouds. All 3D geometric edge points in the bow and stern point clouds are sorted according to their ordinate values from smallest to largest, generating bow and stern point cloud sequences. A certain number of 3D geometric edge points are selected from the bow and stern point cloud sequences, respectively, and denoted as the bow edge point set and stern edge point set. The average coordinates of the bow and stern edge point sets are calculated as the average coordinates of the bow and stern regions, respectively. The berthing position detection and alarm module constructs a state machine-driven decision-making mechanism. This mechanism determines the detection mode by judging the status of the quay crane and the berthing status of the vessel. When it is determined that the quay crane is in a prohibited movement state and the vessel is not in a berthing state, the berthing detection mode is entered. The module calculates the deviation value between the horizontal coordinate of the average coordinate of the bow area and the pre-acquired expected horizontal coordinate of the bow position, and the deviation value between the horizontal coordinate of the average coordinate of the stern area and the pre-acquired expected horizontal coordinate of the stern position. The module then compares the bow deviation value and the stern deviation value with a first preset threshold. If the bow deviation value or the stern deviation value is greater than the preset deviation threshold, an inaccurate berthing alarm is triggered. When it is determined that the quay crane is in a prohibited movement state and the ship is in a berthing state, the berthing detection mode is entered. The minimum ship-to-shore distance detected for the first time is recorded as the initial distance, and the difference between the current minimum ship-to-shore distance and the initial distance is calculated in real time as the drift distance. The real-time calculated drift distance, attitude angle and its rate of change are then compared with the corresponding preset thresholds. When the drift distance is greater than the first preset distance threshold or the inter-frame rate of change of the attitude angle exceeds the preset rate of change threshold for multiple consecutive frames, an early warning is issued. When the drift distance is greater than the second preset distance threshold for multiple consecutive frames or the attitude angle is continuously greater than the preset angle threshold, a drift alarm is triggered, thus completing the detection of the ship's berthing position.
7. The ship berthing position detection system based on shore-based lidar according to claim 6, characterized in that, The multi-radar data parallel acquisition and fusion module also acquires the ship's AIS data and performs clustering processing on the fused point cloud data to obtain at least one point cloud target cluster and its center position. Then, the ship's latitude and longitude coordinates in the AIS data are transformed to a world coordinate system that is consistent with the fused point cloud data to obtain the AIS ship position. The Euclidean distance method is used to calculate the spatial distance between the center position of each point cloud target cluster and the position of each AIS ship. The AIS ship with the smallest spatial distance that is less than the preset matching threshold is identified as the current detection target, thus completing the ship identity matching.
8. The ship berthing position detection system based on shore-based lidar according to claim 6, characterized in that, In the point cloud filtering and attitude angle extraction module, the multi-level composite filtering process includes using pass-through filtering to constrain the spatial range of the fused point cloud data, using conditional filtering to eliminate environmental interference from cables and shorelines in the fused point cloud data, and using outlier suppression methods to eliminate dynamic noise interference in the fused point cloud data.
9. The ship berthing position detection system based on shore-based lidar according to claim 8, characterized in that, In the distance and coordinate mean calculation module, the calculation of the minimum ship-to-shore distance based on nearshore point cloud data and using the Euclidean distance method specifically includes: calculating the vertical distance between each 3D geometric edge point and the wharf shoreline based on the coordinates of each 3D geometric edge point in the nearshore point cloud data and using the Euclidean distance method, and taking the minimum vertical distance as the minimum ship-to-shore distance.
10. The ship berthing position detection system based on shore-based lidar according to any one of claims 6 to 9, characterized in that, In the distance and coordinate mean calculation module, the near-shore point cloud data is divided into bow and stern point clouds along the x-axis, specifically including: First, determine the ship's heading based on its bow direction. If the bow direction is in the positive direction of the x-axis, set a segmentation threshold along the x-axis. 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than the segmentation threshold are classified as stern region point clouds. If the bow direction is in the negative direction of the x-axis, then 3D geometric edge points in the nearshore point cloud data with x-coordinate values less than or equal to the segmentation threshold are classified as bow region point clouds, and 3D geometric edge points in the nearshore point cloud data with x-coordinate values greater than the segmentation threshold are classified as stern region point clouds.
Citation Information
Patent Citations
Method for realizing container target detection based on laser radar
CN116859412A
Unmanned ship positioning method and berth selection method based on high-precision semantic map
CN119205912A