A method for generating light detection and ranging (LiDAR) point cloud map of a large-scale outdoor scene, comprising:
- obtaining, based on a region growing segmentation approach, an initial segmentation result of a target LiDAR point cloud map, and performing boundary point optimization on the initial segmentation result to acquire a target planar segmentation result of the target LiDAR point cloud map;
- wherein the obtaining, based on a region growing segmentation approach, an initial segmentation result of a target LiDAR point cloud map comprises:
- calculating a local normal vector of each scan point in the target LiDAR point cloud map;
- and
- performing point cloud clustering on the local normal vector of each scan point based on the region growing segmentation approach to obtain the initial segmentation result of the target LiDAR point cloud map;
- wherein the local normal vector of each scan point is calculated according to a formula expressed as follows:
- n
- *
- =
- arg
-
- min
- n
- ,
-
- n
-
- =
- 1
-
- ∑
- i
- =
- 1
- m
- (
- (
- x
- i
- -
- x
- )
-
- n
- )
- 2
- where x represents a current scan point, xi represents one of neighborhood points of the current scan point, m represents a total number of the neighborhood points, and n represents a local normal vector of each scan point to be solved;
- calculating target normal vectors of all segmented planes in the target planar segmentation result, and performing, using the target normal vectors, planar point cloud refinement on the target planar segmentation result to generate a refined point cloud map;
- wherein the performing, using the target normal vectors, planar point cloud refinement on the target planar segmentation result to generate a refined point cloud map comprises:
- calculating a neighborhood centroid of planar points in the segmented planes;
- determining new planar points in the segmented planes based on the planar points, the neighborhood centroid, and the target normal vectors;
- and
- generating the refined point cloud map based on the new planar points;
- wherein the neighborhood centroid of the planar points in the segmented planes is calculated according to a formula expressed as follows:
- mean
- k
- =
- (
- 1
- /
- n
- )
-
- ∑
- i
- =
- 1
- n
- p
- i
- where n is set to 150, meank represents the neighborhood centroid of the planar points pk, and pi represents a segmented plane;
- wherein the determining new planar points in the segmented planes based on the planar points, the neighborhood centroid, and the target normal vectors comprises:
- calculating the target normal vector normali of the segmented plane pi using principal component analysis and updating the planar points pk according to a formula expressed as follows:
- p
- k
- ′
- =
- p
- k
- +
- (
- (
- mean
- k
- -
- p
- k
- )
- ·
- normal
- i
- )
-
- normal
- i
- where
- p
- k
- ′
- represents the new planar points, meank represents the neighborhood centroid of the planar points pk, and normali represents the target normal vector of the segmented plane pi;
- and
- performing planar segmentation on the refined point cloud map to obtain a new target planar segmentation result, determining target wall corner structures of the new target planar segmentation result, and removing target noise points from wall corner points in the target wall corner structures to generate a refined LiDAR point cloud map of the large-scale outdoor scene.