A method and system for cabin boundary recognition based on point cloud map

By combining RANSAC plane fitting and Sobel edge detection algorithm, multi-lidar fusion and cross-validation are used to solve the problem of low boundary recognition accuracy in cabin environment, and high-precision and stable boundary extraction are achieved.

CN120198865BActive Publication Date: 2025-08-08LEIKE ZHITU (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510670957.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-08
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The prior art has low boundary recognition accuracy in cabin environments, making it difficult to adapt to complex environment changes, and a single algorithm cannot effectively filter interference and verify the quality of boundary extraction.

Method used

Combining RANSAC plane fitting and Sobel edge detection algorithm, boundary extraction is performed through multi-lidar fusion and cross-verification mechanisms, and adaptive threshold adjustment method is adopted to improve boundary recognition accuracy.

Benefits of technology

In complex cabin environments, the accuracy and robustness of boundary recognition are significantly improved, the difficulty of misidentification and parameter adjustment is reduced, and the adaptability to different navigation states is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198865B_ABST
    Figure CN120198865B_ABST
Patent Text Reader

Abstract

The present application discloses a cabin boundary recognition method and system based on a point cloud map, which relates to unmanned cabin operation, including: collecting point cloud data in the cabin, and fusing the point cloud data to obtain a fused point cloud; pre-processing the fused point cloud to obtain a static point cloud; extracting the boundary using the RANSAC algorithm based on the static point cloud to obtain a first boundary; converting the static point cloud into a raster map, and extracting the boundary of the raster map using the Sobel algorithm to obtain a second boundary; cross-validating the first boundary and the second boundary, and determining the boundary consistency by calculating the overlap between the two; based on the cross-validation results, using the boundary that passes the consistency verification as the cabin boundary, and correcting the boundary that fails the consistency verification by adjusting the threshold method. In view of the low boundary extraction accuracy in complex cabin environments, the present application combines RANSAC plane fitting with Sobel edge detection for boundary extraction, etc., to improve the cabin boundary extraction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to unmanned cabin driving, and in particular to a cabin boundary recognition method and system based on point cloud maps. Background Art

[0002] In automated ship operations, the spatial layout of the cabin interior is crucial for tasks such as internal navigation, robot positioning, and cargo handling. With the trend toward intelligent and unmanned shipping, accurate cabin boundary identification has become a fundamental capability of ship automation systems, directly impacting operational efficiency, safety, and resource utilization within the vessel. Traditional cabin boundary identification methods rely on manual annotation and simple geometric models, and fail to consider the impact of cargo piles and dynamic obstacles. These methods are not only inefficient but also susceptible to environmental changes, equipment errors, and other factors, resulting in low recognition accuracy.

[0003] With the development of laser radar (LiDAR) technology, point cloud data has become an important tool for spatial environment modeling. Especially in complex spaces such as ship cabins, point cloud data can provide high-precision three-dimensional environmental information. Therefore, how to use point cloud maps to automatically identify cabin boundaries has become a hot topic of research.

[0004] Existing technologies for cabin boundary extraction generally use a single LiDAR scan and a single boundary extraction algorithm. Although point cloud-based environment modeling methods exist, they suffer from the following technical drawbacks in the unique environment of a cabin:

[0005] Traditional point cloud or image data often contains significant noise, such as scanning errors, lighting variations, and environmental interference. Existing methods lack effective filtering mechanisms for unique interference in the ship's hold, such as material piles, roof structures, and dynamic obstacles. Single algorithms lack a result verification mechanism, making it impossible to evaluate the quality of boundary extraction or adaptively adjust parameters based on environmental complexity.

[0006] These technical defects are particularly evident in the cabin environment because the cabin has special environmental characteristics: the spatial structure is complex, with both regular planes and irregular curved surfaces; it may contain reflective materials and special coatings, which lead to laser measurement anomalies; the lighting conditions are limited and the point cloud density is uneven; the boundary features are diverse, with both obvious geometric boundaries and texture boundaries.

[0007] Traditional single-algorithm solutions perform differently in this environment: RANSAC, which recognizes planes based on random sampling of geometric features and consistency of interior points, accurately identifies regular structures but has limited ability to handle complex boundaries. Sobel edge detection is sensitive to edge variations but also sensitive to noise and lacks 3D spatial understanding. Furthermore, common equipment found in ship cabins, such as pipes and brackets, can be misidentified as boundaries by single algorithms, resulting in significant errors.

[0008] Especially in the vibration and swaying conditions of a ship, adjusting the parameters of a single algorithm is difficult to adapt to environmental changes, resulting in a significant decrease in the reliability of boundary recognition. These issues make it difficult for existing technologies to meet the high requirements of ship automation for boundary recognition accuracy and robustness. There is an urgent need to develop new boundary recognition methods that can adapt to the complex environment of the ship cabin. Summary of the Invention

[0009] To address the low accuracy of boundary extraction in complex cabin environments, this application provides a cabin boundary recognition method and system based on point cloud maps. It combines two complementary algorithms, RANSAC plane fitting and Sobel edge detection, for boundary extraction, and introduces an overlap cross-validation mechanism to evaluate boundary consistency. At the same time, an adaptive threshold adjustment method is designed to achieve boundary correction, thereby improving the accuracy of cabin boundary extraction.

[0010] One aspect of the present application provides a cabin boundary recognition method based on a point cloud map, comprising: collecting point cloud data in the cabin, and fusing the point cloud data to obtain a fused point cloud; preprocessing the fused point cloud to obtain a static point cloud; extracting a boundary based on the static point cloud using a RANSAC algorithm to obtain a first boundary; converting the static point cloud into a raster map, and extracting a boundary based on the raster map using a Sobel algorithm to obtain a second boundary; cross-validating the first boundary and the second boundary, and determining boundary consistency by calculating the degree of overlap between the two; and based on the cross-validation result, using the boundary that passes the consistency verification as the cabin boundary, and correcting the boundary that fails the consistency verification using a threshold adjustment method.

[0011] In particular, the spatial coverage and point cloud preprocessing of multiple lidars in this application form a "quality foundation", providing high-quality input for boundary extraction; the boundary extraction of dual algorithms verifies each other to form a "complementary correction", which greatly reduces the risk of failure of a single algorithm; the cross-validation and parameter adjustment mechanism constitute the "self-improvement" capability to adapt to the complex and changing cabin environment.

[0012] Furthermore, point cloud data inside the cabin is collected and fused, including: using the top lidar as the main lidar and the left and right lidars as side lidars; using the NDT point cloud registration method for spatial synchronous calibration to obtain the homogeneous transformation matrix of the side lidar relative to the main lidar; among them, NDT is a point cloud registration method based on probability density function and does not rely on feature extraction; compared with the ICP algorithm, NDT has lower dependence on initial pose estimation and usually requires fewer iterations.

[0013] The host computer installed in the cabin serves as the PTP (Precision Time Protocol) time source (master), and all lidars serve as PTP time clients (slaves). PTP time synchronization is used for time synchronization. PTP is a high-precision network time synchronization protocol defined in the IEEE 1588 standard. It uses a master-slave architecture for time synchronization, with the host computer in the cabin serving as the time master node and all lidars serving as slave nodes.

[0014] The top main lidar point cloud and the lidar point clouds on both sides that have been spatially calibrated and time synchronized are subjected to abnormality judgment, denoising and dedistortion processing. The processed point clouds are spliced and fused through the homogeneous transformation matrix to obtain a fused point cloud in the same coordinate system.

[0015] In particular, a ship's cabin is a closed three-dimensional space with a complex geometric structure. The top lidar, serving as the primary radar, typically offers a wider field of view, ideal for capturing the cabin's overall structure. The left and right lidars, acting as side radars, complement the top radar's blind spots, particularly the sidewalls and obscured areas. This "1+2" arrangement forms a spatial triangulation structure, enhancing the spatial coverage and geometric integrity of the point cloud. A single lidar, constrained by its mounting position, inevitably experiences self-occlusion. Lidars at different angles can optimize the angle of incidence between the laser beam and the surface, reducing measurement errors caused by extreme angles of incidence.

[0016] Furthermore, the fused point cloud is preprocessed, including: calculating the angles of the vertical height difference and the horizontal height difference of the points in the same column of two adjacent scanning beams through ground pile filtering based on the fused point cloud, and obtaining points with angles less than a threshold θ as the point cloud with the ground pile removed; in particular, the laser radar scans the beams row by row to form a structured point cloud; for the points of adjacent beams in the same column, the angles of the vertical and horizontal differences are calculated; the ground and piles usually have gentle angle changes, so an angle threshold θ is set, and points less than the threshold are judged to be the ground or piles; the use of local geometric gradients rather than global plane fitting is more suitable for uneven cabin floors and piles; through angle threshold parameterization, it can adapt to floors with different inclinations; beam structured analysis reduces computational complexity and is suitable for real-time processing.

[0017] According to the point cloud without the ground material pile, the point cloud above the preset height threshold is filtered out to obtain the point cloud without the cabin. Specifically, the Z-axis height threshold is set based on the structural characteristics of the cabin, and the dimensional clipping operation is performed.

[0018] According to the point cloud without cabin fixed points, the point cloud generated by the moving objects in the cabin is identified and removed to obtain the static point cloud as the processed fused point cloud;

[0019] Specifically, this application constructs a highly structured, three-level progressive preprocessing system, forming a spatial information purification mechanism that purifies data from large to small, from static to dynamic. Ground surface pile filtering eliminates large, near-horizontal structures; cabin ceiling filtering removes high-level non-target areas; and dynamic object filtering meticulously eliminates motion interference. This hierarchical design achieves an optimal balance between computational complexity and filtering accuracy. The front-level processing reduces the amount of data required by the back-level processing, improving overall efficiency.

[0020] Furthermore, a static point cloud is obtained, including: calculating the position change of the point in the continuous scan, defining the position of the point in the t-th scan and the t+1-th scan respectively and , the position change of the point is calculated by the distance formula Calculation; Calculation is based on the consistency score C within the time window, , where N is the number of scans in the time window and n is the number of occurrences when the point position change is below the threshold; in this application, not only two adjacent frames are analyzed, but statistical analysis is performed within the N-frame window. Calculate the standard deviation σ of the point position in n occurrences, where , is the average position of the point in n occurrences; the dynamics of the point is judged according to the consistency score C and the standard deviation σ. or When , the point is considered to be a dynamic point, where and is the preset threshold; the DBSCAN clustering algorithm is used to group the point cloud data to form point cloud clusters; the centroid change of each point cloud cluster is calculated and shape transformation ,in, and are the cluster centroids at time t and t+1, and The shape descriptor representing the cluster; according to the set threshold and Determine the dynamics of point cloud clustering, when or When , the corresponding point cloud cluster is marked as a dynamic cluster; and all points in the dynamic cluster are marked as dynamic points; the point cloud marked as dynamic points is filtered and eliminated by the statistical outlier algorithm to obtain a static point cloud.

[0021] Specifically, this application combines point-level labeling with cluster-level labeling: single-point analysis identifies small or slowly moving dynamic points; cluster analysis captures objects in overall motion, even when individual point movement is subtle. Points marked as dynamic undergo a final filtering process to remove misclassified points. Point-level analysis captures the dynamic characteristics of scattered small objects, while cluster-level analysis identifies large, collectively moving objects. The dual centroid and morphology analysis reduces the probability of misclassification. Finally, a statistical outlier algorithm performs filtering, creating a triple-layered security mechanism.

[0022] Furthermore, the first boundary is obtained, including: (1) constructing a plane model for plane fitting , where A, B, and C are the plane normal vector components, and D is the plane offset. is the point coordinate in the point cloud; the plane model transforms the plane structure in the cabin into a point in the parameter space, realizing the mapping from the point set to the geometric features. (2) Initialize the RANSAC algorithm parameters, including: setting the maximum number of iterations N, the error threshold ε, and the minimum number of inliers in the plane model. ; Among them, the error threshold ε represents the maximum allowable distance for a point to be considered as part of the plane, and its physical meaning is "the comprehensive representation of measurement noise and model deviation"; the minimum number of inliers threshold Represents the minimum number of points that constitute a valid plane, and its physical meaning is "the point density representation of the minimum detectable area of the plane"; (3) Execute the RANSAC algorithm to obtain the candidate plane model and the corresponding inlier set; Among them, the RANSAC algorithm is based on the Markov Monte Carlo sampling theory. This random sampling strategy is particularly suitable for the complex environment with a large number of non-planar interference elements in the cabin. During the N iterations, RANSAC performs an implicit maximum a posteriori probability (MAP) estimation: 3 points randomly selected each time constitute a sampling point in the hypothesis space; the size of the inlier set is used as an approximation of the likelihood function; the iterative process is essentially searching for the global optimal solution in the hypothesis space; this optimization strategy avoids the defect that the traditional least squares method is easily affected by outliers. (4) Repeat step (3) N times and select the plane model with the largest number of inliers as the best plane model; Among them, N is a positive integer; (5) If the number of inliers in the best plane model is greater than the threshold , then the corresponding plane is identified as a valid plane and the identified valid plane is removed from the point cloud; (6) Repeat steps (3) to (5) for the remaining point clouds until the number of inliers in the plane model is less than the threshold (7) extract all identified plane edge points to form the first boundary of the cabin;

[0023] In particular, the cabin is mainly a planar structure, which just meets the planar model assumption of RANSAC. Noise points generated by factors such as hull vibration and measurement errors can be effectively filtered out. Even if the plane part is blocked by the equipment, RANSAC can still identify the entire plane through the visible part.

[0024] Furthermore, the RANSAC algorithm is executed to obtain the candidate plane model and the corresponding inlier set, including: randomly selecting 3 points from the static point cloud 、 、 ; Based on the 3 selected points , fit the plane model and calculate the plane normal vector ; Calculate plane offset ; Calculate each point in the point cloud Distance to the fitting plane ; Statistical distance Points smaller than the error threshold ε are considered inliers, and the number of inliers num_inliers is calculated; the current candidate plane model and the corresponding inlier set are recorded.

[0025] Furthermore, obtaining the second boundary involves converting the static point cloud into a two-dimensional grid map, where the grid value represents the occupancy status of the location in space, with 0 representing free space, 100 representing occupied space, and -1 representing an unknown area. Specifically, the main structural features of the cabin are adequately represented in the plan view; vertical structures (such as walls) appear as edges in the top view; although height information is lost, it is not necessary for the boundary detection task.

[0026] Normalize the grid map, set the value of the unknown area to 0, and divide the occupancy value by 100 to obtain the normalized grid map norm_grid. Among them, 0: represents free space, no point cloud falls within the grid; 100: represents occupied, there is a point cloud within the grid; -1: represents unknown area, there is not enough information to determine the state of the area. This encoding method adopts the idea of probabilistic occupancy grid (OccupancyGrid), but uses a deterministic representation.

[0027] Defines Sobel filters for edge detection, including vertical edge detection filters ;Horizontal edge detection filter ; Among them, the design of these two filters is based on the approximation of central difference numerical differentiation, and smoothing is added (through row / column weights) to reduce the influence of noise.

[0028] Perform a two-dimensional convolution operation on the normalized grid map norm_grid using the defined Sobel filter to obtain: horizontal gradient ; Vertical gradient ; Calculate the gradient magnitude at each grid position ; Use the set threshold T to binarize the gradient amplitude. When , the grid is marked as a boundary point, otherwise it is marked as a non-boundary point; all grid positions marked as boundary points are extracted to form the second boundary of the cabin.

[0029] In particular, Sobel edge detection and RANSAC plane fitting complement each other very well in principle: RANSAC: extracts clear geometric structure boundaries based on geometric model fitting; Sobel: can capture boundaries with texture and density changes based on image gradient changes. RANSAC: performs plane fitting directly in the original 3D space; Sobel: compresses information into 2D for processing, which simplifies the computational complexity. RANSAC: expresses boundaries through the relationship between planes, and tends to express clear geometric features; Sobel: expresses boundaries through pixel gradient changes, and can capture boundaries caused by non-geometric features. The present application is based on a grid boundary extraction method based on the Sobel operator, which captures point cloud density changes through gradient analysis, and provides boundary information for the cabin environment that is complementary to RANSAC plane fitting. It is particularly suitable for identifying boundaries caused by non-geometric features, and improves the comprehensiveness and accuracy of cabin boundary recognition.

[0030] Furthermore, the first boundary and the second boundary are cross-validated, and the boundary consistency is determined by calculating the overlap between the two, including: calculating the overlap OverlapRatio of the two boundaries based on the first boundary and the second boundary, OverlapRatio=(A∩B) / (A∪B), where A represents the area enclosed by the first boundary, B represents the area enclosed by the second boundary, A∩B represents the intersection area of the two areas, and A∪B represents the union area of the two areas; when the overlap OverlapRatio is greater than the preset threshold, it is determined that the boundary consistency is good and the boundary extraction is successful; otherwise, it is determined that the boundary consistency is insufficient and boundary correction is required.

[0031] Furthermore, according to the cross-validation results, the boundary that passes the consistency verification is used as the cabin boundary, and the boundary that fails the consistency verification is corrected by adjusting the threshold method, including: when the overlap is greater than the preset threshold, the intersection area of the first boundary and the second boundary is used as the extracted cabin boundary; when the overlap is less than or equal to the threshold: adjusting the error threshold ε of the RANSAC algorithm, and re-executing step S3 to obtain the adjusted first boundary; wherein the RANSAC error threshold : Controls the distance tolerance between the point and the plane. Increasing it can capture more potential inliers but may introduce noise. Sobel gradient threshold T: Controls the sensitivity of edge detection. Reducing it can identify more potential boundaries but may introduce false boundaries.

[0032] Adjust the gradient threshold T of the Sobel algorithm and re-execute step S4 to obtain the adjusted second boundary. Re-execute the cross-validation process of step S5 for the adjusted first and second boundaries. If the overlap is greater than the threshold, the intersection area of the revised first and second boundaries is used as the final cabin boundary. If the overlap is still less than or equal to the threshold after three threshold adjustments, the result with the highest overlap is selected as the final cabin boundary.

[0033] Another aspect of the present application also provides a cabin boundary recognition system based on a point cloud map, including: a point cloud fusion module, which collects point cloud data in the cabin and fuses it to generate a fused point cloud in the same coordinate system; a point cloud processing module, which performs ground filtering, cabin-fixed filtering and eliminates dynamic points on the fused point cloud to obtain a static point cloud; a RANSAC boundary extraction module, which extracts boundaries based on the static point cloud using the RANSAC algorithm to obtain a first boundary; a Sobel boundary extraction module, which extracts boundaries based on the static point cloud using the Sobel algorithm to obtain a second boundary; a boundary verification module, which cross-validates the first boundary and the second boundary to obtain a final cabin boundary; and a boundary correction module, which corrects the first boundary and the second boundary based on the cross-validation result.

[0034] Compared with the existing technology, the advantages of this application are:

[0035] When dealing with cabin boundary extraction, the existing technology generally adopts a single lidar scanning and a single boundary extraction algorithm. However, there are defects such as incomplete point cloud coverage, inability to effectively filter environmental interference, limited algorithm accuracy and lack of verification mechanism. This application effectively improves the accuracy and robustness of cabin boundary recognition through a technical solution that combines multi-lidar fusion acquisition, three-level point cloud preprocessing, dual-algorithm boundary extraction and cross-validation mechanism.

[0036] In particular, the cabin environment has the following peculiarities: 1) the spatial structure is complex, with both regular planes and irregular curved surfaces; 2) it may contain reflective materials and special coatings, leading to anomalies in laser measurement; 3) the lighting conditions are limited, resulting in uneven point cloud density; and 4) the boundary features are diverse, with both obvious geometric boundaries and texture boundaries. These characteristics make it difficult for a single algorithm to achieve reliable boundary extraction. Among them, RANSAC recognizes planes based on random sampling of geometric features and consistency of inliers. Its advantage lies in its strong robustness to noise and outliers, and its accurate recognition of clear geometric structures (such as the plane of the bulkhead), but its processing capabilities are limited at the intersection of curved and flat surfaces. Sobel edge detection recognizes boundaries based on pixel gradient changes. Its advantage lies in its sensitivity to edge changes and its ability to capture continuous boundaries, but it is sensitive to noise and lacks 3D spatial understanding.

