Skip to content

Point Cloud With Arducam ToF Camera – for Raspberry Pi

point cloud library with a time of flight camera

About Point Cloud

A point cloud is a set of data points in space. The points may represent a 3D shape or object. Each point position has its set of Cartesian coordinates (X, Y, Z). Point clouds are generally produced by 3D scanners or by photogrammetry software, which measure many points on the external surfaces of objects around them.

With the Point Cloud Library, you can quickly generate a real-time point cloud with Arducam ToF camera and your Raspberry Pi, and utilize it in various 3D processing software/algorithms.

Using Point Cloud with Arducam ToF Camera on Raspberry Pi

To properly use Point Cloud with Arducam ToF Camera, the camera driver and necessary dependencies have to be installed first.

Step 1. Pull the repository.

git clone https://github.com/ArduCAM/Arducam_tof_camera.git

Step 2. Change the directory to Arducam_tof_camera

cd Arducam_tof_camera

Step 3. *Installation (Driver, Dependencies, SDK, OpenCV)*

./Install_dependencies.sh

When you see the reboot prompt, enter y. Raspberry Pi will automatically reboot.

Step 4. Installing Open3D

sudo apt-get update
sudo apt install libopen3d-dev

Step 5. Compile

Go back to the Arducam_tof_camera directory(cd Arducam_tof_camera) and run the commands below to compile.

./compile_pointcloud.sh

Step 6. Run the example

Run in the build/open3d_preview directory

cd build/open3d_preview
export MESA_GL_VERSION_OVERRIDE=4.5
./preview_pointcloud

point cloud and depth preview