epctofcam Library Documentation

The epctofcam library provides a high-level interface for capturing and processing data from espros ToF sensors. It acquires raw ToF images from the sensor via the Linux V4L2 API and computes calibrated distance and amplitude images from the raw DCS frames.

epctofcam library overview

Target Platforms

This library is intended to run on all ARM based APU’s but has mainly been tested on the Raspberry Pi 5.

Requirements

  • Compatible espros ToF-Sensor (e.g. epc670 ToF HAT+) and device drivers must be installed and accessible on the system.

  • The Python bindings expect a Python version >= 3.10

Installation

Python bindings:

# Fresh installation
pip install epc-tofcam-native

# Update to the newest version
pip install --upgrade epc-tofcam-native

# Install a specific version
pip install epc-tofcam-native=x.x.x

C++ library:

  1. Download and add ESPROS GPG keyring to your keyrings

sudo wget http://apt.espros.com/espros-archive-keyring.gpg -P /usr/share/keyrings/
  1. Add the apt source to your system

echo "Types: deb
URIs: http://apt.espros.com
Suites: trixie
Components: main
Signed-By: /usr/share/keyrings/espros-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/espros.sources
  1. Update and install the library

# Fetch newest version informations
sudo apt update

# Fresh installation of libepctofcam
sudo apt install libepctofcam

# Update to the newest version
sudo apt install --only-upgrade libepctofcam

# Update to a specific version
sudo apt install libepctofcam==x.x.x

Basic usage

To get a quick overview of how to use the library, check out the Python API Reference and C++ API Reference reference pages:

For a more complete example of capturing and visualizing ToF data, see the Python Example and C++ Example pages in the Examples section.