[0037] On the one hand, common equipment such as pipes and brackets in the cabin may be mistakenly identified as boundaries in a single algorithm, but through cross-validation of the two algorithms, these pseudo-boundaries are effectively identified and eliminated, and the accuracy is significantly improved.

[0038] On the other hand, RANSAC can be affected by point cloud density in 3D space, while Sobel can be affected by projection distortion in 2D grids. However, the combination of the two algorithms can still accurately extract boundaries in areas of uneven density within the cabin (such as corners far from the lidar), overcoming the blind spots of a single algorithm. The vibration and swaying conditions of a ship at sea make it difficult to adjust the parameters of a single algorithm. However, this solution achieves stable cabin boundary extraction under different navigation conditions by interactively correcting the two algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The present application will be further described in the form of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting, and in these embodiments, the same numbers represent the same structures, wherein:

[0040] Figure 1 is an exemplary flow chart of a method for identifying cabin boundaries based on a point cloud map according to some embodiments of the present application;

[0041] Figure 2 This is an exemplary flowchart of the calibration of the main lidar and the side lidar according to some embodiments of the present application. DETAILED DESCRIPTION

[0042] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0043] like Figure 1 As shown in the figure, point cloud data in the cabin is collected and fused to obtain a fused point cloud; the fused point cloud is preprocessed to obtain a static point cloud; the boundary is extracted using the RANSAC algorithm based on the static point cloud to obtain the first boundary; the static point cloud is converted into a raster map, and the boundary of the raster map is extracted using the Sobel algorithm to obtain the second boundary; the first boundary and the second boundary are cross-validated, and the boundary consistency is determined by calculating the overlap between the two; based on the cross-validation results, the boundary that passes the consistency verification is used as the cabin boundary, and the boundary that fails the consistency verification is corrected using the threshold adjustment method.

