This repository contains a comprehensive Python wrapper for the Optitrack Camera SDK using nanobind. It exposes a wide variety of camera manipulation functions, as well as GIL-friendly video and marker retrieval functions for use with numpy
.
Requires python >= 3.8. This has only ever been tested with Prime 13W's; different cameras may need some of the hard-coded resolution assumptions updated.
- Ensure you are using Python 3.8.10 and you're on Windows
- Make a virtual environment with
python.exe -m venv .venv
, activate venv with.\.venv\Scripts\activate
- Install the Optitrack Camera SDK to:
C:/Program Files (x86)/OptiTrack/Camera SDK
- Clone this repository
- Navigate to the top-level
pyopticam
directory and runpip install -e .
(Do not upgrade pip, use pip version21.1.1
) - Find
C:/Program Files (x86)/OptiTrack/Camera SDK/lib/CameraLibrary2015x64S.dll
and copy it topyopticam/src/pyopticam
Afterwards, make sure your Optitrack cameras are accessible on the network, and try the video_viewer.py
or the marker_viewer.py
example.
pyopticam is provided under the Apache V2 license that can be found in the LICENSE file.
By using, distributing, or contributing to this project, you agree to the terms and conditions of this license, and the licenses of nanobind (BSD 3-Clause) and Optitrack's Camera SDK.