Introduction
PCD is the native file format of the Point Cloud Library (PCL), an open source C++ library for processing point clouds that is widely used in robotics and computer vision. Depth cameras and lidar sensors on robots are often recorded to PCD files for later processing.
A PCD file can store any set of fields per point, such as position, colour, normal or intensity, and can keep the grid layout of an organised cloud from a depth camera, where points are arranged in rows and columns like the pixels of an image.
Structure
Every PCD file starts with a text header. FIELDS names each value of a
point, SIZE gives its size in bytes, TYPE whether it is a
signed integer (I), unsigned integer (U) or float
(F), and COUNT how many elements it has. WIDTH
and HEIGHT give the layout, with a height of 1 for an unorganised cloud,
VIEWPOINT the sensor’s position and orientation, and POINTS
the total. The last header line, DATA, says how the points follow:
ascii, binary or binary_compressed.
# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1
WIDTH 3
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 3
DATA ascii
0.0 0.0 0.0 12
1.0 0.0 0.0 40
0.0 1.0 0.0 33
Links
Software
- CloudCompare (Windows, macOS, Linux)
- pcl_viewer, the viewer that comes with the Point Cloud Library
Developers
- Point Cloud Library, the C++ library that defines the format
- Open3D, Python and C++ library that reads and writes PCD