[0044] Specifically, point cloud data collection: obtain the three-dimensional point cloud data in the cabin, complete PTP time synchronization and spatial calibration, perform data preprocessing, such as denoising and downsampling, and splice the real-time lidar point cloud to obtain a fused point cloud.

[0045] Data preprocessing: Remove ground and dynamic points from the cabin point cloud. Point cloud data segmentation: Generate a PCD file based on the fused point cloud. Remove the cabin roof through straight-through filtering. Use feature-based RASC clustering and other methods to segment the point cloud data and extract the boundary points of different areas within the cabin.

[0046] Boundary detection and extraction from point cloud to image: The point cloud data is converted into a raster map format. Using image-based methods, Sobel is used to extract the cabin boundary. Geometric consistency verification: The first boundary and the second boundary are cross-validated to ensure the accuracy of boundary recognition. The correctness of the boundary information is verified by comparing the overlap between the two recognition results.

[0047] Result Feedback: Successfully identified boundaries are uploaded to the platform for unified management. Unsuccessful boundaries are further corrected by adjusting the algorithm threshold online.

[0048] Multiple lidars can increase the scanning range and reduce blind spots. This system uses three lidars: top, left, and right. External parameters need to be calibrated to facilitate subsequent point cloud fusion. The lidar external parameter calibration is essentially to obtain the displacement (x, y, z) and rotation (roll, pitch, yaw) between the two lasers. Generally, the main laser is used as a reference (parent coordinate system), and the other two side lidars (child coordinate systems) are transformed to the coordinate system of the main laser. In three-dimensional space, a secondary transformation matrix (R, T) (Homogeneous transformation matrix) can be used to describe such a transformation relationship. In the field of three-dimensional data processing, NDT point cloud registration is an x, y, zroll, pitch, yaw-like method for dealing with the pose matching problem between two point clouds. After the calibration is completed, the static TF of the main lidar and the side lidar is released. The calibration diagram is shown as follows Figure 2 shown.

