Python bindings for the epctofcam c++ library
Project description
epc-tofcam-native
The epc_tofcam_native library provides a high-level interface for capturing and processing data
from ESPROS EPC 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.
It exposes Python bindings for the underlying libepctofcam C++ library.
All frame data is returned as 2D numpy arrays.
Website: https://www.espros.com
Products: https://www.digikey.com/en/supplier-centers/espros
Documentation: https://docs.espros.com/
Requirements
- Compatible espros ToF Sensor (e.g. epc670) must be installed and accessible on the system. (See epc670 tofhat manual)
- This Library is intended to run on all arm based APU's but has manly been tested on the raspberry pi 5.
Quickstart
Install the package using pip on your raspberry pi
pip install epc-tofcam-native
The following is an example script that captures distance/amplitude images from a epc670-tofhat
"""Basic example of using the Python API to capture a frame from the TOF camera."""
from epc_tofcam_native import TOFCam, TOFControl, FrameType
cam = TOFCam()
cam.open()
cam.setControl(TOFControl.MODULATION_FREQUENCY_HZ, 10_000_000)
cam.setControl(TOFControl.EXPOSURE_US, 2000)
cam.startStream()
frame = cam.captureFrame()
distance = frame.get(FrameType.DISTANCE)
amplitude = frame.get(FrameType.AMPLITUDE)
# distance and amplitude are 2D numpy arrays
# add your own code here to process or visualize them
cam.stopStream()
cam.close()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epc_tofcam_native-1.0.4-cp313-cp313-manylinux_2_39_aarch64.whl.
File metadata
- Download URL: epc_tofcam_native-1.0.4-cp313-cp313-manylinux_2_39_aarch64.whl
- Upload date:
- Size: 297.2 kB
- Tags: CPython 3.13, manylinux: glibc 2.39+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7b2edad82bae1d781d2dc0fd5e39149491bcd2ef2dab1dae130187277bad1b4
|
|
| MD5 |
faa490a7779ff3d28a7305d4cf0ff7bd
|
|
| BLAKE2b-256 |
e2ab488462767dff6a669b3a3daa56eb4c429d7396fdc3133e4fd34d5fcfa4a2
|