This repository contains the official C++ implementation of the ground segmentation algorithm proposed in the paper
"LPIR-GSeg: LiDAR Projection Image-Based and Region-Wise Ground Segmentation in Urban Environment"
IEEE Sensors Journal, 2025
LPIR-GSeg is a lightweight, plug-and-play, non-learning-based ground segmentation method that achieves a compelling balance between accuracy and efficiency, making it ideal for real-time autonomous driving and 3D LiDAR SLAM applications.
Fast and robust ground segmentation is a fundamental prerequisite for many perception tasks in autonomous systems. Existing methods often rely on computationally expensive plane fitting or learning-based approaches that require large annotated datasets.
LPIR-GSeg addresses these limitations by:
- Projecting 3D LiDAR point clouds into multiple 2D cylindrical images (Range, Height, Slope, Edge, Variance) – a representation that retains geometric information while enabling efficient image-based processing.
- A coarse-to-fine segmentation paradigm:
- Coarse stage: A Concentric Zone Model (CZM) combined with adaptive height thresholds and Fast PCA extracts high‑confidence ground points quickly.
- Fine stage: A fast region‑growing algorithm on the 2D projection images refines the ground mask, especially near boundaries, reducing false negatives.
- Real‑time tilt calibration: The method compensates for sensor tilt and uneven terrain in real time using an adaptive height correction based on the projection images.
With OpenMP parallelism and memory‑efficient data structures, LPIR‑GSeg processes a full 64‑channel LiDAR scan in ~14 ms on a standard CPU – suitable for embedded systems as well.
- Accurate – Outperforms state‑of‑the‑art methods on public benchmarks (SemanticKITTI, UrbanLoco) while maintaining low computational cost.
- Fast – Optimized C++ implementation with OpenMP, no GPU required.
- Easy to integrate – Minimal dependencies (PCL, OpenCV, Eigen) and a simple API.
- Robust to tilt – Built‑in tilt angle estimation and compensation for non‑horizontal sensor mounting.
- Parameter‑tunable – All key parameters are exposed for easy adaptation to different LiDAR sensors and environments.
- Ubuntu 18.04 / 20.04 / 22.04 (other Linux distributions should work with minor adjustments)
- CMake ≥ 3.5
- PCL (Point Cloud Library) ≥ 1.8
- OpenCV ≥ 3.2
- Eigen3
- OpenMP (for multithreading)
You can install the required libraries on Ubuntu with:
sudo apt-get update
sudo apt-get install cmake libpcl-dev libopencv-dev libeigen3-dev libomp-dev- Clone the repository
git clone https://github.com/YOUR_USERNAME/LPIR-GSeg.git
cd LPIR-GSeg- Build the project
mkdir build && cd build
cmake ..
make -j4After a successful build, the executable lpir_gseg_node will be placed in the build/ directory.
- Run the example
The repository includes a sample point cloud (KITTI format
.binfile) in thedata/folder.
./lpir_gseg_node ../data/000000.binTo process your own point cloud (PCD or KITTI .bin format):
./lpir_gseg_node /path/to/your/pointcloud.pcd
# or
./lpir_gseg_node /path/to/your/scan.binThe program will output the ground segmentation result as a colored point cloud (ground points in green, nonground in red) and print timing information.
All parameters are defined in include/lpir_gseg/params.h and can be modified before compilation. The most important ones are:
| Parameter | Description | Default |
|---|---|---|
sensor_height |
Installation height of the LiDAR from the ground (meters) | 1.723 |
img_width |
Horizontal resolution of the projection image (pixels) | 1024 |
img_height |
Vertical resolution (number of laser channels) | 64 |
T_edge |
Edge threshold used in the projection image for boundary detection | 0.05 |
intensity_threshold |
Region-growing intensity difference limit | 0.05 |
ground_angle_threshold |
Maximum allowed angle between a local plane and the horizontal plane (degrees) | 8.0 |
min_segment_points |
Minimum number of points to form a valid ground segment | 50 |
Feel free to adjust these values based on your LiDAR sensor and application scenario.
LPIR-GSeg/
├── CMakeLists.txt
├── README.md
├── data/ # Sample point clouds
│ └── 000000.bin
├── include/ # Header files
│ ├── lpir_gseg/
│ │ ├── ground_segmentation.h
│ │ ├── projection.h
│ │ ├── region_growing.h
│ │ └── params.h
├── src/ # Source files
│ ├── ground_segmentation.cpp
│ ├── projection.cpp
│ ├── region_growing.cpp
│ └── main.cpp
└── LICENSE
We are working on adding more visual results. In the meantime, please refer to the paper for quantitative evaluations on SemanticKITTI and UrbanLoco datasets.
If you find this work useful in your research, please cite our paper:
@article{sun2025lpir,
title={LPIR-GSeg: LiDAR Projection Image-Based and Region-Wise Ground Segmentation in Urban Environment},
author={Sun, Yang and Liu, Shengyi and Yan, Chao and Tang, Kaiwei and Wang, Qing and Meng, Xiaolin},
journal={IEEE Sensors Journal},
volume={25},
number={16},
pages={31357--31369},
year={2025},
publisher={IEEE}
}