Method for measuring the height of a three-dimensional point cloud model of a ship based on a machine learning algorithm
Patent Information
- Application Number
- CN202311603111.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-11-28
AI Technical Summary
因此,受到各种环境因素的影响,大型船只很容易撞到电线等引起海上交通事故,造成经济损失与人员伤亡
[0027]与现有的激光预警技术相比,本发明所述的方法,可以有效测出大型过往船只的高度,且所受到的天气影响远小于激光对射预警技术所受到的天气影响,更可以直接将此数据与此航道后续可能遇到的限高位置进行匹配,向船舶提前预警,减少后续接受检查的次数。
Smart Images

Figure CN117630958B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship altitude measurement, specifically a method for processing three-dimensional point cloud data of a ship's navigation scene obtained using a laser scanner through machine learning. Background Technology
[0002] With the rapid development of shipping, the volume of large, heavy ships navigating the waterways is increasing. Simultaneously, as people's electricity consumption grows, the demand for cross-river power transmission is also rising, leading to an increasing number of power transmission lines being built across waterways. Therefore, due to various environmental factors, large ships are prone to colliding with power lines, causing maritime accidents, resulting in economic losses and casualties.
[0003] Currently, there are few methods for measuring ship height in China, which can be roughly divided into three categories: The first is manual measurement, where manual inspection stations are set up at the river level, and measurements are taken manually after the ship is moored. While this method effectively prevents accidents caused by excessive ship height, it is time-consuming, labor-intensive, and prone to causing waterway congestion. The second method is measurement based on two-dimensional images. This method can complete the measurement quickly, but the results are affected by factors such as the shooting angle and imaging distance, leading to inaccuracies. Rain and fog can also significantly affect the captured images. The third method uses laser detection, where the laser transmitter and receiver are fixed on opposite sides of the river, and the ship height limit is controlled by adjusting the height of the laser beam relative to the water surface. However, laser beam detection is easily affected by weather conditions, and the wider the river, the higher the accuracy required for the warning equipment. Furthermore, when the river is far away, the transmitter and receiver are prone to loosening due to the unfavorable river environment, requiring frequent periodic checks. Summary of the Invention
[0004] The purpose of this invention is to provide a method for measuring the height of a ship's three-dimensional point cloud model based on machine learning algorithms, which can estimate the height of large ships and prevent damage to cables above the river surface caused by untimely information updates.
[0005] To achieve the above objectives, the technical solution of the present invention provides a method for measuring the height of a ship's three-dimensional point cloud model based on a machine learning algorithm, which includes the following steps:
[0006] Step 1: Set up the site environment;
[0007] Step 2: Obtain a 3D point cloud scene using a laser scanner;
[0008] Step 3: Preprocess the 3D point cloud scene obtained from the scan;
[0009] Step 4: Perform segmentation, fitting, and other processing on the ship point cloud data;
[0010] Step 5: Calculate the height of the ship point cloud model.
[0011] In step 1, when setting up the site environment, a detection tower should be built at a specified distance from the power transmission line to install the laser scanner, and an auxiliary reference platform should be laid 20m in front of the detection tower in advance. The auxiliary reference platform can be constructed using a reflective and opaque material, or a reflective and opaque material can be laid on the upper surface of the auxiliary reference platform to ensure the integrity of the point cloud data information of the auxiliary platform when the laser scanner scans.
[0012] In step 1, the laser scanner should be installed at a location that can simultaneously scan the auxiliary reference platform and the ship to be inspected, and should be erected according to the height limit.
[0013] In step 2, the laser scanner scans both the ship and the auxiliary reference platform. After the laser emitted by the scanner reflects back, the distance between the scanned object and the laser scanner is calculated.
[0014] Since the initial angle of the laser scanner is fixed, the distance parameters of the scanned object are continuously obtained as the laser is emitted and reflected back. The presence of a ship entering the detection point can be determined based on whether the distance parameters change significantly, and the ship's length can be determined to ensure the integrity of the ship point cloud data.
[0015] In step 3, the scanned 3D scene point cloud data is first preprocessed to avoid noise affecting the height calculated from the 3D point cloud model of the ship. KD-Tree is used for preprocessing, which involves four steps: neighborhood search, noise point identification, denoising, and duplicate detection, to preprocess and denoise the 3D point cloud scene.
[0016] In step 4, RANSAC plane detection and DBSCAN clustering are used to remove noise points for the second time, and the auxiliary reference platform point cloud data is segmented from the preprocessed 3D point cloud scene.
[0017] By calculating the covariance matrix of the point cloud on the upper surface of the segmented auxiliary reference platform, the normal vector of this surface is obtained based on its minimum eigenvalue, that is, the eigenvector corresponding to the minimum eigenvalue.
[0018] Covariance matrix formula: Calculate point cloud data X 1×3 Mean C of each dimension 1×3 After zero centralization, the result is The formula for calculating the covariance matrix is as follows:
[0019]
[0020] In step 5, the distance from the highest point of the ship to the reference plane is obtained by subtracting the maximum value of the normal vector of the auxiliary reference platform point cloud multiplied by the normal vector of the auxiliary reference plane point cloud from the maximum value of the normal vector of the other point clouds containing ship point cloud information. The calculation formula is as follows:
[0021] d1 = max{points1 × Normal}
[0022] d2 = max{points2 × Normd}
[0023] h = d1 - d2
[0024] Where d1 is the maximum distance from the ship point cloud to its XOY coordinate plane, d2 is the maximum distance from the reference plane point cloud to its XOY coordinate plane; points1 is the scanned ship point cloud, points2 is the scanned auxiliary reference plane point cloud; and Normal is the normal vector.
[0025] Calculate the distance d between the water level and the auxiliary reference plane on that day, and add it to the distance h between the highest point of the ship and the auxiliary reference plane to obtain the height H of the ship above the waterline:
[0026] H = h + d
[0027] Compared with existing laser early warning technologies, the method described in this invention can effectively measure the height of large passing vessels, and is far less affected by weather conditions than laser beam early warning technologies. Furthermore, this data can be directly matched with the height restriction locations that may be encountered in the waterway, providing early warnings to vessels and reducing the number of subsequent inspections. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method for measuring the height of a ship's three-dimensional point cloud model as described in this invention;
[0029] Figure 2 This is a site overview view of the method described in this invention;
[0030] Figure 3 This is a field side view of the method described in this invention;
[0031] Figure 4 This is a schematic diagram illustrating the working principle of the laser scanner according to the method described in this invention;
[0032] Figure 5 This is a schematic diagram of the point cloud separation result in the example of this invention;
[0033] Figure 6 This is a schematic diagram illustrating the situation where the number of planar point clouds on the auxiliary reference platform in this invention does not meet the standard.
[0034] Figure 7 This is a schematic diagram illustrating the condition when the number of planar point clouds on the auxiliary reference platform of this invention meets the required standard.
[0035] Figure 8 This is a schematic diagram of a ship point cloud as an example of the present invention;
[0036] Figure 9 This is a schematic diagram illustrating the principle of ship height calculation using the method described in this invention. Detailed Implementation
[0037] This invention utilizes a machine learning algorithm-based method for measuring the height of a ship using a 3D point cloud model. First, an auxiliary reference plane is laid out along the riverbank to aid in the measurement. After the ship enters the scanning range, a laser scan is performed. Once the scan is complete, the distance between the highest point of the point cloud on the ship and the point cloud on the riverbank, along with the distance between the riverbank and the current horizontal plane, is calculated based on the normal vector. This gives the ship's height.
[0038] like Figure 1 As shown, the method described in this invention includes the following steps:
[0039] Step 1: Manually lay out an auxiliary reference plane in advance and deploy a laser scanner;
[0040] Step 2: Scan the ships approaching the auxiliary reference platform;
[0041] Step 3: Preprocess the scanned 3D point cloud scene;
[0042] Step 4: Use machine learning algorithms to analyze the preprocessed point cloud to obtain the normal vector of the auxiliary reference platform surface.
[0043] Step 5: Calculate the ship's height from the point cloud based on the previously obtained normal vectors.
[0044] In step one, a material for the auxiliary reference plane is selected, and an auxiliary reference plane perpendicular to the utility pole is laid. A laser scanner is then deployed according to the height of the utility pole. The utility pole is used to erect power transmission lines across the river; a detection tower for installing the laser scanner needs to be built at a specified distance before the power transmission line (e.g., at least 200m), and the auxiliary reference platform is laid 20m in front of the detection tower.
[0045] In step two, the laser scanner is fixed at an initial angle. The initial detection angle varies depending on the height of the wire, and the preferred range is when the auxiliary reference plane and the river channel are roughly in the middle of the scanning range. At this angle, distance detection is performed, and laser scanning begins when an object is detected approaching to within 20 meters.
[0046] Using the laser scanner as the origin of the coordinate system, the laser scanner obtains the position information of each scanned point based on the reflection information received during scanning, and constructs a three-dimensional point cloud scene from these points.
[0047] In step three, a KD-Tree is constructed from the point cloud in the 3D point cloud scene, followed by a neighborhood search. Points that do not meet the neighborhood search conditions are treated as noise points in the air.
[0048] In step four, classic point cloud clustering and plane fitting algorithms from machine learning are used to extract auxiliary reference planes and ship point clouds from the denoised 3D point cloud scene.
[0049] Point cloud clustering algorithm: The DBSCAN clustering algorithm is adopted, which can effectively segment point cloud clusters with different densities, and further process noise points that were not processed during preprocessing to remove noise.
[0050] Plane detection algorithm: The RANSAC plane fitting algorithm is used to fit the plane. After fitting the point cloud of the plane where the auxiliary reference plane point cloud is located, the fitted plane point cloud is locked on the auxiliary reference plane point cloud by the clustering results.
[0051] In step four, the normal vector of the fitted auxiliary reference plane point cloud is calculated, and the normal vector corresponding to the smallest eigenvalue in the covariance matrix of the point cloud is the normal vector of its plane.
[0052] In step five, the point cloud of the separated ship and the point cloud of the auxiliary reference plane are multiplied by their normal vectors, and the maximum value is found and the difference is calculated to obtain the height of the ship above the auxiliary reference plane.
[0053] The ship's height can be obtained by adding the distance from the auxiliary reference platform above the waterline on that day.
[0054] The technical process of this invention will now be described in detail with reference to the accompanying drawings.
[0055] 1. On-site environment setup: such as Figure 2 and Figure 3 As shown, a horizontal auxiliary reference platform is laid 20m away from the laser scanner to assist in measuring the ship's height. The paving material should be a bright white material with good reflective properties, or a bright white material should be laid on the surface of the constructed auxiliary reference platform. The auxiliary reference platform must be built close to the river channel; the example platform is no less than 30m long and no less than 5m wide, and should be perpendicular to the power transmission tower to the maximum extent possible. A detection tower is built on one side of the auxiliary reference platform to install the laser scanner; its height is determined according to the height restriction.
[0056] 1.1 The laser scanner uses the SICK LSM511 series, and its working principle is as follows: Figure 4 As shown, point P is the highest point of the scanned ship. The gray plane represents objects that can be scanned by the laser scanner, such as parts of the ship's surface and auxiliary reference platforms. The white areas represent unscanned parts, such as the lower half of the hull. This device is a photoelectric lidar sensor that scans the surrounding contours non-contactly using a laser beam. The device measures its environment in two-dimensional polar coordinates using its measurement origin. This origin is marked by small markers on the side of the optical lens hood. If the laser beam hits an object, its position is determined in terms of distance and angle.
[0057] 1.1.2 Distance Measurement: This device emits pulsed laser beams via a laser diode. When the laser beam is reflected by an object, the reflected beam is received by a sensor. The distance to the object is calculated based on the time required for the pulse beam to be reflected and received by the sensor.
[0058] 1.1.3 Orientation Measurement: The emitted laser beam is deflected by an internal rotating mirror to scan the surrounding environment in a circular motion. Measurements are triggered by an encoder at regular angular amplitudes. The LMS5xx PRO / Heavy Duty uses an adjustable scanning frequency of 25, 35, 50, 75, or 100 Hz for measurement. Measurements are performed by continuously triggering a laser pulse after angular amplitudes of 0.1667°, 0.25°, 0.3333°, 0.5°, 0.6667°, or 1°.
[0059] 2. Scanning the vessel under test: The vessel travels toward the laser scanner and approaches the auxiliary reference platform. When the vessel is 20m away from the laser scanner at a horizontal distance, the scan begins. If the vessel has not completely passed the detection tower where the laser scanner is set up (i.e., the scanning range of the laser scanner) within half a minute, it is considered a large vessel. Steps two to five are repeated to perform a second scan. The maximum value of the results obtained from the two scans is taken to avoid the situation where the stern is not scanned due to the vessel being too long, which would cause inaccurate calculation of the vessel's height.
[0060] 2.1 Establish communication with the device and obtain scan data for analysis and processing: Connect the laser scanner to the computer using the RS232 data interface, select no parity, 8 data bits, and 1 stop bit.
[0061] 3. Preprocessing of 3D Point Cloud Scene: After obtaining the 3D point cloud scene data from laser scanning, preprocessing is required. Preprocessing can effectively improve the quality of the 3D point cloud data, improve the subsequent processing results, and reduce the error in ship height measurement caused by noise points.
[0062] 3.1KD-Tree 3D Point Cloud Denoising
[0063] KD-Tree is an efficient data structure for processing k-dimensional spatial data, and it can be applied to denoising 3D point clouds. The following are the specific steps for 3D point cloud denoising:
[0064] (1) First, construct a KD-Tree and divide the collected ship navigation three-dimensional point cloud data points according to different dimensions to form a balanced tree structure.
[0065] (2) For each point, a neighborhood search is performed. By setting the search radius or number of neighboring points in advance, the degree of point cloud denoising can be effectively controlled.
[0066] (3) The noise reduction strategy adopts distance filtering, which can effectively filter outout points, that is, noise points obtained by the laser scanner that are in the air rather than on the ship or the auxiliary reference plane. At the same time, it can effectively retain the sparse point cloud obtained by scanning the top of the ship due to its small size.
[0067] 4. Point Cloud Segmentation: DBSCAN clustering was used to cluster the scanned point clouds, resulting in point cloud data divided into different clusters, including point cloud data of ships, auxiliary reference platforms, and other interfering objects in the environment. Then, the RANSAC plane detection algorithm was used to perform plane detection on each cluster to obtain the point cloud of the upper surface of the auxiliary reference platform. Finally, the covariance matrix of the upper surface point cloud was calculated, and the eigenvector corresponding to its smallest eigenvalue was the required normal vector. Simultaneously, ship point clouds were extracted based on set distance and point cloud count thresholds. Using a ship model as the target object, the final separation and extraction results (…) Figure 5 Here is an example: yellow corresponds to the point cloud on the upper surface of the auxiliary reference platform, and blue corresponds to the point cloud of the ship.
[0068] 4.1 Density-Based Clustering Algorithm: For the environmental point cloud sample set, two parameters are set: minimum distance and minimum number of points. A selected point is defined as a core point if the distance between it and its neighboring points is less than the minimum distance and the number of neighboring points is greater than the set minimum number of points. These core points belong to the same cluster. Points found by the core point search but not core points are called boundary points. All core points and boundary points near a given core point are grouped into one cluster. This method initially separates the point cloud of the reference shore platform from the background points, reducing interference from background and noise points. It can also filter point clouds obtained from other objects in the shooting environment, such as birds that suddenly appear.
[0069] 4.2 RANSAC Plane Detection Algorithm: For the riverbank reference plane point cloud that has been initially separated using the DBSCAN algorithm, a parameter is set: a threshold for the number of points contained in the plane. Three points are randomly selected, and the number of points within the plane formed by these points is calculated. This process is iterated to select initial points. If the number of points in the plane reaches the threshold, or after iteration, the plane with the largest number of points is selected; this plane is the upper surface of the auxiliary reference platform. For an example of auxiliary reference plane separation results, see [link to example]. Figure 6 , Figure 7 As shown; where, Figure 6 This indicates an incorrect result, specifically a situation where the number of point clouds does not meet the target. Figure 7 This indicates a correct result, meaning the number of point clouds meets the target.
[0070] 4.3 Ship Point Cloud Extraction: To avoid the presence of point cloud data above the ships in the shooting environment, ship point cloud data needs to be extracted. Since ships are generally large, the distance between the target point cloud data and the auxiliary reference plane, as well as the number of target point cloud data points, can be used to determine if it is the desired ship point cloud model. Specifically, the distance between the closest points in two point cloud data sets is used as the distance between the target point cloud data and the auxiliary reference plane.
[0071]
[0072] Where S1 is the target point cloud and S2 is the planar point cloud. x and y are points in the point clouds. The example point cloud separation result of the ship model is as follows. Figure 8 As shown.
[0073] 5. Determining the normal vector: (e.g.) Figure 9 As shown, the covariance matrix is calculated based on the point cloud on the surface of the found auxiliary reference platform. The eigenvalues and eigenvectors of the covariance matrix can be used to describe the degree of dispersion and variation trends in different directions. The smallest eigenvalue indicates a smaller degree of dispersion, and its corresponding eigenvector is the desired plane normal vector.
[0074] Covariance matrix formula: First, calculate the point cloud data X 1×3 Mean C of each dimension 1×3
[0075]
[0076] After zero centralization, the result is
[0077]
[0078] The formula for calculating the covariance matrix is:
[0079]
[0080] Where X1, X2, and X3 are the three dimensions of the point cloud data X. X represents the mean of each of the three dimensions of the point cloud data.
[0081] 6. Height Calculation: DBSCAN clustering and RANSAC plane detection algorithms are used to process the scanned scene and filter out the point cloud information of the upper surface of the reference platform. The dot product of the coordinates of the points on the upper surface of the reference platform with the normal vector is obtained as d1, and the dot product of the ship's point cloud coordinates with the normal vector is obtained as d2. The difference between the maximum values of d1 and d2 is the distance h from the auxiliary reference platform to the highest point of the ship. Combined with the distance d from the water level to the reference platform on that day, the ship's height H can be obtained. Ship height calculation formula:
[0082] d1 = P1 × Normal
[0083] d2 = P2 × Normal
[0084] h = d1 max -d2 max
[0085] H = h + d
[0086] Figure 5 In the diagram, P1 and P2 are example points of the ship point cloud and the auxiliary reference platform point cloud, respectively; Normal is the normal vector.
[0087] In summary, this invention provides a method for measuring the height of a ship by further processing 3D point cloud information obtained from a laser scanner. First, an auxiliary reference platform is constructed on the riverbank using reflective material, and a laser scanner is set up according to the height restriction. The 3D point cloud of the scanned ship scene undergoes filtering preprocessing, followed by the separation of the auxiliary platform point cloud from the ship point cloud using clustering and planar detection algorithms, while simultaneously removing noise points. Finally, by calculating the covariance matrix of the point cloud, the normal vector of the upper surface point cloud of the auxiliary reference plane is obtained. By analyzing the normal vector, the ship point cloud, and the auxiliary reference platform point cloud, the distance between the highest point of the ship and the auxiliary platform can be obtained. Simultaneously, based on the water level of the day, the height of the auxiliary reference plane above the water surface can be determined, thus yielding the total height of the ship above the water. This method uses a laser scanner to measure ship height, offering higher accuracy compared to measurements using 2D images. Compared to traditional laser beam methods, this method not only accurately measures the ship's height but also reduces errors caused by weather conditions.
[0088] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A method for measuring the height of a ship's 3D point cloud model based on machine learning algorithms, characterized in that, Includes the following steps: Step 1: Set up the site environment by installing a laser scanner on the detection tower and setting up an auxiliary reference platform for reflection on the riverbank at a first specified distance in front of the detection tower; the auxiliary reference platform is constructed using a reflective and opaque material; or, a reflective and opaque material is laid on the upper surface of the auxiliary reference platform. The auxiliary reference platform is perpendicular to the transmission tower to the maximum extent possible; the transmission tower is used to erect transmission lines across the river; the detection tower is set at a second specified distance before the transmission line across the river; Step 2: The laser scanner simultaneously scans the auxiliary reference platform and the ship under inspection to obtain a 3D point cloud scene; Step 3: Preprocess the scanned 3D point cloud scene; Step 4: Analyze the preprocessed point cloud using machine learning algorithms to extract the ship point cloud and obtain the normal vector of the auxiliary reference platform surface; Step 5: Calculate the ship point cloud based on the normal vector to obtain the distance between the highest point of the ship point cloud and the riverbank point cloud. Combine this with the distance between the riverbank and the horizontal plane of the day to calculate the ship height.
2. The method as described in claim 1, characterized in that, The laser scanner is set up according to the height limit and positioned so that it can simultaneously scan the auxiliary reference platform and the ship to be inspected.
3. The method as described in claim 2, characterized in that, The first specified distance is 20m; The second specified distance is at least 200m.
4. The method as described in claim 1, characterized in that, The laser scanner has an initial angle so that the scanned auxiliary reference plane and the river channel are located in the middle of the scanning range; The vessel to be inspected travels toward the location of the laser scanner and approaches the auxiliary reference platform. The laser scanner begins scanning at the initial angle when the vessel reaches the first designated distance before reaching the inspection tower.
5. The method as described in claim 1, characterized in that, If the vessel has not completely passed the detection tower with the laser scanner within the set time, the vessel is considered a large vessel, and steps 2 to 5 are repeated for a second scan. The maximum value of the two scan results is taken as the vessel height.
6. The method as described in claim 1, characterized in that, In step 3, the scanned 3D point cloud scene is preprocessed using KD-Tree, which performs neighborhood search, noise point identification, denoising, and duplicate detection to achieve denoising.
7. The method as described in claim 1, characterized in that, In step 4, RANSAC plane detection and DBSCAN clustering are used to remove noise points for the second time, and the auxiliary reference platform point cloud data is segmented from the preprocessed 3D point cloud scene.
8. The method as described in claim 7, characterized in that, By calculating the covariance matrix of the point cloud on the upper surface of the segmented auxiliary reference platform, the normal vector of this surface is obtained based on its minimum eigenvalue, that is, the eigenvector corresponding to the minimum eigenvalue. First, calculate the point cloud data. Mean of each dimension After zero centralization, the result is The formula for calculating the covariance matrix is: in, X 1, X 2, X 3 is point cloud data X The three dimensions For point cloud data X The mean of each of the three dimensions.
9. The method as described in claim 1, characterized in that, In step 5, the separated ship point cloud and auxiliary reference plane point cloud are multiplied by the normal vector, and the maximum value is found and the difference is calculated to obtain the height of the ship above the auxiliary reference plane. The ship's height is obtained by adding the distance from the auxiliary reference platform above the waterline on that day; The calculation formula is as follows: in, d 1. The coordinate system of the ship point cloud XOY The maximum distance between planes. d 2 is the coordinate system of the reference plane point cloud. XOY The maximum value of the plane; points 1 represents the scanned ship point cloud. points 2 represents the scanned auxiliary reference plane point cloud; It is the normal vector; d The distance between the water level on that day and the auxiliary reference plane. h This is the distance from the highest point of the ship to the auxiliary reference plane; H The height of a ship above the waterline.