Skip to main content

pyorbbecsdk-community is a community-maintained python wrapper for the OrbbecSDK

Project description

pyorbbecsdk (Forked)

PyPI version CI

This repository is a fork of orbbec/pyorbbecsdk, rewritten to add CI automated builds and simplified deployment.

Install directly from PyPI:

pip install pyorbbecsdk-community

Note: This is a community maintained fork. For any issues or feature requests, please open an issue on this repository.

From here onward, the content is from the original repository's README.

Python Bindings for Orbbec SDK

This main branch provides Python bindings for the Orbbec SDK v1.x, allowing developers to interface with Orbbec devices in Python. the OrbbecSDK_V2.x branch provides Python bindings for the Orbbec SDK v2.x,The differences between Orbbec SDK v2.x and Orbbec SDK v1.x can be found in the README.

[!IMPORTANT]

Welcome to the python wrapper . Before you begin using this version of python wrapper , it's crucial to check the following device support list to verify the compatibility.

Here is the device support list of main branch (v1.x) and v2-main branch (v2.x):

Product Series Product Branch main Branch v2-main
Gemini 330 Gemini 335 full maintenance recommended for new designs
Gemini 336 full maintenance recommended for new designs
Gemini 330 full maintenance recommended for new designs
Gemini 335L full maintenance recommended for new designs
Gemini 336L full maintenance recommended for new designs
Gemini 330L full maintenance recommended for new designs
Gemini 335Lg not supported recommended for new designs
Gemini 2 Gemini 2 full maintenance recommended for new designs
Gemini 2 L full maintenance recommended for new designs
Gemini 2 XL recommended for new designs to be supported
Femto Femto Bolt full maintenance recommended for new designs
Femto Mega full maintenance recommended for new designs
Femto Mega I full maintenance to be supported
Astra Astra 2 full maintenance recommended for new designs
Astra+ limited maintenance not supported
Astra Pro Plus limited maintenance not supported
Astra Mini Astra Mini Pro full maintenance not supported

Note: If you do not find your device, please contact our FAE or sales representative for help.

Definition:

  1. recommended for new designs: we will provide full supports with new features, bug fix and performance optimization;
  2. full maintenance: we will provide bug fix support;
  3. limited maintenance: we will provide critical bug fix support;
  4. not supported: we will not support specific device in this version;
  5. to be supported: we will add support in the near future.

Hardware Products Supported by Python SDK

products list firmware version
Gemini 330 1.2.20
Gemini 330L 1.2.20
Gemini 335 1.2.20
Gemini 335L 1.2.20
Gemini 336 1.2.20
Gemini 336L 1.2.20
Femto Bolt 1.0.6/1.0.9
Femto Mega 1.1.7/1.2.7
Gemini 2 XL Obox: V1.2.5 VL:1.4.54
Astra 2 2.8.20
Gemini 2 L 1.4.32
Gemini 2 1.4.60 /1.4.76
Astra+ 1.0.22/1.0.21/1.0.20/1.0.19
Femto 1.6.7
Femto W 1.1.8
DaBai 2436
DaBai DCW 2460
DaBai DW 2606
Astra Mini Pro 1007
Gemini E 3460
Gemini E Lite 3606
Gemini 3.0.18
Astra Mini S Pro 1.0.05

Getting Started

Get the Source Code

Clone the repository to get the latest version of the Python bindings for Orbbec SDK.

git clone https://github.com/orbbec/pyorbbecsdk.git

Install Dependencies

Install the necessary Python development packages on Ubuntu.

sudo apt-get install python3-dev python3-venv python3-pip python3-opencv

Custom Python3 Path (Optional)

If you use Anaconda, set the Python3 path to the Anaconda path in pyorbbecsdk/CMakeLists.txt before the find_package(Python3 REQUIRED COMPONENTS Interpreter Development) line:

set(Python3_ROOT_DIR "/home/anaconda3/envs/py3.6.8") # Replace with your Python3 path
set(pybind11_DIR "${Python3_ROOT_DIR}/lib/python3.6/site-packages/pybind11/share/cmake/pybind11") # Replace with your Pybind11 path

Build the Project

Create a virtual environment and build the project.

cd pyorbbecsdk
python3 -m venv ./venv
source venv/bin/activate
pip3 install -r requirements.txt
mkdir build
cd build
cmake -Dpybind11_DIR=`pybind11-config --cmakedir` ..
make -j4
make install

Try the Examples

Set up your environment to run examples and install necessary system rules.

cd pyorbbecsdk
export PYTHONPATH=$PYTHONPATH:$(pwd)/install/lib/
sudo bash ./scripts/install_udev_rules.sh
sudo udevadm control --reload-rules && sudo udevadm trigger
python3 examples/depth_viewer.py
python3 examples/net_device.py # Requires ffmpeg installation for network device

