# 点云库

**点云库**（Point Cloud Library，PCL）是一个独立的、大规模的开源项目，用于二维/三维图像与点云处理，以完全模板化的 C++ 库形式编写，在 BSD 许可证下发布，允许商业和研究用途。<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup> 它汇集了滤波、特征估计、表面重建、配准、模型拟合、分割、识别和可视化等算法，并与 ROS（[机器人操作系统](https://www.edgepedia.org/zh/robot-operating-system)）紧密集成。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup> 该库由[柳树车库](https://www.edgepedia.org/zh/willow-garage)（Willow Garage）的拉杜·博格丹·鲁苏（Radu Bogdan Rusu）和史蒂夫·库辛斯（Steve Cousins）在 2011 年 IEEE ICRA 论文《3D 就在这里：点云库（PCL）》中首次介绍。<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一个独立的、大规模的开源项目，用于二维/三维图像与点云处理，以模板化 C++ 编写<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup><sup> • </sup><sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup> |
| 许可证与治理 | BSD 许可证，商业和研究用途免费；由多家公司组成的联盟通过非营利组织开放感知（Open Perception）提供资金支持<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup> |
| 起源 | 由柳树车库的拉杜·博格丹·鲁苏和史蒂夫·库辛斯在上海 IEEE ICRA 2011 上介绍；源文件带有柳树车库 2010–2012 年版权声明<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup><sup> • </sup><sup>[3](https://docs.ros.org/groovy/api/pcl/html/point__cloud_8h_source.html)</sup> |
| 核心依赖 | Eigen 用于线性代数，FLANN 用于近似最近邻搜索，Boost 共享指针用于数据传递，OpenMP 和 Intel TBB 用于多核并行化<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup> |
| 模块 | 滤波器、特征、输入/输出、关键点、kD 树、八叉树、距离图像、识别、配准、样本一致性、分割、表面、可视化、应用、GPU<sup>[4](https://pcl-docs.readthedocs.io/en/latest/index.html)</sup> |
| 最新版本 | PCL 1.15.1（2025 年 8 月 26 日），新增对 nanoflann 的支持，作为 FLANN 的更快替代方案用于邻域搜索<sup>[5](https://github.com/PointCloudLibrary/pcl/releases)</sup> |
| 社区规模 | GitHub 上约 11.2k 星标和 4.7k 复刻<sup>[1](https://github.com/pointcloudlibrary/pcl)</sup> |

## 架构

PCL 是一个完全模板化的现代 C++ 库，为在现代 CPU 上高效运行而编写。其数据结构大量使用 SSE 优化，大多数数学运算构建在 Eigen 模板库之上以进行线性代数计算，快速 k 最近邻搜索由 FLANN（快速近似最近邻库）提供。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup> 所有模块和算法通过 Boost 共享指针传递数据，避免重复复制系统中已有的数据。截至 0.6 版本，该库已移植到 Windows、macOS 和 Linux。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>

**处理流水线。** 每个算法都作为独立的构建块暴露，可以连接成处理图，其方式与 ROS 生态系统中节点连接相同。基本接口遵循固定顺序：创建处理对象（滤波器、特征估计器或分割方法），用 `setInputCloud` 传入输入点云，设置参数，然后调用 `compute`（或 `filter`、`segment` 等）获得输出。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>

由于 PCL 是模板库，在一个源文件中包含许多算法会拖慢编译速度。为加速用户代码，项目使用显式模板实例化：算法与预定义点类型的所有组合都编译进库本身，因此用户代码无需编译模板化代码。<sup>[6](https://pcl-docs.readthedocs.io/en/latest/pcl/doc/tutorials/content/adding_custom_ptype.html)</sup>

## 模块

PCL 被拆分为可单独编译的较小代码库。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>

- **滤波器**实现降采样、离群点移除、索引提取和投影。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>
- **特征**包含用于三维特征估计的数据结构和机制。三维特征基于查询点的 k 邻域描述其周围的几何模式；广泛使用的局部特征包括估计的表面法线和曲率。为高效查找邻居，数据集在最近点搜索之前通过 kD 树或八叉树等空间分解结构进行划分。<sup>[7](https://pointcloudlibrary.gitlab.io/documentation/group__features.html)</sup>
- **配准**实现将多个数据集组合成全局一致模型的算法，适用于有组织数据和无组织（通用）数据。其核心思想是识别数据集之间的对应点，找到使对齐误差最小化的变换，重复该过程直到误差降至阈值以下。该模块依赖 common、kdtree、sample_consensus 和 features，包含类似 ICP 的基类、对应估计与剔除，以及 SampleConsensusInitialAlignment 和 KFPCSInitialAlignment 等初始对齐方法。<sup>[8](https://pointcloudlibrary.gitlab.io/documentation/group__registration.html)</sup>
- **分割**实现聚类提取和通过样本一致性方法对参数模型（包括平面、圆柱、球体和直线）进行模型拟合，以及多边形棱柱提取。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>
- **表面**实现表面重建、网格化、凸包和移动最小二乘法。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>
- **输入/输出**处理 PCD（点云数据）文件的读写。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>
- **关键点**和**距离图像**提供关键点提取作为描述子计算的前置步骤，以及从点云数据集构建距离图像的支持。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>
- **可视化**将 PCL 与 VTK 集成，为 n 维点云和表面数据提供渲染层。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup>

## GPU 加速

主线库面向 CPU，GPU 覆盖一直是用户反复提出的需求。2020 年有一个问题请求对平面分割、离群点移除、降采样和 ICP 配准提供 CUDA 加速，报告称约 50 万点的点云在 CPU 上耗时约 500 毫秒，而目标是 100 毫秒，并指出难以找到 GPU 算法及其文档。<sup>[9](https://github.com/PointCloudLibrary/pcl/issues/4072)</sup> PCL 确实提供了正式支持的 `cuda/` 和 `gpu/` 模块，涵盖 KinFu、八叉树、分割、跟踪和特征，但没有深度学习框架集成。<sup>[10](https://www.hivebook.wiki/wiki/open3d-modern-library-for-3d-data-processing)</sup>

厂商在主线之外添加了加速。英特尔的 `libpcl-oneapi` 组件与上游 PCL 1.15 API 配对，为滤波、空间索引、特征提取、表面重建和分割提供 oneAPI 和 SYCL 2020 加速，覆盖英特尔酷睿 Ultra 集成 GPU、Arc 独立 GPU 和至强处理器，GPU 驻留的最近邻搜索委托给 FLANN 的 oneAPI 构建版本。<sup>[11](https://developer.robotics.intel.com/development-stack/components/optimized_solutions/libpcl-oneapi/index.html)</sup>

## PCL 与 Open3D

Open3D 于 2018 年推出，是一个从零开始开发、依赖项很少的库，它将 PCL 称为三维处理领域值得注意的先行工作。<sup>[12](https://arxiv.org/abs/1801.09847)</sup> 这两个库在设计空间中占据不同位置。PCL 通过其基于 C++ 模板的架构优先考虑算法广度，拥有非常广泛、成熟的经典点云算法目录，常见于 C++ 和 ROS 机器人技术栈中。<sup>[13](https://inferensys.com/differences/physical-ai-and-humanoid-robotics-software/slam-and-3d-scene-understanding-libraries/open3d-vs-pcl)</sup><sup> • </sup><sup>[10](https://www.hivebook.wiki/wiki/open3d-modern-library-for-3d-data-processing)</sup> Open3D 提供原生支持的 Python API 和基于张量的几何 API 以及机器学习附加组件，而 PCL 仅支持 C++，没有官方 Python 绑定，在多核 CPU 上逐个迭代处理点云，而非使用原生批量张量操作。<sup>[10](https://www.hivebook.wiki/wiki/open3d-modern-library-for-3d-data-processing)</sup><sup> • </sup><sup>[13](https://inferensys.com/differences/physical-ai-and-humanoid-robotics-software/slam-and-3d-scene-understanding-libraries/open3d-vs-pcl)</sup>

性能也因此不同。一篇比较综述中引用的 2024 年基准测试报告称，Open3D 的 GPU 加速 ICP 在 RTX 4090 上配准 10 万点点云耗时不到 15 毫秒，按该比较的标准，同样工作负载下 Open3D 不到 50 毫秒，PCL 约 200 毫秒。<sup>[13](https://inferensys.com/differences/physical-ai-and-humanoid-robotics-software/slam-and-3d-scene-understanding-libraries/open3d-vs-pcl)</sup> 一种常见的实践模式是用 Open3D 进行 Python 原型开发，当某个特定的成熟算法仅在 PCL 中有时则求助于 PCL，从 Python 角度这意味着编写 C++ 中间层或调用 `pcl_*` 命令行工具。<sup>[10](https://www.hivebook.wiki/wiki/open3d-modern-library-for-3d-data-processing)</sup>

## 在机器人技术中的应用

PCL 与 ROS 一同设计，已被用于各种机器人项目中。<sup>[2](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)</sup> 典型的流水线将用于点云聚类分割的 C++ PCL 节点与用于下游任务的 Python 节点配对；一个已发表的 PR2 拾放项目使用 PCL 进行分割，并在独立的 ROS 节点中使用 scikit-learn 配合 SVM 进行物体识别。<sup>[14](https://github.com/jupidity/pr2-perception-pick-and-place)</sup> 该库的配准工具，包括 ICP 和正态分布变换变体，被用于移动机器人中的[激光雷达里程计](https://www.edgepedia.org/zh/lidar-odometry)和扫描对齐。<sup>[8](https://pointcloudlibrary.gitlab.io/documentation/group__registration.html)</sup>

## 近期发展

PCL 1.15.0 于 2025 年 2 月 22 日发布，为 UniformSampling 滤波器新增了每体素最小点数选项，在样本一致性中新增了环面 RANSAC 模型，在 `fromPCLPointCloud2` 中新增了类型转换，在配准中新增了多线程 ICP 和并行 GICP 协方差计算。<sup>[15](https://github.com/PointCloudLibrary/pcl/blob/master/CHANGES.md?plain=1)</sup> PCL 1.15.1 随后于 2025 年 8 月 26 日发布；其头条特性是支持 nanoflann，这是 FLANN 的更快替代方案，用于邻域搜索，可加速 ICP 和法线估计，同时还包含编译器修复和进一步的速度改进。<sup>[5](https://github.com/PointCloudLibrary/pcl/releases)</sup>

## References

1. [PointCloudLibrary/pcl, GitHub repository README](https://github.com/pointcloudlibrary/pcl)
2. [Radu Bogdan Rusu and Steve Cousins (2011). 3D is here: Point Cloud Library (PCL). IEEE ICRA.](https://pointclouds.org/assets/pdf/pcl_icra2011.pdf)
3. [pcl: point_cloud.h Source File, ROS documentation](https://docs.ros.org/groovy/api/pcl/html/point__cloud_8h_source.html)
4. [Welcome to pcl's documentation, PCL 1.9.1](https://pcl-docs.readthedocs.io/en/latest/index.html)
5. [Releases, PointCloudLibrary/pcl, GitHub](https://github.com/PointCloudLibrary/pcl/releases)
6. [Adding your own custom PointT type, PCL 1.9.1 documentation](https://pcl-docs.readthedocs.io/en/latest/pcl/doc/tutorials/content/adding_custom_ptype.html)
7. [Module features, PCL 1.11.0-dev documentation](https://pointcloudlibrary.gitlab.io/documentation/group__features.html)
8. [Module registration, PCL 1.11.0-dev documentation](https://pointcloudlibrary.gitlab.io/documentation/group__registration.html)
9. [GitHub issue #4072: I need to accelerate point cloud processing on GPU with CUDA](https://github.com/PointCloudLibrary/pcl/issues/4072)
10. [Open3D vs PCL, Hivebook](https://www.hivebook.wiki/wiki/open3d-modern-library-for-3d-data-processing)
11. [Point Cloud Library (PCL) oneAPI Component, Intel Robotics AI Suite documentation](https://developer.robotics.intel.com/development-stack/components/optimized_solutions/libpcl-oneapi/index.html)
12. [Zhou, Park, Koltun (2018). Open3D: A Modern Library for 3D Data Processing. arXiv:1801.09847.](https://arxiv.org/abs/1801.09847)
13. [Open3D vs PCL: Point Cloud Library Comparison, Inference Systems](https://inferensys.com/differences/physical-ai-and-humanoid-robotics-software/slam-and-3d-scene-understanding-libraries/open3d-vs-pcl)
14. [pr2-perception-pick-and-place, GitHub](https://github.com/jupidity/pr2-perception-pick-and-place)
15. [CHANGES.md, PointCloudLibrary/pcl, GitHub](https://github.com/PointCloudLibrary/pcl/blob/master/CHANGES.md?plain=1)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Computer vision › Vision datasets, software, and community › CV software and toolkits

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/point-cloud-library

English original: https://www.edgepedia.org/point-cloud-library
