Easy multi-sensor mesh reconstruction with Python bindings to RecFusion SDK (C++).
This project slightly modifies or adds new functionalites to the original RecFusion SDK API:
- RecFusionSDK version string:
version() -> str
- Open all available sensors:
SensorManager.open_all() -> list[Sensor]
- Open any available sensor:
SensorManager.open_any() -> Sensor | None
- Obtain list of sensor color and depth formats:
Sensor.color_formats: list[SensorFormat]
Sensor.depth_formats: list[SensorFormat]
- Initialize playback recorder using sensor options:
RFSRecorder.init_from_sensor(sensor: Sensor) -> None
- Initialize empty
ColorImage
andDepthImage
for a givenSensor
(using its resolution etc.):ColorIamge.for_sensor(sensor: Sensor) -> ColorImage
DepthIamge.for_sensor(sensor: Sensor) -> DepthImage
- Save images to *.png files:
ColorImage.to_image(filename: str, compression: int = 3) -> None
DepthImage.to_image(filename: str, compression: int = 3) -> None
Requirements:
- Installed locally the RecFusion SDK
Then:
pip install pyRecFusionSDK
We provide several examples of using RecFusionSDK with Python:
- capture_playback.py - capture sequence of images as playback file (*.rfs)
- capture_png.py - capture single frame to image (*.png)
- machine_token.py - display machine token required for offline license
- reconstruct_from_playback.py - reconstruct mesh from playback file (*.rfs)
- reconstruct_sensor.py - reconstruct mesh directly from sensor data
- reconstruct_sensor_listener.py - (NOT WORKING) reconstruct mesh directly from sensor data using sensor listener
- show_sensor_info.py - show information about sensor (e.g. model, UUID, resolutions)