[0049] After completing spatial calibration, the LiDAR needs to be time synchronized. Because satellite signal quality is poor inside the ship, PPS time synchronization is not possible. Therefore, PTP time synchronization is used. The host computer acts as the PTP master, and the LiDAR acts as a PTP slave to synchronize the LiDAR's timing.

[0050] The three laser point cloud data after time and space synchronization are subjected to abnormality judgment, noise removal and distortion removal processing, and the processed laser point cloud data are spliced to obtain the fused point cloud.

[0051] The ground removal algorithm calculates the verticality difference and horizontal height difference of the two adjacent scanning beams in the same column on the ground, and calculates the degree of verticality difference and horizontality difference. ,like < , it is considered an obstacle or a pile of materials and is removed. The top of the cabin uses the straight-through filter in the PCL library to filter the point cloud data above a certain height. In order to remove dynamic points, it is necessary to calculate the point-to-point difference:

[0052] In order to evaluate the position change of a single point in the point cloud in consecutive scans, we first define the position of the point in the t-th scan and the t+1-th scan as and The position change of a point can be used to calculate the consistency score using the following distance formula: .

[0053] Calculate a consistency score based on the time window. Let N be the number of scans in the time window, the number of times point appears is n, and the position change of each appearance is below the threshold. The consistency score C can be expressed as: If C is close to 1, it indicates that the point remains static throughout the time window; if C is lower, it indicates that the point is changing dynamically.

