Skip to content

A nanobind wrapper for NaturalPoint's Optitrack Camera SDK

License

Notifications You must be signed in to change notification settings

leapmotion/pyopticam

Repository files navigation

pyopticam

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.

Installation

  1. Ensure you are using Python 3.8.10 and you're on Windows
  2. Make a virtual environment with python.exe -m venv .venv, activate venv with .\.venv\Scripts\activate
  3. Install the Optitrack Camera SDK to: C:/Program Files (x86)/OptiTrack/Camera SDK
  4. Clone this repository
  5. Navigate to the top-level pyopticam directory and run pip install -e . (Do not upgrade pip, use pip version 21.1.1)
  6. Find C:/Program Files (x86)/OptiTrack/Camera SDK/lib/CameraLibrary2015x64S.dll and copy it to pyopticam/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.

License

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.