A point cloud is a collection of 3D points representing the surface geometry of objects or environments. Each point typically includes X, Y, Z coordinates in a defined coordinate system, and may include additional attributes like color (RGB), intensity, normal vectors, or semantic labels. Point clouds are the native output of 3D sensors and serve as the foundation for 3D computer vision applications.
The PCD format, developed by the Point Cloud Library (PCL) project, is the most widely used format in robotics and research. It supports both ASCII and binary encoding, can store arbitrary point attributes, and includes metadata describing the point cloud properties.
# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z rgb
SIZE 4 4 4 4
TYPE F F F U
COUNT 1 1 1 1
WIDTH 640
HEIGHT 480
VIEWPOINT 0 0 0 1 0 0 0
POINTS 307200
DATA binary
[binary data...]
PLY is a flexible format that can represent both point clouds and polygon meshes. Originally developed by Stanford for the Stanford 3D Scanning Repository, PLY has become an interchange format for 3D data. It supports custom properties and both ASCII and binary encoding.
ply
format binary_little_endian 1.0
element vertex 307200
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
end_header
[binary data...]
LAS is a format maintained by ASPRS (the American Society for Photogrammetry and Remote Sensing) and is widely used for LiDAR data exchange, particularly in geospatial applications. LAZ is LAS losslessly compressed with LASzip, reducing file size to a fraction of the original. These formats include extensive metadata about acquisition parameters, coordinate reference systems, and point classifications (ground, vegetation, buildings, etc.).
The simplest format - plain text with one point per line. While inefficient for large datasets, XYZ is human- readable and easily parsed. Extended formats may include additional columns for intensity, RGB, normals, etc.
1.234 2.456 0.789
1.235 2.457 0.788
1.236 2.458 0.787
...
Raw point clouds contain noise, outliers, and artifacts that must be removed:
Point clouds from different sensors or viewpoints must be transformed to a common coordinate system:
Converting discrete point clouds into continuous surface representations:
PCL is the most comprehensive open-source library for point cloud processing. Written in C++ with Python bindings, it includes hundreds of algorithms for filtering, feature extraction, registration, segmentation, surface reconstruction, and visualization. PCL is the de facto standard in robotics and academic research.
// Example: Load, downsample, and save a point cloud
#include <pcl/io/pcd_io.h>
#include <pcl/filters/voxel_grid.h>
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
pcl::io::loadPCDFile("input.pcd", *cloud);
pcl::VoxelGrid<pcl::PointXYZ> voxel_filter;
voxel_filter.setInputCloud(cloud);
voxel_filter.setLeafSize(0.01f, 0.01f, 0.01f); // 1cm voxels
voxel_filter.filter(*cloud);
pcl::io::savePCDFile("output.pcd", *cloud);
A modern alternative to PCL, Open3D provides a clean Python API with C++ backend for performance. It excels at visualization, includes state-of-the-art algorithms like colored ICP and global registration, and integrates well with machine learning frameworks like PyTorch and TensorFlow.
ROS provides standardized messages for point cloud data (sensor_msgs/PointCloud2) and tools for point cloud processing in robot systems. The sensor_msgs/PointCloud2 message format allows arbitrary point attributes and is supported by most 3D sensors and visualization tools.
| Library | Language | Key Features | Performance | Best Use Case |
|---|---|---|---|---|
| PCL (Point Cloud Library) | C++/Python | Comprehensive algorithms, filters | High (optimized C++) | Research, robotics |
| Open3D | Python/C++ | Modern API, ML integration | Very High (GPU support) | Deep learning, visualization |
| PDAL | C++/Python | LiDAR processing, pipelines | High (streaming) | Geospatial, large datasets |
| CloudCompare | C++ (GUI) | Interactive visualization, editing | High | Manual inspection, editing |
| Cilantro | C++ | Lightweight, registration focus | Very High | Embedded systems, SLAM |
Processing point clouds in real-time (30+ Hz) requires careful optimization:
WIA-SEMI-013 specifies how point clouds are stored, transmitted, and processed across several phases. The provisions directly related to point clouds are listed below. The overall phase structure is covered in Chapter 8.
| Provision | Phase | Key Content |
|---|---|---|
| WIA Point Cloud Format | Phase 1 §3 | Extends PCD v0.7 with x, y, z (float32, meters), rgb (uint32), intensity (uint16), confidence (uint8, 0-255), and timestamp (uint64, microseconds from frame start) fields. A JSON format may also be used for small datasets. |
| Processing API | Phase 2 §5 | Defines POST /api/v1/processing/depth-to-pointcloud (invalid-point removal, voxel downsampling, PCD output) and POST /api/v1/processing/filter-pointcloud (statistical outlier removal, voxel downsampling). |
| WIA-PC-Stream | Phase 3 §1 | A real-time streaming protocol using UDP (with an optional reliability layer), Protocol Buffers v3 serialization, LZ4 or Zstandard compression, optional AES-256-GCM encryption, and QoS by latency mode. |
| WIA-Depth-Stream | Phase 3 §2 | Reduces depth map bandwidth through differential encoding with keyframes and delta frames, and region-of-interest (ROI) transmission. |
Because the format adds WIA fields to standard PCD, existing tools such as PCL and Open3D can still read the basic
coordinate fields. Phase 1 sets the point cloud file extension to .pcd and requires parsers to ignore
unknown fields.
Point clouds enable robots and autonomous vehicles to build 3D maps while tracking their position. Registration algorithms align consecutive point clouds, estimating camera motion. Loop closure detection identifies previously visited locations, enabling globally consistent maps.
3D object detection in point clouds uses geometric features invariant to viewpoint changes. Applications include warehouse automation (bin picking), autonomous driving (pedestrian/vehicle detection), and quality inspection (defect detection).
Semantic segmentation labels each point with a class (ground, vegetation, building, vehicle, etc.). Instance segmentation separates individual objects. This enables high-level scene understanding for robotics and AR.
Comparing point clouds captured at different times reveals changes in the environment. Applications include construction monitoring, deformation analysis, and surveillance.
Point cloud processing transforms raw sensor data into actionable information for autonomous systems, 3D modeling, and spatial computing. The next chapter explores how these techniques integrate into complete application systems.