English · 한국어
This tutorial focuses on how to actually use PCL well rather than deriving optimization math or diving deep into C++ syntax. Each chapter is paired 1:1 with a blog post, and this repo serves as the maintained home for every code sample referenced in those posts.
- Original author: Hyungtae Lim (
shapelimatmitdotedu) - Tested OS: Ubuntu 24.04
Play with the sliders right in your browser to see each chapter in action — https://limhyungtae.github.io/pcl_tutorial/.
Every interactive demo runs entirely in the browser, with the algorithms reimplemented in TypeScript (no remote compute). Inputs include KITTI (outdoor LiDAR), NaverLabs (indoor LiDAR), and Stanford Bunny (CAD) presets, plus drag-and-drop for your own data.
| # | Chapter | Highlights |
|---|---|---|
| 1 | Voxelization | leaf size slider, synced before/after view |
| 2 | PassThrough | axis + min/max + negative toggle, synced before/after |
| 3 | Transformation | tx/ty/tz/rx/ry/rz, random offset on entry |
| 4 | Statistical Outlier Removal | mean K + stddev mult, inlier/outlier split |
| 5 | Radius Search | KdTree-based; click any point to set the query |
| 6 | K-Nearest Neighbor | KdTree-based K-NN; click any point to set the query |
| 7 | Normal Estimation | KdTree + SVD; normals overlaid as white line segments |
| 8 | RANSAC Plane Segmentation | ground / wall detection (extra) |
| 9 | Patchwork — Ground Segmentation | CZM zones × rings colored per region (VLP-16 / HDL-64) |
| 10 | Euclidean Clustering | stable per-cluster colors across slider changes (extra) |
| 11 | TRAVEL — Range Image Clustering | 3D + 2D range image, same cluster colors (VLP-16 / HDL-64) |
| 12 | Iterative Closest Point | Step / Play to watch each iteration's correspondences |
| 13 | GenZ-ICP — adaptive ICP | per-iteration α-blend of point-to-plane / point-to-point |
| 14 | KISS-Matcher — global registration | FasterPFH + ROBIN + GNC; pre-computed via Python wrapper |
Chapters 9 and 11 are sensor-specific demos: parameters are baked in for VLP-16 (NaverLabs preset) and HDL-64 (KITTI preset) only. Each page links out to the upstream Patchwork and TRAVEL repos for running on your own data.
cd web
npm install
npm run dev # http://localhost:5173/pcl_tutorial/The predev / prebuild hooks automatically copy data files (.bin / .pcd / .ply) from materials/ into web/public/data/.
When changes under web/** are pushed to main, GitHub Actions (.github/workflows/deploy.yml) builds the site and deploys it to GitHub Pages. Before the first deploy, set the repo's Settings → Pages → Source to GitHub Actions.
- CMake ≥ 3.10
- PCL ≥ 1.8
- Boost ≥ 1.58
mkdir build && cd build
cmake ..
make -j$(nproc)The build step copies the data files (.bin, .pcd, .ply) under materials/ into build/auxiliary/, so always run the executables from inside the build/ directory:
cd build
./lec00_usage
./lec04_visualization
# ...Note:
auxiliary/pass_by_address.cppis a side snippet (a Ceres + Eigen learning example) and is not part of the main build.
pcl_tutorial/
├── CMakeLists.txt
├── lec*.cpp # per-chapter examples (PCL/C++)
├── auxiliary/ # side snippets, not part of the main build
├── img/ # images for README and blog posts
├── materials/ # sample point cloud data (.bin / .pcd / .ply)
└── web/ # interactive site (React + Vite)
├── src/
│ ├── pages/ # one page per chapter
│ ├── components/ # viewer, sliders, drop zone
│ ├── i18n/ # EN/KO dictionaries + toggle
│ └── lib/ # KdTree, PCD/BIN/PLY parsers,
│ └── filters/ # voxel · passthrough · sor · normal ·
│ # ransacPlane · euclideanCluster · icp ·
│ # transform (all reimplemented in TS)
└── public/data/ # auto-copied from materials/ at build time
MIT License. See package.xml for the license declaration.
