Examples in this folder are designed to complement existing SDK examples and demonstrate how Intel RealSense cameras can be used together with PCL
(Point-Cloud Library).
- PCL - Minimal Point-cloud viewer that includes PCL processing
- PCL-COLOR - Point-cloud viewer that includes RGB PCL processing
This page is certainly not a comprehensive guide to getting started with PCL, but it can help get on the right track.
- Download and install
CMake
from cmake.org/download - Download prebuilt binaries for PCL (official link). For Visual Studio 2015 / 2017, use the following link.
- Follow the installation procedure:
- Open the Command Prompt and execute:
set PCL_ROOT="C:\Program Files (x86)\PCL 1.8.1"
set PATH=%PATH%;%PCL_ROOT%\bin;%OPENNI2_REDIST%
Or if you have install the 64-bit version:
set PCL_ROOT="C:\Program Files\PCL 1.8.1"
set PATH=%PATH%;%PCL_ROOT%\bin;%OPENNI2_REDIST64%
-
If you had Visual Studio openned, please restart it to make sure new environment variables are in effect.
-
Clone or download librealsense sources from github.com/IntelRealSense/librealsense into a local directory (
C:/git/librealsense
) -
Run
cmake-gui
and fill source code and binaries locations and pressConfigure
-
Make sure ``BUILD_SHARED_LIBS` is checked (linking to librealsense staticly will cause problems with PCL linkage)
-
Check the
BUILD_PCL_EXAMPLES
flag and clickConfigure
again:
- Click
Generate
andOpen Project
- Locate PCL solution-folder under Examples
- Right-click on one of the examples to
Set as StartUp Project
- Press
F5
to compile and run the example
- Install PCL from official PPA:
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all
- Follow the instructions to build
librealsense
from source - Add
-DBUILD_PCL_EXAMPLES=true
to yourcmake
command - Run
./wrappers/pcl/pcl/rs-pcl
or justrs-pcl
if you have previously executedsudo make install
The demo seem to Seg-Fault in Debug configuration. This is very troubling, but it seem to be somewhat of a known issue with PCL. As a work-around add
-DCMAKE_BUILD_TYPE=RelWithDebInfo
to yourcmake
command