[0054] Across multiple observations, we can perform more complex statistical analysis on the consistency of each point, such as calculating the standard deviation of its occurrence: ,in, is the average position of point in n occurrences. The smaller the standard deviation σ, the more stable the position of the point.

[0055] Based on the above statistical analysis, a decision formula can be defined to finally determine the dynamic nature of a point. If the standard deviation σ is greater than a certain threshold or the consistency score C is lower than a certain threshold, the point is considered dynamic: or When , the point is considered to be a dynamic point, where and is the preset threshold.

[0056] The DBSCAN clustering algorithm is used to group the point cloud data. After clustering is completed, the changes of each cluster over time are analyzed and the centroid changes are tracked: ,in and are the cluster centroids at time t and t+1 respectively.

[0057] Shape change analysis: ,in and Represents the differences in the shape descriptors of the clusters (e.g., the volume of the bounding box or other geometric features) at consecutive time frames.

[0058] Use the set threshold to determine the dynamics of the cluster: or When , the corresponding point cloud cluster is marked as a dynamic cluster; and all points in the dynamic cluster are marked as dynamic points; and is the threshold for position and shape change. Points with a value greater than the threshold are considered dynamic and marked as 1, while points with a value less than the threshold are considered non-dynamic and marked as 0. Marking process: Based on the above scoring or judgment results, all points with a score or mark of 0 are marked as dynamic points and filtered using the Statistical Outlier Removal algorithm. This results in a filtered point cloud.

