Point Cloud Library (PCL)

Prarthana Bataju
3 min readOct 28, 2020

--

The Point Cloud Library is a cross-platform, standalone, and open-source software. It is mainly used for 2D/3D image and point cloud processing.
PCL is free for research use which can handle various algorithms such as segmentation, filtering, feature estimation, model fitting and etc. PCL is released under the 3-clause BSD license and written in C++ programming language and has been successfully compiled and deployed on Linux, macOS, Windows, and Android.

Figure: Example of PCL (Source. pointcloud.org)

And, the most important set of released module in PCL is shown below:

Source: https://pointclouds.org/

What is a Point Cloud?

A point cloud is a data structure used to represent a set of data points in space.
The points represent a three-dimensional data each point having a set of X, Y, and Z coordinates but when color is also present then the point cloud becomes 4D. Point clouds are used for many purposes, including to create 3D CAD models for manufactured parts, for metrology and quality inspection,
and for a multitude of visualization, animation, rendering, and mass customization applications.

Figure: Some example of Point Cloud

PCL Structure

Some PointTypes in PCL :
● PointXYZ - Members: float x, y, z; most used.
● PointXYZ I - Members: float x, y, z, intensity; Simple XYZ + intensity.
● PointXYZRGBA - Members: float x, y, z; uint32_t rgba; RGBA information packed into a single integer.
● PointXYZRGB - Members: float x, y, z, rgb; RGB information packed into a float.
● Point Normal - Members: float x, y, z; float normal[3], curvature; surface normals, and curvatures.

Advantages and Disadvantages of Point Cloud Modeling

Figure: Source (http://blog.spatial.com/the-main-benefits-and-disadvantages-of-point-cloud-modeling)

How to Install Point Cloud Library on Ubuntu 16.01 LTS and 17.01

Setup prerequisites Tools

① sudo apt-get update

② sudo apt-get install git build-essential linux-libc-dev

③ sudo apt-get install cmake cmake-gui

④ sudo apt-get install libusb-1.0–0-dev libusb-dev libudev-dev

⑤ sudo apt-get install mpi-default-dev openmpi-bin openmpi-common

⑥ For Ubuntu 16.04: sudo apt-get install libflann1.8 libflann-dev

For Ubuntu 17.01: sudo apt-get install libflann1.9 libflann-dev

⑦ sudo apt-get install libeigen3-dev

⑧ sudo apt-get install libboost-all-dev

⑨ For Ubuntu 16.04: sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev

For Ubuntu 17.01: sudo apt-get install libvtk6.3-qt4 libvtk6.3 libvtk6-dev

⑩ sudo apt-get install libqhull* libgtest-dev

⑪ sudo apt-get install freeglut3-dev pkg-config

⑫ sudo apt-get install libxmu-dev libxi-dev

⑬ sudo apt-get install mono-complete

⑭ sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre

Build Point Cloud Library

Point Cloud library is obtained by :
git clone https://github.com/PointCloudLibrary/pcl.git
After this, we can see the PCL folder in your directory. Go into it and create a release directory and follow the CMake build process:
① cd pcl

② mkdir release

③ cd release

④ cmake ..

⑤ make

The make will take lots of time. Just be patient and let it do its work. Once the build process finishes, install it by:

⑥ sudo make install

Below is the video link for installing PCL and Conversion of CAD file to Point Cloud.
1. Installing Point Cloud Library

2. Conversion of CAD Model Using Point Cloud Library

Figure: Conversion of CAD Model Using Point Cloud Library

Hope this simple tutorial might help to install PCL on Ubuntu for beginners and data conversion to Point Cloud.

--

--

Prarthana Bataju

Working as an R&D Engineer @Misumi Corporation, Japan over the past 7 years.