Ship point cloud backside completion method and system
Through mirror driving technology and the utilization of the inherent symmetry of the ship, combined with radius filtering, DBSCAN clustering, RANSAC fitting and convex shell processing, the problem of low data completion accuracy on the back side of the ship's point cloud is solved, and efficient and accurate point cloud completion effect is achieved.
Patent Information
- Application Number
- CN202510402661.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-01
AI Technical Summary
The data completion method of the ship point cloud backside in the prior art cannot improve the completion accuracy while ensuring completion efficiency, especially in complex or irregular geometric shapes.
Through mirror driving technology and the utilization of the inherent symmetry of the ship, radius filtering, DBSCAN clustering, RANSAC fitting and convex shell processing are used to generate the central axis surface and remove the backside point cloud data, and symmetric operations are performed to complete the point cloud data.
Under limited sample conditions, high-precision completion of the backside data of the ship point cloud is achieved, reducing dependence on a large amount of training data, improving computing efficiency, and suitable for resource-constrained environments.
Smart Images

Figure CN119919595A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship technology, and in particular to a method and system for completing the back side of a ship point cloud. Background Art
[0002] With the continuous advancement of science and technology, 3D point cloud technology has become an important tool for capturing and representing the geometric shape of objects. In practical applications, the acquired ship point cloud data is often missing, especially in the back area of the ship. Due to physical occlusion and equipment limitations, data missing has become a problem that needs to be solved urgently.
[0003] To solve the problem of missing point cloud data, various completion methods have been proposed. Currently, most point cloud completion solutions are based on deep neural networks, which are usually trained on large datasets with limited categories, which limits the object categories that these solutions can complete. These completion methods perform well on academic datasets with predefined object categories and very specific defect types; however, the performance in real-world environments drops significantly, and the performance further deteriorates on previously unseen object categories.
[0004] In addition to deep learning-based methods, there are also attempts to use geometry-based methods, which use geometric features to complete point clouds without any external data. Geometry-based methods play an important role in point cloud completion. Instead of relying on external data, they complete data by analyzing and utilizing the intrinsic geometric features of point clouds. Surface interpolation methods are a common strategy in geometric methods. This method analyzes the spatial distribution of known point cloud data and uses interpolation techniques to infer areas where data is missing. Interpolation methods usually require the assumption that the distribution of known data has a certain degree of continuity and smoothness, so they are suitable for scenes with relatively regular geometric structures. These methods include but are not limited to linear interpolation, spline interpolation, and kriging. They construct mathematical models to fit the point cloud surface and then generate new data points in the missing areas. The advantage of this method is that it is simple to calculate and does not require additional training data, but its effect may be limited in highly complex or irregular geometries.
[0005] Aiming at the problem that the existing method for completing the back side data of ship point cloud cannot improve the completion accuracy while ensuring the completion efficiency, no effective solution has been proposed so far. Summary of the invention
[0006] A method for completing the back side of a ship point cloud is provided in an embodiment of the present invention to solve the problem that the method for completing the back side data of a ship point cloud in the prior art cannot improve the completion accuracy while ensuring the completion efficiency.
[0007] To achieve the above-mentioned purpose, on the one hand, the present invention provides a method for completing the back side of a ship point cloud, the method comprising: S1, performing radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; S2, screening the de-noised ship point cloud according to the Z value, and clustering the screened de-noised ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the outer contour surface point cloud of the ship; S3, fitting the extracted outer contour surface point cloud of the ship using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; fitting the inner points of the first fitting plane using the least squares method to obtain the normal of the medial axis surface of the original ship point cloud; S41, when the outer contour surface point cloud of the ship is completely scanned, performing convex hull processing on the extracted outer contour surface point cloud of the ship , get the convex hull; find the two endpoints of the longest line segment in the convex hull, and find the endpoint farthest from the outer contour surface point cloud of the ship from the two endpoints, and use it as the reference point of the medial axis plane; S42, when the original ship point cloud contains symmetry feature information, use the symmetry feature information to find the midpoint of the line connecting any two points on the symmetry plane, and use it as the reference point of the medial axis plane; S5, for each case, generate the medial axis plane according to the normal of the medial axis plane and the reference point of the medial axis plane; remove the point cloud data on the back side of the medial axis plane; S6, for each case, perform symmetry operation on the point cloud data on the front side of the medial axis plane according to the medial axis plane to obtain a mirrored ship point cloud; S7, compare the two mirrored ship point clouds with the original ship point cloud for similarity, and select the mirrored ship point cloud with the highest similarity as the target point cloud.
[0008] Optionally, S2 includes: S21, sorting all points in the noise reduction ship point cloud from small to large according to the Z value, and extracting a preset percentage of points to obtain the screened noise reduction ship point cloud; S22, clustering the screened noise reduction ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; and taking the class with the largest number of point clouds among all classes as the outer contour surface point cloud of the ship.
[0009] Optionally, the S3 includes: S31, determining the minimum number of points, the maximum number of iterations and the distance threshold required for each fitting; S32, randomly selecting the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship, and recording them as fitting points; calculating a candidate plane based on all fitting points; S33, calculating the distance from each point in the extracted point cloud of the outer contour surface of the ship to the candidate plane, if the distance from the current point to the candidate plane is less than the distance threshold, recording the current point as an inner point, and counting the number of inner points; S34, repeating S32~S33 until the maximum number of iterations is reached; selecting the candidate plane with the largest number of inner points as the first fitting plane; S35, fitting the inner points of the first fitting plane by the least squares method to obtain the normal of the mid-axis plane of the original ship point cloud.
[0010] Optionally, the S42 includes: S421, removing the outer contour surface point cloud of the ship and the points near the outer contour surface point cloud of the ship from the original ship point cloud to obtain a target symmetrical point cloud; S422, fitting two second fitting planes from the target symmetrical point cloud using the RANSAC algorithm; calculating the center points of the two second fitting planes; S423, connecting the center points of the two second fitting planes, finding the midpoint of the connecting line, and using the midpoint of the connecting line as the reference point of the medial axis surface.
[0011] Optionally, removing the point cloud data on the back side of the mid-axis surface includes: calculating the point cloud data on both sides of the mid-axis surface, determining the side with smaller number as the back side of the mid-axis surface; and removing the point cloud data on the back side of the mid-axis surface.
[0012] On the other hand, the present invention provides a ship point cloud back side completion system, which includes: a filtering unit, used to perform radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; a clustering unit, used to screen the de-noised ship point cloud according to the Z value, and cluster the screened de-noised ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the ship's outer contour surface point cloud; a fitting unit, used to fit the extracted ship's outer contour surface point cloud using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; the inner points of the first fitting plane are fitted by the least squares method to obtain the normal of the medial axis surface of the original ship point cloud; a reference point first acquisition unit, used to perform convex hull processing on the extracted ship's outer contour surface point cloud when the ship's outer contour surface point cloud is scanned completely to obtain a convex hull ; Find the two endpoints of the longest line segment in the convex hull, and find the endpoint farthest from the outer contour surface point cloud of the ship from the two endpoints, and use it as the reference point of the medial axis plane; the second reference point acquisition unit is used to find the midpoint of the line connecting any two points on the symmetry plane by using the symmetry feature information when the original ship point cloud contains symmetry feature information, and use it as the reference point of the medial axis plane; the removal unit is used to generate the medial axis plane according to the normal of the medial axis plane and the reference point of the medial axis plane for each case; remove the point cloud data on the back side of the medial axis plane; the symmetry unit is used to perform symmetry operation on the point cloud data on the front side of the medial axis plane according to the medial axis plane for each case, so as to obtain a mirrored ship point cloud; the similarity comparison unit is used to compare the similarity of the two mirrored ship point clouds with the original ship point cloud, so as to select the mirrored ship point cloud with the highest similarity as the target point cloud.
[0013] Optionally, the clustering unit includes: a screening subunit, used to sort all points in the noise reduction ship point cloud from small to large according to the Z value, and extract a preset percentage of points to obtain a screened noise reduction ship point cloud; a clustering subunit, used to cluster the screened noise reduction ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; and the class with the largest number of point clouds among all classes is used as the outer contour surface point cloud of the ship.
[0014] Optionally, the fitting unit includes: a determination subunit, used to determine the minimum number of points, the maximum number of iterations and the distance threshold required for each fitting; a first fitting subunit, used to randomly select the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship, and record them as fitting points; calculate a candidate plane based on all fitting points; a marking subunit, used to calculate the distance from each point in the extracted point cloud of the outer contour surface of the ship to the candidate plane, if the distance from the current point to the candidate plane is less than the distance threshold, then the current point is recorded as an inner point, and the number of inner points is counted; a repeating subunit, used to repeat the first fitting subunit and the marking subunit until the maximum number of iterations is reached; select the candidate plane with the largest number of inner points as the first fitting plane; a second fitting subunit, used to fit the inner points of the first fitting plane by the least squares method to obtain the normal of the mid-axis plane of the original ship point cloud.
[0015] Optionally, the second reference point acquisition unit includes: a removal subunit, used to remove the ship's outer contour surface point cloud and points near the ship's outer contour surface point cloud from the original ship point cloud to obtain a target symmetrical point cloud; a third fitting subunit, used to fit the target symmetrical point cloud using the RANSAC algorithm to respectively fit two second fitting planes; calculate the center points of the two second fitting planes; a connecting subunit, used to connect the center points of the two second fitting planes, and find the midpoint of the connecting line, and use the midpoint of the connecting line as the reference point of the medial axis surface.
[0016] Optionally, removing the point cloud data on the back side of the mid-axis surface includes: calculating the point cloud data on both sides of the mid-axis surface, determining the side with smaller number as the back side of the mid-axis surface; and removing the point cloud data on the back side of the mid-axis surface.
[0017] Beneficial effects of the present invention: The present invention provides a method and system for completing the back side of a ship point cloud, wherein the method can complete the back side data of a ship point cloud under limited sample conditions through mirror drive technology and full use of the inherent symmetry of the ship, thereby reducing the impact of data missing on analysis and application. Through two strategies for determining the mid-axis plane, processing is performed for complete scanning and symmetrical feature information respectively, ensuring that accurate completion effects can be obtained in different situations, thereby improving the overall completion accuracy. This method does not rely on a large amount of training data, but instead completes the point cloud through geometric features and symmetry, and is suitable for application under conditions of limited data acquisition, reducing the cost and complexity of collecting and maintaining large-scale data sets. Through the methods of symmetry drive and geometric analysis, this method is more efficient in terms of computing resource requirements compared to methods such as deep learning, and is suitable for use in resource-constrained environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of a method for completing the back side of a ship point cloud provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a ship point cloud back side completion system provided by an embodiment of the present invention; Figure 3 is a schematic diagram of the structure of a noise reduction ship point cloud provided by an embodiment of the present invention; Figure 4 is a schematic structural diagram of a noise reduction ship point cloud after screening provided by an embodiment of the present invention; Figure 5 is a schematic diagram of the structure of a point cloud of the outer contour surface of a ship provided by an embodiment of the present invention; Figure 6 is a structural schematic diagram of a first fitting plane provided by an embodiment of the present invention; Figure 7 is a schematic structural diagram of a convex shell provided by an embodiment of the present invention; Figure 8 It is a schematic diagram of a structure in which an original ship point cloud provided by an embodiment of the present invention includes symmetric feature information; Fig. 9 It is a schematic diagram of the structure of the target symmetric point cloud provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Figure 1is a flow chart of a method for completing the back side of a ship point cloud provided by an embodiment of the present invention. Figure 1 As shown, the method includes: S1, performing radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; Figure 3 is a schematic diagram of the structure of the noise reduction ship point cloud provided by an embodiment of the present invention; Figure 3 As shown in the figure, radius filtering is a preprocessing technology used to remove noise and outliers. Its main principle is neighborhood analysis based on spatial distance. The following are the basic principles and operation steps of radius filtering: First, each point in the original ship point cloud is processed as follows: Define a radius r with the current point in the original ship point cloud as the center. This radius r determines a spherical area, called a neighborhood. Next, search for all points within the spherical neighborhood in the original ship point cloud. This process usually uses spatial data structures (such as KD trees) to speed up the search process so that points within the neighborhood can be found efficiently. Then, calculate the number of points contained in the spherical neighborhood. If the number is lower than a preset threshold, the current point in the original ship point cloud is considered to be an isolated point or a noise point. Finally, the current points whose number of points in the neighborhood is lower than the threshold are marked as noise points and removed from the original ship point cloud dataset.
[0021] Radius filtering can effectively remove outliers and noise points in the original ship point cloud to obtain a de-noised ship point cloud and improve the quality of the ship point cloud data.
[0022] S2, filtering the noise reduction ship point cloud according to the Z value, and clustering the filtered noise reduction ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the outer contour surface point cloud of the ship; In an alternative embodiment, Figure 4 is a schematic structural diagram of a noise reduction ship point cloud after screening provided by an embodiment of the present invention; Figure 5 is a schematic diagram of the structure of the point cloud of the outer contour surface of a ship provided by an embodiment of the present invention; Figure 4 and Figure 5 As shown, the S2 includes: S21, sorting all points in the noise reduction ship point cloud from small to large according to the Z value, and extracting a preset percentage of points to obtain a filtered noise reduction ship point cloud; All points in the de-noised ship point cloud are sorted from small to large according to the Z value, in order to reorganize the data according to the position in the vertical direction. Due to the limitations of LiDAR acquisition, there is no point cloud data on the back of the ship. By sorting all points in the de-noised ship point cloud from small to large according to the Z value and extracting the first 60% of the data, the point cloud of the front outer contour surface of the ship can be effectively separated, that is, the filtered de-noised ship point cloud is obtained.
[0023] S22, clustering the filtered noise-reduced ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; and taking the class with the largest number of point clouds among all classes as the outer contour surface point cloud of the ship.
[0024] The de-noised ship point cloud (the point cloud of the front outer contour surface of the ship) after screening may contain other irrelevant data points. In order to obtain a pure outer contour surface point cloud, the DBSCAN clustering algorithm is used to cluster the point cloud (i.e., the point cloud of the front outer contour surface of the ship) to obtain multiple classes (i.e., clusters), and the class with the largest number of point clouds among all classes is returned. The algorithm uses the density characteristics of the point group for cluster analysis. The class required is the pure outer contour surface point cloud (i.e., the outer contour surface point cloud of the ship).
[0025] DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based spatial clustering algorithm that is widely used in data analysis and is particularly suitable for processing point group data with high noise and irregular shapes. Its basic principles and implementation steps are as follows: (1) Core points, boundary points and noise points: Core point: A point is a core point if its neighborhood contains at least a specified number of other points (called the minimum number of points MinPts).
[0026] Boundary point: If a point does not meet the conditions of a core point, but falls within the neighborhood of a core point, then the point is a boundary point.
[0027] Noise points: Points that are neither core points nor boundary points are considered noise points.
[0028] (2) Neighborhood definition: The neighborhood of each point is defined by a specified radius (ε), called the ε neighborhood. The number of points contained in the neighborhood is used to determine whether the point is a core point.
[0029] (3) Cluster construction: First, start from any unvisited point and check whether it is a core point. Then, if it is a core point, start with the core point and gradually add density-reachable points to the same cluster. Density-reachable means all points that can be connected through a series of core points. Then, if the point is not a core point, mark it as a noise point or a boundary point.
[0030] (4) Extended cluster: For each core point, try to expand its cluster. For each point in the neighborhood, if the point is an unvisited core point, continue to expand. If the point is a boundary point or has been visited, just add it to the current cluster.
[0031] (5) Termination conditions: When all points have been visited, the algorithm terminates and several clusters and possible noise points are obtained.
[0032] S3, fitting the extracted outer contour surface point cloud of the ship using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; fitting the inner points of the first fitting plane using the least squares method to obtain the normal line of the medial axis surface of the original ship point cloud; Figure 6 is a schematic diagram of the structure of the first fitting plane provided by an embodiment of the present invention; Figure 6 As shown in the figure, RANSAC (Random Sample Consensus) is an iterative random algorithm that can identify internal points from the input point cloud data and fit the plane in the point cloud data.
[0033] In an optional implementation, S3 includes: S31, determining the minimum number of points required for each fitting (for plane fitting, at least 3 non-collinear points are required), the maximum number of iterations, and the distance threshold; S32, randomly selecting the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship, and recording them as fitting points; and calculating a candidate plane according to all the fitting points; For example: randomly select 3 points from the point cloud of the outer contour surface of a ship, and fit a candidate plane based on these 3 points; The plane equation is: Ax+By+Cz+D=0 The normal vector of the plane is (A, B, C), and D is the intercept of the plane equation. Substituting the three points into the above plane equation, we can get the normal vector of the plane (A, B, C), and then calculate the candidate plane.
[0034] S33, calculating the distance between each point in the extracted point cloud of the outer contour surface of the ship and the candidate plane, if the distance between the current point and the candidate plane is less than the distance threshold, the current point is recorded as an inner point, and the number of inner points is counted; S34, repeat S32 to S33 until the maximum number of iterations is reached; select the candidate plane with the largest number of internal points as the first fitting plane; Use three different points for fitting each time, record the number of inliers for each fitting, and finally select the candidate plane with the most inliers as the first fitting plane.
[0035] S35. Fit the inner points of the first fitting plane by the least square method to obtain the normal line of the medial axis surface of the original ship point cloud.
[0036] The principle of least squares method for plane fitting is to find the optimal plane model by minimizing the sum of squared errors. Given a set of 3D point cloud data, the goal is to fit a plane equation , so that the sum of distances between the plane and the data points is minimized. For each point Its distance to the plane can be expressed in error form as The goal of the least squares method is to minimize the sum of squares of these errors, that is, By constructing a system of linear equations and using linear algebra techniques such as matrix operations (usually normal equations ), the plane parameters a, b, c, d can be solved. These parameters define the optimal plane, which minimizes the total sum of square errors between the plane and the data points.
[0037] In the above steps, when the normal line of the medial axis surface has been determined, it is only necessary to determine a reference point of the medial axis surface to completely define the medial axis surface.
[0038] S41. When the scan of the outer contour surface point cloud of the ship is complete, the extracted outer contour surface point cloud of the ship is subjected to convex hull processing to obtain a convex hull; two endpoints of the longest line segment in the convex hull are found, and the endpoint farthest from the outer contour surface point cloud of the ship is found from the two endpoints, and the endpoint is used as the reference point of the medial axis surface; In an alternative embodiment, Figure 7 is a schematic diagram of the structure of the convex shell provided by an embodiment of the present invention; Figure 7 As shown, this step is to find the bow point of the point cloud of the outer contour surface of the ship and use the bow point as the reference point of the mid-axis surface.
[0039] The convex hull processing of the point cloud of the outer contour surface of a ship is a computational geometry algorithm, which aims to find the smallest convex polyhedron that surrounds a set of points. The convex hull refers to the smallest convex hull that can contain all the points in the point cloud dataset. For a given point cloud dataset, the convex hull can be regarded as a "shell" that tightly wraps the data points, similar to the shape formed by wrapping all the points with an elastic membrane. The application of the convex hull is to simplify complex data structures.
[0040] When performing convex hull processing, you first need to input a point cloud dataset defined by three-dimensional coordinates (the point cloud of the outer contour surface of the ship). The algorithm selects an initial point from the point set and starts to build a convex polyhedron containing all the points. Through iteration, the algorithm selects appropriate points to expand and adjust the patch of the convex polyhedron so that each new point keeps the patch shape convex. At each step, ensure that the surface of the polyhedron formed after adding new points is still convex, that is, any line connecting the inner and outer points will not pass through the polyhedron.
[0041] Find the two endpoints of the longest line segment in the convex hull, and find the endpoint farthest from the outer contour surface point cloud of the ship from the two endpoints. This endpoint is the bow point of the outer contour surface point cloud of the ship, and it is used as the reference point of the median axis surface.
[0042] S42, when the original ship point cloud contains symmetry feature information, the midpoint of the line connecting any two points on the symmetry plane is calculated by using the symmetry feature information, and the midpoint is used as the reference point of the median axis plane; In an alternative embodiment, Figure 8 is a schematic diagram of the structure of the original ship point cloud provided by an embodiment of the present invention including symmetric feature information; Figure 8 As shown, the S5 includes: S421, removing the outer contour surface point cloud of the ship and points near the outer contour surface point cloud of the ship from the original ship point cloud to obtain a target symmetrical point cloud; Fig. 9 is a schematic diagram of the structure of the target symmetric point cloud provided by an embodiment of the present invention, such as Fig. 9 As shown, through the above process, the point cloud except the outer contour surface point cloud of the ship, that is, the target symmetric point cloud, can be retained.
[0043] S422, using the RANSAC algorithm to fit the target symmetrical point cloud to two second fitting planes respectively; and calculating the center points of the two second fitting planes; That is, the target symmetrical point cloud is two point clouds, the two point clouds are symmetrical in shape, and the second fitting plane is fitted to each point cloud using the RANSAC algorithm to obtain two second fitting planes; the center point of each second fitting plane is calculated.
[0044] S423, connecting the center points of the two second fitting planes, finding the midpoint of the connecting line, and using the midpoint of the connecting line as the reference point of the medial axis surface.
[0045] S5. For each case, generate a medial axis surface according to the normal line of the medial axis surface and the reference point of the medial axis surface; remove the point cloud data on the back side of the medial axis surface; In an optional embodiment, two medial axis surfaces based on two methods are generated in the above manner, and for each case: the point cloud data located on the back side of the medial axis surface is removed.
[0046] The step of removing the point cloud data on the back side of the medial axis surface comprises: The point cloud data on both sides of the mid-axis surface are calculated, and the side with a smaller number of point cloud data is determined as the back side of the mid-axis surface; and the point cloud data on the back side of the mid-axis surface are removed.
[0047] S6. For each case, the point cloud data on the front side of the mid-axis plane is symmetrically operated according to the mid-axis plane to obtain a mirror image ship point cloud; S7. Compare the two mirror image ship point clouds with the original ship point cloud for similarity, so as to select the mirror image ship point cloud with the highest similarity as the target point cloud.
[0048] Specifically, take a mirrored ship point cloud as an example: Calculate the Chamfer Distance between the current mirrored ship point cloud and the original ship point cloud. The calculation formula is as follows: ; in, For the current mirrored ship point cloud, is the original ship point cloud, To calculate the point set Each point-to-point set The average distance between the closest points, To calculate the point set Each point-to-point set The average distance between the nearest points in the two points is calculated by adding the two average distances to get the chamfer distance between the two point sets. The smaller this distance is, the more similar the two point sets are.
[0049] Through the above method, the mirror image ship point cloud with the highest similarity is selected as the target point cloud.
[0050] Figure 2 is a structural schematic diagram of a ship point cloud back side completion system provided by an embodiment of the present invention; Figure 2 As shown, the system includes: The filtering unit 201 is used to perform radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; The clustering unit 202 is used to filter the noise reduction ship point cloud according to the Z value, and cluster the filtered noise reduction ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the outer contour surface point cloud of the ship; The fitting unit 203 is used to fit the extracted outer contour surface point cloud of the ship using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; the inner points of the first fitting plane are fitted by the least square method to obtain the normal line of the medial axis surface of the original ship point cloud; The first reference point acquisition unit 2041 is used to perform convex hull processing on the extracted point cloud of the outer contour surface of the ship to obtain a convex hull when the scan of the point cloud of the outer contour surface of the ship is complete; find the two endpoints of the longest line segment in the convex hull, and find the endpoint farthest from the outer contour surface point cloud of the ship from the two endpoints, and use it as the reference point of the medial axis surface; The second reference point acquisition unit 2042 is used to find the midpoint of the line connecting any two points on the symmetry plane by using the symmetry feature information when the original ship point cloud contains symmetry feature information, and use it as the reference point of the median axis plane; A removal unit 205 is used to generate a medial axis surface according to the normal line of the medial axis surface and the reference point of the medial axis surface for each case; and remove the point cloud data on the back side of the medial axis surface; A symmetry unit 206 is used for, for each case, performing a symmetric operation on the point cloud data on the front side of the mid-axis plane according to the mid-axis plane to obtain a mirror image ship point cloud; The similarity comparison unit 207 is used to compare the two mirror image ship point clouds with the original ship point cloud to select the mirror image ship point cloud with the highest similarity as the target point cloud.
[0051] In an optional implementation, the clustering unit 202 includes: The screening subunit 221 is used to sort all the points in the noise reduction ship point cloud from small to large according to the Z value, and extract the points with a preset percentage to obtain the screened noise reduction ship point cloud; The clustering subunit 2022 is used to cluster the filtered noise-reduced ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; and the class with the largest number of point clouds among all classes is used as the outer contour surface point cloud of the ship.
[0052] In an optional implementation, the fitting unit 203 includes: A determination subunit 2031 is used to determine the minimum number of points, the maximum number of iterations and the distance threshold required for each fitting; The first fitting subunit 2032 is used to randomly select the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship and record them as fitting points; and calculate a candidate plane according to all the fitting points; The marking subunit 2033 is used to calculate the distance between each point in the extracted point cloud of the outer contour surface of the ship and the candidate plane. If the distance between the current point and the candidate plane is less than the distance threshold, the current point is recorded as an inner point, and the number of inner points is counted; A repeating subunit 2034 is used to repeat the first fitting subunit 2032 and the marking subunit 2033 until the maximum number of iterations is reached; and the candidate plane with the largest number of inliers is selected as the first fitting plane; The second fitting subunit 2035 is used to fit the inner points of the first fitting plane by the least square method to obtain the normal line of the medial axis plane of the original ship point cloud.
[0053] In an optional implementation, the reference point second acquisition unit 2042 includes: The removal subunit 20421 is used to remove the outer contour surface point cloud of the ship and the points near the outer contour surface point cloud of the ship from the original ship point cloud to obtain the target symmetrical point cloud; The third fitting subunit 20422 is used to fit the target symmetrical point cloud into two second fitting planes respectively by using the RANSAC algorithm; and calculate the center points of the two second fitting planes; The line connecting subunit 20423 is used to connect the center points of the two second fitting planes, find the midpoint of the connecting line, and use the midpoint of the connecting line as the reference point of the medial axis surface.
[0054] In an optional embodiment, removing the point cloud data on the back side of the mid-axis surface includes: The point cloud data on both sides of the mid-axis surface are calculated, and the side with a smaller number of point cloud data is determined as the back side of the mid-axis surface; and the point cloud data on the back side of the mid-axis surface are removed.
[0055] Beneficial effects of the present invention: The present invention provides a method and system for completing the back side of a ship point cloud, wherein the method can complete the back side data of a ship point cloud under limited sample conditions through mirror drive technology and full use of the inherent symmetry of the ship, thereby reducing the impact of data missing on analysis and application. Through two strategies for determining the mid-axis plane, processing is performed for complete scanning and symmetrical feature information respectively, ensuring that accurate completion effects can be obtained in different situations, thereby improving the overall completion accuracy. This method does not rely on a large amount of training data, but instead completes the point cloud through geometric features and symmetry, and is suitable for application under conditions of limited data acquisition, reducing the cost and complexity of collecting and maintaining large-scale data sets. Through the methods of symmetry drive and geometric analysis, this method is more efficient in terms of computing resource requirements compared to methods such as deep learning, and is suitable for use in resource-constrained environments.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for completing the back side of a ship point cloud, characterized in that: include: S1, performing radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; S2, filtering the noise reduction ship point cloud according to the Z value, and clustering the filtered noise reduction ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the outer contour surface point cloud of the ship; S3, fitting the extracted outer contour surface point cloud of the ship using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; fitting the inner points of the first fitting plane using the least squares method to obtain the normal line of the medial axis surface of the original ship point cloud; S41. When the scan of the outer contour surface point cloud of the ship is complete, the extracted outer contour surface point cloud of the ship is subjected to convex hull processing to obtain a convex hull; two endpoints of the longest line segment in the convex hull are found, and the endpoint farthest from the outer contour surface point cloud of the ship is found from the two endpoints, and the endpoint is used as the reference point of the medial axis surface; S42, when the original ship point cloud contains symmetry feature information, the midpoint of the line connecting any two points on the symmetry plane is calculated by using the symmetry feature information, and the midpoint is used as the reference point of the median axis plane; S5. For each case, generate a medial axis surface according to the normal line of the medial axis surface and the reference point of the medial axis surface; remove the point cloud data on the back side of the medial axis surface; S6. For each case, the point cloud data on the front side of the mid-axis plane is symmetrically operated according to the mid-axis plane to obtain a mirror image ship point cloud; S7. Compare the two mirror image ship point clouds with the original ship point cloud for similarity, so as to select the mirror image ship point cloud with the highest similarity as the target point cloud.
2. The method according to claim 1, characterized in that The S2 includes: S21, sorting all points in the noise reduction ship point cloud from small to large according to the Z value, and extracting a preset percentage of points to obtain a filtered noise reduction ship point cloud; S22, clustering the filtered noise-reduced ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; and taking the class with the largest number of point clouds among all classes as the outer contour surface point cloud of the ship.
3. The method according to claim 1, characterized in that The S3 includes: S31, determining the minimum number of points, maximum number of iterations and distance threshold required for each fitting; S32, randomly selecting the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship, and recording them as fitting points; and calculating a candidate plane according to all the fitting points; S33, calculating the distance between each point in the extracted point cloud of the outer contour surface of the ship and the candidate plane, if the distance between the current point and the candidate plane is less than the distance threshold, the current point is recorded as an inner point, and the number of inner points is counted; S34, repeat S32 to S33 until the maximum number of iterations is reached; select the candidate plane with the largest number of internal points as the first fitting plane; S35. Fit the inner points of the first fitting plane by the least square method to obtain the normal line of the medial axis surface of the original ship point cloud.
4. The method according to claim 1, characterized in that: The S42 includes: S421, removing the outer contour surface point cloud of the ship and points near the outer contour surface point cloud of the ship from the original ship point cloud to obtain a target symmetrical point cloud; S422, using the RANSAC algorithm to fit the target symmetrical point cloud to two second fitting planes respectively; and calculating the center points of the two second fitting planes; S423, connecting the center points of the two second fitting planes, finding the midpoint of the connecting line, and using the midpoint of the connecting line as the reference point of the medial axis surface.
5. The method according to claim 1, characterized in that The step of removing the point cloud data on the back side of the medial axis surface comprises: The point cloud data on both sides of the mid-axis surface are calculated, and the side with a smaller number of point cloud data is determined as the back side of the mid-axis surface; and the point cloud data on the back side of the mid-axis surface are removed.
6. A ship point cloud back side completion system, characterized in that: include: A filtering unit is used to perform radius filtering preprocessing on the original ship point cloud to obtain a de-noised ship point cloud; A clustering unit is used to filter the noise reduction ship point cloud according to the Z value, and cluster the filtered noise reduction ship point cloud using the DBSCAN clustering algorithm to extract the class with the largest number of point clouds as the outer contour surface point cloud of the ship; The fitting unit is used to fit the extracted outer contour surface point cloud of the ship using the RANSAC algorithm to obtain a first fitting plane and the inner points of the first fitting plane; the inner points of the first fitting plane are fitted by the least square method to obtain the normal line of the medial axis surface of the original ship point cloud; The first reference point acquisition unit is used to perform convex hull processing on the extracted point cloud of the outer contour surface of the ship to obtain a convex hull when the scan of the point cloud of the outer contour surface of the ship is complete; find the two endpoints of the longest line segment in the convex hull, and find the endpoint farthest from the outer contour surface point cloud of the ship from the two endpoints, and use it as the reference point of the medial axis surface; The second reference point acquisition unit is used to find the midpoint of the line connecting any two points on the symmetry plane by using the symmetry feature information when the original ship point cloud contains symmetry feature information, and use it as the reference point of the median axis plane; A removal unit is used to generate a medial axis surface according to the normal line of the medial axis surface and the reference point of the medial axis surface for each case; and remove the point cloud data on the back side of the medial axis surface; A symmetry unit, for each case, performing a symmetric operation on the point cloud data on the front side of the mid-axis plane according to the mid-axis plane to obtain a mirror image ship point cloud; The similarity comparison unit is used to compare the two mirror image ship point clouds with the original ship point cloud to select the mirror image ship point cloud with the highest similarity as the target point cloud.
7. The system according to claim 6, characterized in that The clustering unit comprises: A screening subunit is used to sort all points in the noise reduction ship point cloud from small to large according to the Z value, and extract a preset percentage of points to obtain a screened noise reduction ship point cloud; The clustering subunit is used to cluster the filtered noise-reduced ship point cloud using the DBSCAN clustering algorithm to obtain multiple classes; the class with the largest number of point clouds among all classes is used as the outer contour surface point cloud of the ship.
8. The system according to claim 7, characterized in that The fitting unit comprises: Determine the subunit, which is used to determine the minimum number of points, the maximum number of iterations and the distance threshold required for each fitting; The first fitting subunit is used to randomly select the minimum number of points required for the current fitting in the extracted point cloud of the outer contour surface of the ship and record them as fitting points; and calculate a candidate plane according to all the fitting points; A marking subunit is used to calculate the distance between each point in the extracted point cloud of the outer contour surface of the ship and the candidate plane. If the distance between the current point and the candidate plane is less than the distance threshold, the current point is recorded as an inner point, and the number of inner points is counted; A repeating subunit is used to repeat the first fitting subunit and the marking subunit until the maximum number of iterations is reached; and the candidate plane with the largest number of inliers is selected as the first fitting plane; The second fitting subunit is used to fit the inner points of the first fitting plane by the least square method to obtain the normal line of the medial axis surface of the original ship point cloud.
9. The system according to claim 6, characterized in that The reference point second acquisition unit comprises: A removal subunit is used to remove the outer contour surface point cloud of the ship and points near the outer contour surface point cloud of the ship from the original ship point cloud to obtain a target symmetrical point cloud; The third fitting subunit is used to fit the target symmetrical point cloud into two second fitting planes respectively by using the RANSAC algorithm; and calculate the center points of the two second fitting planes; The connecting line subunit is used to connect the center points of the two second fitting planes and find the midpoint of the connecting line, and use the midpoint of the connecting line as the reference point of the medial axis surface.
10. The system according to claim 6, characterized in that The step of removing the point cloud data on the back side of the medial axis surface comprises: The point cloud data on both sides of the mid-axis surface are calculated, and the side with a smaller number of point cloud data is determined as the back side of the mid-axis surface; and the point cloud data on the back side of the mid-axis surface are removed.
Citation Information
Patent Citations
Method for calibrating bow direction of ship based on geographic orientation under condition that ship in ship lock is static
CN117974773A
Obstacle recognition method for autonomous robots
US20240310851A1