[0059] Due to the particularity of the cabin environment, a plane fitting-based segmentation-RANSAC (Random Sample Consensus) algorithm is used to extract plane regions from the point cloud and separate these regions from other regions. The goal of RANSAC plane fitting is to extract plane regions from a given point cloud by minimizing the fitting error. The mathematical expression of the plane model is: , where A, B, C are the normal components of the plane, DD is the offset of the plane, and (x, y, z) is a point in the point cloud.

[0060] The specific steps of the algorithm are as follows:

[0061] Initialize the parameters, set the maximum number of iterations N and the error threshold e. Set the minimum number of inliers in the plane model (usually 3 points). Randomly select 3 points from the point cloud. These three points are used to fit a plane model.

[0062] Plane fitting, use the selected 3 points to fit the plane model. Let these points be 、 、 Calculate the parameters A, B, C, D of the plane model

[0063] Calculate the plane normal vector: Calculate the plane normal vector by cross-product of two vectors: , ; Calculate the normal vector: , ; Where A, B, and C are the normal vector components of the plane.

[0064] Calculate the plane offset D for each point in the point cloud Calculate the distance from the point to the fitting plane. The distance formula is: If the distance is less than the set threshold , then the point is considered to be an interior point, that is, it belongs to the fitted plane

[0065] Record the number of inliers and count the number of inliers in the current plane model, denoted as num_inliers. Repeat N times, randomly selecting three points for fitting each time and counting the number of inliers. After each fitting, record the plane model with the most inliers and its set of inliers.

[0066] Select the best plane model to remove the inliers. If the number of inliers in the current plane model is greater than the threshold num_inliers>Nmin, the current plane model is considered to be a valid plane. Select the plane model and remove all inliers belonging to the plane from the point cloud. Continue to perform the above steps on the remaining point clouds until there are not enough points in the point cloud for plane fitting. Finally, all the inliers segmented by plane fitting are the target plane area. The remaining points belong to, for example, the bulkhead area.

[0067] The obtained point cloud data is converted into a grid map (occupancy grid map). The grid map is usually a two-dimensional array, and each cell represents the occupancy probability or occupancy status of a certain position in the space: 0: free space 100: occupied, -1: unknown area (which can be ignored or processed first). This system treats the grid map as a single-channel image and normalizes it to between 0 and 1. The normalization convention is as follows: grid[grid==-1]=0, norm_grid=grid / 100.0

[0068] To perform Sobel operation on the raster map, first define the Sobel filter to detect vertical edges. ; Detect horizontal edges ; Perform two-dimensional convolution on the normalized grid map norm_grid: ; .

[0069] Calculate the gradient magnitude, , calculate the gradient magnitude of each pixel . Use the threshold T to determine whether the pixel belongs to the boundary: when , the grid is marked as a boundary point, otherwise it is marked as a non-boundary point.

[0070] Boundary extraction based on LiDAR point clouds and point cloud images uses the same point cloud data source and therefore shares the same coordinate system. The overlap is calculated by taking the ratio of the intersection area of two polygons to the union area. If the OverlapRatio is greater than 90%, the boundary consistency is good and the boundary extraction is successful. The formula for calculating overlap is as follows: OverlapRatio = (A∩B) / (A∪B), where A represents the area enclosed by the first boundary, B represents the area enclosed by the second boundary, A∩B represents the intersection area of the two areas, and A∪B represents the union area of the two areas.