Additional examples are available in the examples directory. Please see examples/README.md for further details.

Generate Stubs

Generate Python stubs for better IntelliSense in your IDE.

source env.sh
pip3 install pybind11-stubgen
pybind11-stubgen pyorbbecsdk

Building on Windows

For instructions on how to build and run the examples on Windows, please refer to docs/README.md.

Making a Python Wheel

Generate a wheel package for easy distribution and installation.

cd pyorbbecsdk
python3 -m venv ./venv
source venv/bin/activate
pip3 install -r requirements.txt
mkdir build
cd build
cmake -Dpybind11_DIR=`pybind11-config --cmakedir` ..
make -j4
make install
cd ..
pip3 install wheel
python3 setup.py bdist_wheel
pip3 install dist/*.whl

Enabling Device Timestamps via UVC Protocol on Windows

To get device timestamps through the UVC protocol on a Windows system, you must modify the registry by completing a registration process. This is required due to default system limitations. Follow the steps below to configure your system:

1. Connect the Device

  • Ensure your UVC-compatible device is connected to the computer and recognized by the system. Confirm that the device is online and functioning.

2. Open PowerShell with Administrator Privileges

  • Open the Start menu, type PowerShell, right-click on the PowerShell app, and select 'Run as administrator'.

3. Navigate to the Scripts Directory

  • Use the cd command to change the directory to the location of your scripts.
    cd scripts
    

4. Modify Execution Policy

  • Modify the PowerShell execution policy to allow script execution. Run the following command and press Y when prompted to confirm the change:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    

5. Execute the Registration Script

  • Run the registration script to modify the registry settings. Use the following command:
    .\obsensor_metadata_win10.ps1 -op install_all
    

This will complete the necessary registration and modification of settings to allow device timestamps via the UVC protocol on your Windows system.

Documentation

For detailed documentation, please refer to docs/README.md.

License

This project is licensed under the Apache License 2.0.

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 Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyorbbecsdk_community-1.4.2-cp312-cp312-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.12Windows x86-64

pyorbbecsdk_community-1.4.2-cp312-cp312-macosx_14_0_universal2.whl (22.1 MB view details)

Uploaded CPython 3.12macOS 14.0+ universal2 (ARM64, x86-64)

pyorbbecsdk_community-1.4.2-cp311-cp311-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.11Windows x86-64

pyorbbecsdk_community-1.4.2-cp311-cp311-macosx_14_0_universal2.whl (22.1 MB view details)

Uploaded CPython 3.11macOS 14.0+ universal2 (ARM64, x86-64)

pyorbbecsdk_community-1.4.2-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10Windows x86-64

pyorbbecsdk_community-1.4.2-cp310-cp310-macosx_14_0_universal2.whl (22.1 MB view details)

Uploaded CPython 3.10macOS 14.0+ universal2 (ARM64, x86-64)

pyorbbecsdk_community-1.4.2-cp39-cp39-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.9Windows x86-64

pyorbbecsdk_community-1.4.2-cp39-cp39-macosx_14_0_universal2.whl (22.1 MB view details)

Uploaded CPython 3.9macOS 14.0+ universal2 (ARM64, x86-64)

pyorbbecsdk_community-1.4.2-cp38-cp38-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.8Windows x86-64

pyorbbecsdk_community-1.4.2-cp38-cp38-macosx_14_0_universal2.whl (22.1 MB view details)

Uploaded CPython 3.8macOS 14.0+ universal2 (ARM64, x86-64)

File details

Details for the file pyorbbecsdk_community-1.4.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4879d32e143d73a27a46fef598c651170278b9f2ebc13a50e36197dad1877136
MD5 2d818a7704e70f517faf8a25b8b6bd16
BLAKE2b-256 3b090cd49a6f4dc0182c2a2ead639417edc8e4020c4dfc4dd30129c8ec374334

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp312-cp312-win_amd64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ebae84b087c039b5e105f60e8ff8984852e3c47f9e71c625aed493af2a7c93a
MD5 f7182ea7a21d3f90c969a927f8a973fb
BLAKE2b-256 7d925f6dac5c43a52c72489496e1dc81c583c3e9810feaa1011c43484cc736f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp312-cp312-manylinux2014_x86_64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp312-cp312-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp312-cp312-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 211d5bd0bb579f07c1fe48afbb287baf3dbc0cc8b65f7b9d38ea9c7ac61300b5
MD5 819e4a2ab43beab69e0c4e2ab0db7aec
BLAKE2b-256 154074e2eeb986f84d49309e365165e80b28451a3934c2ae4edf7f9cb680b60f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp312-cp312-macosx_14_0_universal2.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c4e610b79c23576ca2c60583f12ad50cd9e8525e11a0323ac0302b8d3a08362b
MD5 6c4f5095cf8fe55e955d0baf5766fd08
BLAKE2b-256 bb7aed36db814e8fd16215a4d66b899db00f72c97f02eb98874aab51912146c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp311-cp311-win_amd64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b24bffaed912a6bca7e751e769ccf4055a8bc879150ee14cd4daa2bf772ba6af
MD5 26573ccb8f86e96ee33d7115a30c917e
BLAKE2b-256 a4e02efc8fbd27b3bee1aec4b8f8b4715f259b6889779bf914a1d429d58a9c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp311-cp311-manylinux2014_x86_64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp311-cp311-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp311-cp311-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 93054d8fd16cbae35566d995e498b0ba26f4a347b1d642284b532d19c6e3c6bf
MD5 b145f1c3ee9acb807a86dd6d57d3820a
BLAKE2b-256 b6d304b63db1d5f4901180f6914e63b09e6a6189ccf75fc4cf294d9ca2615651

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp311-cp311-macosx_14_0_universal2.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bd0e8b8e33c9b84ce2b3d811fc7003aaf50f808a09faa270fd7ef3300d92fbb7
MD5 a6b7c6a54e92579219b7aa547d8aed7a
BLAKE2b-256 633049b10231f0b20edc1272aff10fe489af4e336323e7c2a520c99a8ca4ae32

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp310-cp310-win_amd64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a74af13fb591702b0830575a172bd55146947ec1ecc4afbbdafee4ac2cde0962
MD5 098ec2b14ff3f25c4c6c92bc650170de
BLAKE2b-256 46bb5692814b6cce191276ba5fd106ae3c7f4606715327d9e208938b86251bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp310-cp310-manylinux2014_x86_64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp310-cp310-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp310-cp310-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 7ef15ea96970ad89dbb509bf7e53c372c26953e8f0f297310651b7dc61a8a2b6
MD5 ebef426cdcd34575bfcf5b3b0489fd01
BLAKE2b-256 f166c49b35b2227070d26bcf2095143e13b86fa0138892fd60d356429236c80d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp310-cp310-macosx_14_0_universal2.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f567d8703c23ace46e38fe7ae87a2607d11f5bfa390ec49e06fbe9fa75bcb9b6
MD5 3c340325f6f673e81550e29c7b8defbc
BLAKE2b-256 fc6001be847b2b4360cd7321e121308a52a3d80fd317630a73a41ede8e09e9b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp39-cp39-win_amd64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1df86f0468ac34f77eb16003992b6f97a33bd8975c88746b402c451700957adb
MD5 137d70d85d5505332be97f922da0e4ec
BLAKE2b-256 258388aaf98e394098711bb350c7a3b8c3873b39676fd7552fcdeb3081b6b19a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp39-cp39-manylinux2014_x86_64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp39-cp39-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp39-cp39-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 e2da62a233ab8cc5db53765e4b30ac3c897998d98ecbbad508e00f5302e98449
MD5 5e7417894b6aa979d8b2ec5d43156939
BLAKE2b-256 004f9daae26dec0a2a1ccc16316256f211a65de879220885a413abe299073bd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp39-cp39-macosx_14_0_universal2.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3833a2816f77fdfb84822e6db25667bbeafc72dbf13d93a6a1d656b9c8e98e0b
MD5 45825b0c41f7cca930c84bd59bad1b59
BLAKE2b-256 33612249a50d13a3d5cdff6f6d00a50c53b8e053c77113ad1c92538d4fd8c67a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp38-cp38-win_amd64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cc732abfa43668dab0bbb6245f3f90662dd56382150bc49d06fb341e97f207d
MD5 6c5a92645ebf867f92ebb1ab95f58258
BLAKE2b-256 771013fcd818e35dcc558f99e6dbb1ea4ad110ed889a8e870a228015ba888f95

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp38-cp38-manylinux2014_x86_64.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyorbbecsdk_community-1.4.2-cp38-cp38-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for pyorbbecsdk_community-1.4.2-cp38-cp38-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 95f7e473221f0b3142ef166bce939e5f2e8bc82e67f8231ff65fdb8f2bfbffe6
MD5 cb133fc0530b30869f115a3980da36f8
BLAKE2b-256 5fc617fb3280076060e0dc6b31eb9f008c58ba5162ee555fe8e1d646beaf4ace

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyorbbecsdk_community-1.4.2-cp38-cp38-macosx_14_0_universal2.whl:

Publisher: build.yaml on W-YXN/pyorbbecsdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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