Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epc_tofcam_native-1.0.3-cp313-cp313-manylinux_2_39_aarch64.whl (289.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ ARM64

File details

Details for the file epc_tofcam_native-1.0.3-cp313-cp313-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for epc_tofcam_native-1.0.3-cp313-cp313-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 640e2c7c74c67b1fe29f4040ea6a336f82ffb52cb0ba37d653b56a3db8552098
MD5 0883748a6b519451c162165ba6cf56b9
BLAKE2b-256 13e6e4ee163d478089369c7bf17199f6b1335ded22b1b7ae62a44a5d673e40a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page