[0071] Based on the verification results, successfully identified boundaries are uploaded to the platform for unified management. Unsuccessful boundaries are further corrected by adjusting the algorithm threshold online.

[0072] The above schematically describes the invention of the present application and its implementation methods. This description is not restrictive. Without departing from the spirit or basic features of the present application, the present application can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention of the present application, and the actual structure is not limited to this. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the invention, a structural method and embodiment similar to the technical solution without creativity should fall within the scope of protection of the present application. In addition, the word "including" does not exclude other elements or steps, and the word "one" before an element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. Words such as first and second are used to indicate names, and do not indicate any specific order.

Claims

1. A cabin boundary recognition method based on point cloud map, characterized in that: include: Collect point cloud data inside the cabin and perform fusion processing on the point cloud data to obtain a fused point cloud; Preprocess the fused point cloud to obtain a static point cloud; According to the static point cloud, the boundary is extracted by the RANSAC algorithm to obtain the first boundary; Convert the static point cloud into a raster map, use the Sobel algorithm to extract the boundary of the raster map, and obtain the second boundary; Cross-validation is performed on the first boundary and the second boundary, and boundary consistency is determined by calculating the overlap between the two boundaries, including: calculating the overlap ratio of the two boundaries based on the first boundary and the second boundary, OverlapRatio = (A∩B) / (A∪B), where A represents the area enclosed by the first boundary, B represents the area enclosed by the second boundary, A∩B represents the intersection area of the two areas, and A∪B represents the union area of the two areas; when the overlap ratio OverlapRatio is greater than a preset threshold, the boundary consistency is determined to be good and the boundary extraction is successful; otherwise, the boundary consistency is determined to be insufficient and boundary correction is required; According to the cross-validation results, the boundaries that pass the consistency verification are used as the cabin boundaries, and the boundaries that fail the consistency verification are corrected by adjusting the threshold method, including: when the overlap is greater than the preset threshold, the intersection area of the first boundary and the second boundary is used as the extracted cabin boundary; when the overlap is less than or equal to the threshold: adjust the error threshold of the RANSAC algorithm , re-execute step S3 to obtain the adjusted first boundary; adjust the gradient threshold T of the Sobel algorithm, re-execute step S4 to obtain the adjusted second boundary; re-execute the cross-validation process of step S5 for the adjusted first boundary and second boundary; if the overlap is greater than the threshold, the intersection area of the revised first boundary and the second boundary is used as the final cabin boundary; if the overlap is still less than or equal to the threshold after three threshold adjustments, the result with the highest overlap is selected as the final cabin boundary.

2. The method for cabin boundary recognition based on point cloud map according to claim 1, characterized in that: Collect point cloud data inside the cabin and perform fusion processing on the point cloud data, including: The top lidar is used as the main lidar, and the left and right lidars are used as side lidars; The NDT point cloud registration method is used for spatial synchronous calibration to obtain the homogeneous transformation matrix of the side lidar relative to the main lidar; The host computer installed in the cabin is used as the PTP master, and all lidars are used as PTP slaves, and the PTP time synchronization method is used for time synchronization; The top main lidar point cloud and the lidar point clouds on both sides that have been spatially calibrated and time synchronized are subjected to abnormality judgment, denoising and dedistortion processing. The processed point clouds are spliced and fused through the homogeneous transformation matrix to obtain a fused point cloud in the same coordinate system.

3. The method for cabin boundary recognition based on point cloud map according to claim 2, characterized in that: Preprocess the fused point cloud, including: Based on the fused point cloud, the ground pile filtering process is performed to calculate the vertical height difference and horizontal height difference angles of the points in the same column of two adjacent scanning beams. The points with angles less than the threshold θ are obtained as the point cloud after removing the ground pile. According to the point cloud without the ground pile, the point cloud above the preset height threshold is filtered out to obtain the point cloud without the cabin pile; According to the removal of the cabin fixed point cloud, the point cloud generated by the moving objects in the cabin is identified and removed to obtain the static point cloud as the processed fused point cloud.

4. The method for cabin boundary recognition based on point cloud map according to claim 3, characterized in that: Get a static point cloud, including: The position change of the calculation point in the continuous scan is defined as follows: and , the position change of the point is calculated by the distance formula calculate; Calculate the consistency score C based on the time window, , where N is the number of scans in the time window, and n is the number of times the point position change is lower than the threshold; Calculate the standard deviation σ of the position of a point in n occurrences, where , is the average position of the point in n occurrences; The dynamics of the point is determined by the consistency score C and the standard deviation σ. or When , the point is considered to be a dynamic point, where and is the preset threshold; The DBSCAN clustering algorithm is used to group point cloud data to form point cloud clusters; Calculate the centroid change of each point cloud cluster and shape transformation ,in, and are the cluster centroids at time t and t+1, respectively, and a shape descriptor representing the cluster; According to the set threshold and Determine the dynamics of point cloud clustering, when or When , the corresponding point cloud cluster is marked as a dynamic cluster; and all points in the dynamic cluster are marked as dynamic points; The point cloud marked as dynamic points is filtered and eliminated using the statistical outlier algorithm to obtain a static point cloud.

