Skip to content

sychina/LPIR-GSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LPIR-GSeg: LiDAR Projection Image-Based and Region-Wise Ground Segmentation

License C++ PCL OpenCV

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.


🌟 Overview

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:

  1. 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.
  2. 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.
  3. 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.


✨ Key Features

  • 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.

🛠️ Dependencies

  • 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

🚀 Build and Run

  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/LPIR-GSeg.git
cd LPIR-GSeg
  1. Build the project
mkdir build && cd build
cmake ..
make -j4

After a successful build, the executable lpir_gseg_node will be placed in the build/ directory.

  1. Run the example The repository includes a sample point cloud (KITTI format .bin file) in the data/ folder.
./lpir_gseg_node ../data/000000.bin

To 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.bin

The program will output the ground segmentation result as a colored point cloud (ground points in green, nonground in red) and print timing information.


⚙️ Configuration Parameters

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.


📁 Repository Structure

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

📊 Results (Qualitative)

We are working on adding more visual results. In the meantime, please refer to the paper for quantitative evaluations on SemanticKITTI and UrbanLoco datasets.


📖 Citation

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}
}

About

LPIR-GSeg: Coarse-To-Fine LiDAR Projection Image-Based and Region-wise Ground Segmentation in Urban Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors