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.1.0-cp313-cp313-manylinux_2_39_aarch64.whl (301.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ ARM64

File details

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

File metadata

File hashes

Hashes for epc_tofcam_native-1.1.0-cp313-cp313-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 1e61c5876b7750a9e767b96342c4d5d73022efbb545f55d8357c43c3c6660f4e
MD5 b250f9094a77901fb141087f79f85b28
BLAKE2b-256 d411ed822a0a6f1925bb27b7a34e7e05d716571dffdd5c676b8c768183d68ebf

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