5. The method for cabin boundary recognition based on point cloud map according to claim 3, characterized in that: Get the first boundary, including: (1) Constructing a plane model for plane fitting , where A, B, and C are the plane normal vector components, and D is the plane offset. is the point coordinate in the point cloud; (2) Initialize the RANSAC algorithm parameters, including: setting the maximum number of iterations N, the error threshold ε, and the minimum number of inliers in the plane model ; (3) Execute the RANSAC algorithm to obtain the candidate plane model and the corresponding interior point set; (4) Repeat step (3) N times and select the plane model with the largest number of inliers as the best plane model; where N is a positive integer; (5) If the number of inliers in the optimal plane model is greater than the threshold , then the corresponding plane is identified as a valid plane, and the identified valid plane is removed from the point cloud; (6) Repeat steps (3) to (5) for the remaining point clouds until the number of inliers in the plane model is less than the threshold value. until; (7) Extract all identified plane edge points to form the first boundary of the cabin.

6. The method for cabin boundary recognition based on point cloud map according to claim 5, characterized in that: Execute the RANSAC algorithm to obtain candidate plane models and corresponding inlier points, including: Randomly select 3 points from the static point cloud ; Based on 3 points of selection , fit the plane model and calculate the plane normal vector ; Calculating plane offset ; Calculate each point in the point cloud Distance to the fitting plane ; Statistical distance Points smaller than the error threshold ε are considered as inliers, and the number of inliers is calculated. Record the current candidate plane model and the corresponding interior point set.

7. The method for cabin boundary recognition based on point cloud map according to claim 5, characterized in that: Get the second boundary, including: Convert the static point cloud into a two-dimensional grid map, where the grid value represents the occupancy status of the location in space, 0 represents free space, 100 represents occupied space, and -1 represents an unknown area; Normalize the grid map, set the value of the unknown area to 0, and divide the occupancy value by 100 to obtain the normalized grid map norm_grid; Defines Sobel filters for edge detection, including vertical edge detection filters ;Horizontal edge detection filter ; Perform a two-dimensional convolution operation on the normalized grid map norm_grid using the defined Sobel filter to obtain: horizontal gradient ; Vertical gradient ; Calculate the gradient magnitude at each grid location ; The gradient amplitude is binarized using the set threshold T. When , the grid is marked as a boundary point, otherwise it is marked as a non-boundary point; All grid positions marked as boundary points are extracted to form the second boundary of the cabin.

8. A cabin boundary recognition system based on point cloud map, characterized in that: include: Point cloud fusion module collects point cloud data in the cabin and fuses them to generate a fused point cloud in the same coordinate system; The point cloud processing module performs ground filtering, cabin filtering, and removes dynamic points on the fused point cloud to obtain a static point cloud; The RANSAC boundary extraction module extracts the boundary based on the static point cloud using the RANSAC algorithm to obtain the first boundary; Sobel boundary extraction module, based on the static point cloud, uses the Sobel algorithm to extract the boundary and obtain the second boundary; Boundary verification module, which cross-validates the first boundary and the second boundary to obtain the final cabin boundary; A boundary correction module, which corrects the first boundary and the second boundary according to the cross-validation result; Cross-validation is performed on the first boundary and the second boundary, and boundary consistency is determined by calculating the overlap between the two boundaries, including: calculating the overlap ratio of the two boundaries based on the first boundary and the second boundary, OverlapRatio = (A∩B) / (A∪B), where A represents the area enclosed by the first boundary, B represents the area enclosed by the second boundary, A∩B represents the intersection area of the two areas, and A∪B represents the union area of the two areas; when the overlap ratio OverlapRatio is greater than a preset threshold, the boundary consistency is determined to be good and the boundary extraction is successful; otherwise, the boundary consistency is determined to be insufficient and boundary correction is required; According to the cross-validation results, the boundaries that pass the consistency verification are used as the cabin boundaries, and the boundaries that fail the consistency verification are corrected by adjusting the threshold method, including: when the overlap is greater than the preset threshold, the intersection area of the first boundary and the second boundary is used as the extracted cabin boundary; when the overlap is less than or equal to the threshold: adjust the error threshold of the RANSAC algorithm , re-execute step S3 to obtain the adjusted first boundary; adjust the gradient threshold T of the Sobel algorithm, re-execute step S4 to obtain the adjusted second boundary; re-execute the cross-validation process of step S5 for the adjusted first boundary and second boundary; if the overlap is greater than the threshold, the intersection area of the revised first boundary and the second boundary is used as the final cabin boundary; if the overlap is still less than or equal to the threshold after three threshold adjustments, the result with the highest overlap is selected as the final cabin boundary.

Citation Information

Patent Citations

  • Ship loader cabin hatch identification method

    CN113340287A

  • Height detection method and system for height limiting device

    CN113658226A