Metadata-Version: 2.2
Name: epc-tofcam-native
Version: 1.0.3
Summary: Python bindings for the epctofcam c++ library
Keywords: TOF,TOFcam,ESPROS,epc,epc670,pointcloud,3D,time of flight,TOF camera
Author: ESPROS Photonic Corporation
Maintainer-Email: ESPROS Photonic Corporation <software-dev@espros.com>
License: Proprietary
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Project-URL: home-page, https://www.espros.com/
Requires-Dist: numpy
Description-Content-Type: text/markdown

<div align="center">
<img src="https://raw.githubusercontent.com/espros/epc-tofcam-toolkit/master/docs/source/images/epc-logo.png" width="300">
</div>

# 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
```bash
pip install epc-tofcam-native
```

The following is an example script that captures distance/amplitude images from a epc670-tofhat
```python
"""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()
```