Giter VIP home page Giter VIP logo

pyorbbecsdk's Introduction

Python Bindings for Orbbec SDK

This project provides Python bindings for the Orbbec SDK, allowing developers to interface with Orbbec devices in Python.

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.

pyorbbecsdk's People

Contributors

jian-dong avatar zhonghong322 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyorbbecsdk's Issues

Error while compiling the code

Hi,
I'm following the README to use the Femto Bolt. I'm working on a Mac Book Pro M1 2021 under Sonoma.
At the step make -j4, it links CXX up to 100%, but then i get the following error :

ld: unknown file type in 'root/pyorbbecsdk/sdk/lib/arm64/libOrbbecSDK.so.1.8.1'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pyorbbecsdk.cpython-310-darwin.so] Error 1
make[1]: *** [CMakeFiles/pyorbbecsdk.dir/all] Error 2
make: *** [all] Error 2

Any idea how to fix it?

Ubuntu 20.04 编译后运行报错

深度图Vier报错:
[05/18 16:38:01.671258][error][351384][MSDEConverterDevice.cpp:101] Depth engine create and initialize failed,retCode:204
[05/18 16:38:01.671330][info][351384][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/18 16:38:01.671333][info][351384][MSDEConverterDevice.cpp:94] use dynlib load depthengine lib......
EGL NO DISPLAY
EGL NO DISPLAY

RGB图Vier报错:
[05/18 16:40:24.095919][warning][351584][ObException.cpp:5] Invalid input, No matched video stream profile found!
Invalid input, No matched video stream profile found!
color profile: <VideoStreamProfile: 1920x1080@15>

Error compiling with MinGW64 on Windows10

I used cmake to generate the MinGW Makefiles and then compile it, but there were many undefined symbols errors when linking the program, as shown in the log message below. Additionally, the provision of compiled .pyd file for testing purposes would be greatly appreciated.

cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH="D:\work\HNU-learning\py38env\Lib\site-packages\pybind11\share\cmake\pybind11" ..

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/SoftwarePackage/w64devkit/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: E:/SoftwarePackage/w64devkit/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: D:/work/HNU-learning/py38env/Scripts/python.exe (found version "3.8.9") found components: Interpreter Development Development.Module Development.Embed 
-- pybind11::lto disabled (problems with undefined symbols for MinGW for now)
-- pybind11::thin_lto disabled (problems with undefined symbols for MinGW for now)
-- Found pybind11: D:/work/HNU-learning/py38env/Lib/site-packages/pybind11/include (found version "2.11.1")
-- Configuring done (4.6s)
-- Generating done (0.0s)
-- Build files have been written to: D:/work/HNU-learning/pyorbbecsdk/build

make -j8
[  7%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/pyorbbecsdk.cpp.obj
[ 14%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/context.cpp.obj
[ 21%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/device.cpp.obj
[ 28%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/error.cpp.obj
[ 35%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/filter.cpp.obj
[ 42%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/frame.cpp.obj
[ 50%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/pipeline.cpp.obj
[ 57%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/properties.cpp.obj
[ 64%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/record_playback.cpp.obj
[ 71%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/sensor.cpp.obj
[ 78%] [ 85%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/stream_profile.cpp.objBuilding CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/types.cpp.obj

[ 92%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/utils.cpp.obj
[100%] Linking CXX shared library pyorbbecsdk.cp38-win_amd64.pyd
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(pyorbbecsdk.cpp.obj):pyorbbecsdk.cp:(.text+0xab8): undefined reference to `__imp__ZN2ob7Version8getMajorEv'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(pyorbbecsdk.cpp.obj):pyorbbecsdk.cp:(.text+0xac1): undefined reference to `__imp__ZN2ob7Version8getMinorEv'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(pyorbbecsdk.cpp.obj):pyorbbecsdk.cp:(.text+0xac9): undefined reference to `__imp__ZN2ob7Version8getPatchEv'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(pyorbbecsdk.cpp.obj):pyorbbecsdk.cp:(.text+0x1813): undefined reference to `__imp__ZN2ob7Version15getStageVersionEv'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(pyorbbecsdk.cpp.obj):pyorbbecsdk.cp:(.text+0x1832): undefined reference to `__imp__ZN2ob7Version15getStageVersionEv'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0xe98): undefined reference to `__imp__ZN2ob7Context17setLoggerSeverityE13OBLogSeverity'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0xf08): undefined reference to `__imp__ZN2ob7Context18setLoggerToConsoleE13OBLogSeverity'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0xf7b): undefined reference to `__imp__ZN2ob7Context15setLoggerToFileE13OBLogSeverityPKc'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0x1033): undefined reference to `__imp__ZN2ob7ContextC1EPKc'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0x1103): undefined reference to `__imp__ZN2ob7ContextC1EPKc'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(context.cpp.obj):context.cpp:(.text+0x11c4): undefined reference to `__imp__ZN2ob7Context15queryDeviceListEv'
......
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(stream_profile.cpp.obj):stream_profile:(.text$_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_17GyroStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_[_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_17GyroStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_]+0xb7): undefined reference to `__imp__ZN2ob17GyroStreamProfileC1ERNS_13StreamProfileE'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(stream_profile.cpp.obj):stream_profile:(.text$_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_18VideoStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_[_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_18VideoStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_]+0x76): undefined reference to `__imp__ZN2ob18VideoStreamProfileC1ERNS_13StreamProfileE'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(stream_profile.cpp.obj):stream_profile:(.text$_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_18VideoStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_[_ZZN8pybind1112cpp_function10initializeIZNS_6detail8initimpl11constructorIJRN2ob13StreamProfileEEE7executeINS_6class_INS5_18VideoStreamProfileEJS6_St10shared_ptrISB_EEEEJELi0EEEvRT_DpRKT0_EUlRNS2_16value_and_holderES7_E_vJSM_S7_EJNS_4nameENS_9is_methodENS_7siblingENS2_24is_new_style_constructorEEEEvOSF_PFT0_DpT1_EDpRKT2_ENUlRNS2_13function_callEE1_4_FUNES13_]+0xb7): undefined reference to `__imp__ZN2ob18VideoStreamProfileC1ERNS_13StreamProfileE'
E:\SoftwarePackage\w64devkit\bin/ld.exe: CMakeFiles\pyorbbecsdk.dir/objects.a(stream_profile.cpp.obj):stream_profile:(.text$_ZN8pybind116class_IN2ob17StreamProfileListEJSt10shared_ptrIS2_EEE13init_instanceEPNS_6detail8instanceEPKv[_ZN8pybind116class_IN2ob17StreamProfileListEJSt10shared_ptrIS2_EEE13init_instanceEPNS_6detail8instanceEPKv]+0x54d): undefined reference to `__imp__ZN2ob17StreamProfileListD1Ev'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [CMakeFiles\pyorbbecsdk.dir\build.make:304: pyorbbecsdk.cp38-win_amd64.pyd] Error 1
make[1]: *** [CMakeFiles\Makefile2:83: CMakeFiles/pyorbbecsdk.dir/all] Error 2
make: *** [Makefile:145: all] Error 2

Error linking CXX shared library pyorbbecsdk.cpython-38-x86_64-linux-gnu.so

I got this error when trying to build using make -j4:
[ 7%] Linking CXX shared library pyorbbecsdk.cpython-38-x86_64-linux-gnu.so /usr/bin/ld: cannot find -lOrbbecSDK collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/pyorbbecsdk.dir/build.make:265: pyorbbecsdk.cpython-38-x86_64-linux-gnu.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/pyorbbecsdk.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Here is the output when I did try run the cmake -Dpybind11_DIR=pybind11-config --cmakedir..

-- Found pybind11: /home/vikash/achnaf/cv-project/pyorbbecsdk/orbbec-env/lib/python3.8/site-packages/pybind11/include (found version "2.11.1") -- Configuring done -- Generating done -- Build files have been written to: /home/vikash/achnaf/cv-project/pyorbbecsdk/build

And this is after I run the make install:

/usr/bin/ld: cannot find -lOrbbecSDK collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/pyorbbecsdk.dir/build.make:265: pyorbbecsdk.cpython-38-x86_64-linux-gnu.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/pyorbbecsdk.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Do you have any idea on what's going on? thank you in advance.

Genimi 2L 如何用python把深度图中的某一点转化为点云的点呢?

深度与彩色已经D2C
我获取到相机参数如下
fx=610.353455 fy=610.328857 cx=646.553650 cy=402.924255
然后通过下面代码来转化
X = (u - cx) * Z / fx #u,v为深度图中点的坐标,z为该点对应的深度值,X,Y,Z为要求的点云坐标
Y = (v - cy) * Z / fy
Z = z
我这样做是为了计算两点之间的距离,如果将整帧都转化的话太慢了,所以想只转化某两点,但是这样转化完之后我计算这两点的欧式距离是有误差的,实际距离20cm,但是会算成36cm左右

无法打开深度相机获取数据

[05/15 23:53:05.285380][info][3844][Context.cpp:68] Context created with config: default config!
[05/15 23:53:05.285398][info][3844][Context.cpp:73] Work directory=D:\YS\project\code\4kinectdk , SDK version=v1.10.5-20240511-7dc8be970
[05/15 23:53:05.285427][info][3844][MfPal.cpp:102] createObPal: create WinPal!
[05/15 23:53:05.327431][info][3844][DeviceManager.cpp:15] Current found device(s): (1)
[05/15 23:53:05.327442][info][3844][DeviceManager.cpp:24] - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100E0, Connection: USB3.1
[05/15 23:53:05.327482][info][3844][Pipeline.cpp:15] Try to create pipeline with default device.
[05/15 23:53:05.327530][info][3844][FemtoBoltUvcDevice.cpp:23] FemtoBoltUvcDevice init ...
[05/15 23:53:05.327659][info][3844][FemtoBoltUvcDevice.cpp:121] Create command start!
[05/15 23:53:05.327669][info][3844][MfPal.cpp:289] Create MSDEConverterDevice uvc device.
[05/15 23:53:05.330790][error][3844][MSDEConverterDevice.cpp:723] Failed to load depth engine plugin
[05/15 23:53:06.171562][info][3844][AbstractDevice.cpp:117] - Firmware version: 1.0.9
[05/15 23:53:06.171574][info][3844][FemtoBoltUvcDevice.cpp:280] Create command done!
[05/15 23:53:06.171580][info][3844][FemtoBoltUvcDevice.cpp:401] init sensor map start!
[05/15 23:53:06.171596][info][3844][FemtoBoltUvcDevice.cpp:428] init sensor map done!
[05/15 23:53:06.171683][info][3844][FemtoBoltUvcDevice.cpp:284] Init depth process param start!
[05/15 23:53:06.530716][info][3844][MSDEConverterDevice.cpp:777] got nvram data succeed.
[05/15 23:53:07.086397][info][3844][FemtoBoltUvcDevice.cpp:358] setNvramDataStreamStopFunc succeed
[05/15 23:53:07.086630][info][3844][FemtoBoltUvcDevice.cpp:397] Init depth process param done!
[05/15 23:53:07.087961][info][3844][FemtoBoltUvcDevice.cpp:38] FemtoBoltUvcDevice init done!
[05/15 23:53:07.087979][info][3844][DeviceManager.cpp:150] Device created successfully! Name: Femto Bolt, PID: 0x066b, SN/ID: CL8R24100E0
[05/15 23:53:07.088020][info][3844][Pipeline.cpp:47] Pipeline created with device: {name: Femto Bolt, sn: CL8R24100E0}, @0x18BB27A05B0
[05/15 23:53:07.088951][info][3844][FemtoBoltUvcDevice.cpp:528] Depth sensor has been created!
[05/15 23:53:07.089006][info][3844][VideoSensor.cpp:382] Query stream profile! size= 14, SensorType=OB_SENSOR_DEPTH
[05/15 23:53:07.089019][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}
[05/15 23:53:07.089028][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 15}
[05/15 23:53:07.089040][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 5}
[05/15 23:53:07.089050][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}
[05/15 23:53:07.089058][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 30}
[05/15 23:53:07.089066][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 25}
[05/15 23:53:07.089073][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 25}
[05/15 23:53:07.089081][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 15}
[05/15 23:53:07.089089][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 5}
[05/15 23:53:07.089096][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 5}
[05/15 23:53:07.089104][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 30}
[05/15 23:53:07.089112][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 25}
[05/15 23:53:07.089119][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 15}
[05/15 23:53:07.089127][info][3844][VideoSensor.cpp:384] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 5}
depth profile: <VideoStreamProfile: 640x576@15>
[05/15 23:53:07.089984][info][3844][Pipeline.cpp:237] Try to start streams!
[05/15 23:53:07.090061][info][3844][VideoSensor.cpp:631] start OB_SENSOR_DEPTH stream with profile: {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}, Backend Format: OB_FORMAT_Y16
[05/15 23:53:07.090071][info][3844][MSDEConverterDevice.cpp:549] Start real profile,width:7680 height:434
[05/15 23:53:07.093510][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:07.093536][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:07.395049][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:07.395092][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:07.706056][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:07.706101][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:08.017962][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:08.018035][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:08.329468][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:08.329517][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:08.639933][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:08.639982][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:08.952420][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:08.952479][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:09.262126][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:09.262150][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:09.574891][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:09.574988][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:09.882068][info][6304][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492464
[05/15 23:53:09.882187][error][6304][MSDEConverterDevice.cpp:91] Failed to load depth engine plugin,init depth engine failed.
[05/15 23:53:10.190269][info][3844][Pipeline.cpp:250] Start streams done!
[05/15 23:53:10.190282][info][3844][Pipeline.cpp:226] Pipeline start done!


如上是报错信息,不知道如何解决。 看到网上有说是电脑GPU的问题,不知道官方是否有准确的解答和解决方案。不胜感激~

Error while building pyorbbecsdk

I am running on

  • Ubuntu 20.04LTS
  • Python 3.8.10

I am trying to build pyorbbecsdk, I followed all the steps. When I run make -j4 inside build directory. I get the following error

Scanning dependencies of target pyorbbecsdk
[  7%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/pyorbbecsdk.cpp.o
[ 14%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/context.cpp.o
[ 21%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/device.cpp.o
[ 28%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/error.cpp.o
[ 35%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/filter.cpp.o
[ 42%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/frame.cpp.o
[ 50%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/pipeline.cpp.o
[ 57%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/properties.cpp.o
[ 64%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/record_playback.cpp.o
[ 71%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/sensor.cpp.o
[ 78%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/stream_profile.cpp.o
[ 85%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/types.cpp.o
[ 92%] Building CXX object CMakeFiles/pyorbbecsdk.dir/src/pyorbbecsdk/utils.cpp.o
[100%] Linking CXX shared library pyorbbecsdk.cpython-38-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lOrbbecSDK
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pyorbbecsdk.dir/build.make:265: pyorbbecsdk.cpython-38-x86_64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/pyorbbecsdk.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

I have my OrbecSDK and I have built it aswell.

Not sure, where I am doing a mistake. The community guidance will be helpful.

有很多错误

1.git clone的网址是错的
2.windows版本安装requirements根本找不到安装包

是否适配win11?

正在尝试使用Femto Bolt 和 Femto Mega,可以通过此SDK在win11上进行使用吗?尤其mega的文档中表示支持win11

linux执行cmake -Dpybind11_DIR=pybind11-config --cmakedir ..显示

CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES
Development Development.Module Development.Embed) (found version "3.7.16")
Call Stack (most recent call first):
/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.25/Modules/FindPython/Support.cmake:3240 (find_package_handle_standard_args)
/usr/share/cmake-3.25/Modules/FindPython3.cmake:490 (include)
CMakeLists.txt:35 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/csecl/miniconda3/envs/csecl/pyorbbecsdk/build/CMakeFiles/CMakeOutput.log".

深度帧不稳定

你好!我用了你们的gemini 2摄像头,用depth viewer打开深度帧,但发现深度帧上面的深度非常不稳定,跳动很大,根本达不到这个摄像头里面所声称的精度(2m-2%),另外深度帧上还有很多值为0的空洞,有时候整根手指的深度都变成0了,后续算法根本没法用。请问有解决办法吗?

导入模块pyorbbecsdk引发错误

windows系统,按照windows安装步骤一步步来的,开始显现是:
from pyorbbecsdk import *
ModuleNotFoundError: No module named 'pyorbbecsdk'
后来,将pyorbbecsdk.cp39-win_amd64.pyd文件重命名为pyorbbecsdk.pyd,显示:
from pyorbbecsdk import *
ImportError: DLL load failed: 找不到指定的模块。

python stubs

python stubs are incomplete

e.g. missing are from types.cpp enums:

OBMultiDeviceSyncMode

  • FREE_RUN
  • STANDALONE
  • ...

USB device can not be found

when I install Python SDK, and try to run ./examples/color_viewer.py, a error is shown. could you please tell me how to do with this problem, thanks
/09 00:44:18.922555][info][4520][Context.cpp:77] - SDK version: 1.9.5
[03/09 00:44:18.922643][info][4520][Context.cpp:78] - SDK stage version: main
[03/09 00:44:18.922681][info][4520][Context.cpp:82] get config EnumerateNetDevice:false
[03/09 00:44:18.922768][info][4520][MfPal.cpp:102] createObPal: create WinPal!
[03/09 00:44:18.946211][warning][4520][MfPal.cpp:212] Found a usb port without interface url! drop it!(device url=\?\USB#VID_2BC5&PID_0402#6&956E9B8&0&2#{A5DCBF10-6530-11D2-901F-00C04FB951ED} interface index=0)
[03/09 00:44:18.946485][info][4520][DeviceManager.cpp:15] Current found device(s): (0)
[03/09 00:44:18.946627][info][4520][Pipeline.cpp:15] Try to create pipeline with default device.
[03/09 00:44:18.946763][warning][4520][ObException.cpp:5] No device found, fail to create pipeline!
Traceback (most recent call last):
File "D:\works\VS\openniwork\pyorbbecsdk\examples\color_viewer.py", line 67, in
main()
File "D:\works\VS\openniwork\pyorbbecsdk\examples\color_viewer.py", line 30, in main
pipeline = Pipeline()
RuntimeError: Caught an unknown exception!
[03/09 00:44:18.964226][info][4520][Context.cpp:90] Context destroyed

orbbecsdk python 按照sample测试depth_viewer.py报错

逐行解释输出:

[02/03 22:30:02.711120][info][6406][Context.cpp:67] Context created with config: /home/eli/下载/pyorbbecsdk/config/OrbbecSDKConfig_v1.0.xml:表示使用指定路径的配置文件创建了一个上下文(Context)。

[02/03 22:30:02.711177][info][6406][Context.cpp:72] Context work_dir=/home/eli/下载/pyorbbecsdk:指定了上下文的工作目录。

[02/03 22:30:02.713594][warning][6406][OpenNIDeviceInfo.cpp:122] New openni device matched.:警告表示检测到新的OpenNI设备。

[02/03 22:30:02.713807][info][6406][LinuxPal.cpp:112] Create PollingDeviceWatcher!:表示创建了一个设备监视器。

[02/03 22:30:02.713875][info][6406][DeviceManager.cpp:15] Current found device(s): (1):提供找到的设备数量。

[02/03 22:30:02.713900][info][6406][DeviceManager.cpp:24] - Name: Astra Mini Pro, PID: 0x065b, SN/ID: AD7J933002N, Connection: USB2.0:提供找到设备的详细信息,包括名称、产品ID、序列号和连接类型。

[02/03 22:30:02.713973][info][6406][Pipeline.cpp:15] Try to create pipeline with default device.:尝试使用默认设备创建管道。

[02/03 22:30:02.714782][info][6406][OpenNIHostProtocol.cpp:567] Hardware versions: FW=5.8.22 (14), HW=0, Chip=6, Sensor=0, SYS=12:显示硬件版本信息。

[02/03 22:30:02.715096][error][6406][OpenNIHostProtocol.cpp:584] Get usb core type failed!:指示获取USB核心类型失败的错误。

[02/03 22:30:02.717785][info][6406][OpenNISensorFirmware.cpp:1185] Sensor serial number:AD7J933002N:提供传感器的序列号。

[02/03 22:30:02.718513][info][6406][OpenNISensorFirmware.cpp:1213] Firmware version RD1007:指定固件版本。

[02/03 22:30:02.718803][info][6406][OpenNISensorFirmware.cpp:1219] Device frequency 50:指示设备频率。

[02/03 22:30:02.731780][error][6406][OpenNIHostProtocol.cpp:957] Host Protocol sub cmd not supported!:报告与不受支持的主机协议子命令相关的错误。

[02/03 22:30:02.731864][warning][6406][OpenNISensorFirmware.cpp:153] OpenNI2 camera don't support Watchdog function!:警告不支持看门狗功能。

[02/03 22:30:02.732454][info][6406][OpenNIDevice.cpp:33] OpenNI device created! PID: 0x065b, SN: AD7J933002N:确认创建了OpenNI设备。

[02/03 22:30:02.732502][info][6406][DeviceManager.cpp:157] Device created successfully! Name: Astra Mini Pro, PID: 0x065b, SN/ID: AD7J933002N:确认设备成功创建。

[02/03 22:30:02.732567][info][6406][Pipeline.cpp:44] Pipeline created with device: {name: Astra Mini Pro, sn: AD7J933002N}, @0x2D2FF450:确认使用指定设备创建了管道。

[02/03 22:30:02.734178][info][6406][OpenNIDevice.cpp:566] Depth sensor has been created!:确认深度传感器已创建。

[02/03 22:30:02.734752][warning][6406][ObException.cpp:5] Invalid input, No matched video stream profile found!:警告无效的输入,未找到匹配的视频流配置。

Error: Invalid input, No matched video stream profile found!:重申错误消息。

depth profile: <class 'pyorbbecsdk.VideoStreamProfile'>:提供深度配置的信息。

[02/03 22:30:02.736562][info][6406][Pipeline.cpp:239] Try to start streams!:尝试启动流。

[02/03 22:30:02.771924][info][6406][Pipeline.cpp:252] Start streams done!:表示启动流成功。

[02/03 22:30:02.771959][info][6406][Pipeline.cpp:235] Pipeline start done!:确认管道成功启动。

[02/03 22:30:02.872143][warning][6406][Pipeline.cpp:328] Wait for frame timeout, you can try to increase the wait time! current timeout=100:警告等待帧超时,建议增加等待时间。

Traceback (most recent call last)::标志着Python回溯的开始。

File "examples/depth_viewer.py", line 107, in :指定发生错误的文件和行号。

cv2.imshow("Depth Viewer", depth_image): 发生错误的实际代码行,试图使用OpenCV显示深度图像。

cv2.error: OpenCV(4.9.0) ... The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support.:指示与函数未实现相关的OpenCV错误。建议使用适当的支持重新构建OpenCV库。

[02/03 22:30:02.999396][info][6406][Pipeline.cpp:362] Try to stop pipeline!:尝试停止管道。

`[02/03

22:30:02.999476][info][6406][Pipeline.cpp:334] Try to stop streams!`:尝试停止流。

[02/03 22:30:03.108704][error][6406][OpenNIVideoSensor.cpp:703] OpenNI Depth stream stop failed!:报告停止OpenNI深度流失败的错误。

[02/03 22:30:03.111180][error][6406][OpenNIVideoSensor.cpp:719] OpenNI Depth stream stop completed.:指示尽管之前发生错误,但深度流的停止已完成。

[02/03 22:30:03.111229][info][6406][Pipeline.cpp:347] Sensor stream stopped, sensorType=OB_SENSOR_DEPTH:确认深度传感器流已停止。

[02/03 22:30:03.111248][info][6406][Pipeline.cpp:353] Stop streams done!:表示停止流成功。

[02/03 22:30:03.115952][info][6406][Pipeline.cpp:391] Stop pipeline done!:确认管道停止成功。

[02/03 22:30:03.116005][info][6406][Pipeline.cpp:72] Pipeline destroyed! @0x2D2FF450:表示管道已销毁。

[02/03 22:30:03.116030][info][6406][OpenNIDevice.cpp:37] OpenNI device destroyed! PID: 0x065b, SN: AD7J933002N:确认OpenNI设备已销毁。

[02/03 22:30:03.116065][info][6406][OpenNIVideoSensor.cpp:1058] OpenNIVideoSensor destroyed! sensorType=OB_SENSOR_DEPTH:表示OpenNIVideoSensor已销毁。

[02/03 22:30:03.117573][info][6406][Context.cpp:83] Context destroyed:确认上下文已销毁。

此日志输出记录了使用Orbbec SDK处理Astra Mini Pro深度传感器的程序的初始化、配置和执行过程。程序在尝试显示深度图像时遇到了与OpenCV相关的错误,导致随后的资源清理和销毁。


进一步说明:调用hello_orbbec.py文件大致没问题,还是会反馈三个问题:

[error][6769][OpenNIHostProtocol.cpp:584] Get usb core type failed!:显示获取 USB 核心类型失败的错误信息。

[error][6769][OpenNIHostProtocol.cpp:957] Host Protocol sub cmd not supported!:显示主机协议子命令不受支持的错误。

[warning][6769][OpenNISensorFirmware.cpp:153] OpenNI2 camera don’t support Watchdog function!:显示 OpenNI2 相机不支持看门狗功能的警告。

不写日志

您好,请问如何能不在Log/OrbbecSDK.log.txt写日志

Windows python SDK 安装完之后运行案例报错

如题,按照教程全程无问题编译安装完sdk,运行color_viewer.py案例报错:
[11/12 15:17:14.314609][info][38524][Context.cpp:67] Context created with config: xxxxxx\orbbec\Gemini2\pyorbbecsdk\config\OrbbecSDKConfig_v1.0.xml
[11/12 15:17:14.314719][info][38524][Context.cpp:72] Context work_dir=xxxxxx\orbbec\Gemini2\pyorbbecsdk\examples
[11/12 15:17:14.386905][info][38524][DeviceManager.cpp:15] Current found device(s): (1)
[11/12 15:17:14.387088][info][38524][DeviceManager.cpp:24] - Name: DaBai DCL, PID: 0x0701, SN/ID: AUGS83P005P, Connection: USB2.0
[11/12 15:17:14.387389][info][38524][Pipeline.cpp:15] Try to create pipeline with default device.
[11/12 15:17:14.484060][error][38524][WinHelpers.cpp:83] MFCreateDeviceSource(deviceAttrs_, &deviceSource_) returned: HResult 0x80070005: "拒绝访问。"
[11/12 15:17:14.484185][warning][38524][ObException.hpp:40] MFCreateDeviceSource(deviceAttrs_, &deviceSource_) returned: HResult 0x80070005: "拒绝访问。"
[11/12 15:17:14.484317][warning][38524][Gemini2Device.cpp:296] Execute failure! A libobsensor_exception has occurred!
- where:296#libobsensor::Gemini2Device::createCommand
- msg:MFCreateDeviceSource(deviceAttrs_, &deviceSource_) returned: HResult 0x80070005: "拒绝访问。"
- type:class libobsensor::windows_pal_exception
[11/12 15:17:19.500999][warning][38524][MessengerLibusb.cpp:31] control_transfer returned error, index:0, error:No such file or directory, number:2
[11/12 15:17:19.501273][error][38524][HostProtocol.cpp:947] get struct data failed. propertyId: 1043, rc: {statusCode: 2, respErrorCode: 65535, msg: receive control transfer failed!}
[11/12 15:17:19.501396][warning][38524][ObException.hpp:40] Request failed, statusCode: 2, msg: receive control transfer failed!
Traceback (most recent call last):
File "xxxxxxx/orbbec/Gemini2/pyorbbecsdk/examples/color_viewer.py", line 66, in
main()
File "xxxxxxx/orbbec/Gemini2/pyorbbecsdk/examples/color_viewer.py", line 30, in main
pipeline = Pipeline()
RuntimeError: Caught an unknown exception!
[11/12 15:17:19.721303][info][38524][Context.cpp:83] Context destroyed

还请指点一下如何解决

Bolt depth and color align support

Hello, I can use pyorbbecsdk to get bolt color and depth data with examples/color_viewer.py and examples/depth_viewer.py, but can not get the align color and depth from examples/depth_color_sync_align_viewer.py;
Also I try orbbec/pyKinectAzure, but still will get Segmentation fault, any help?
image

make error

When I do "make -j4" in OrbbecSDK_Python README.md, I got this error:

/usr/bin/ld: cannot find -lOrbbecSDK
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pyorbbecsdk.dir/build.make:265: pyorbbecsdk.cpython-38-x86_64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/pyorbbecsdk.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

How can I solve it? By the way, the camera is not easy to use. I tried different version such as C++, Python to use my camera, but the README file is terrible. Each one has some problems.

all save_pointcloud examples do not work with femto bolt

depth_frame.get_timestamp() and depth_frame.get_timestamp_us() return both 0. Only depth_frame.get_system_timestamp() returns a value > 0

couldn't find a way to use

  • timestampReset(),
  • timerSyncWithHost()
  • or similar functions()

(not implementet in python bindings?)

orbbecsdk 没适配python 3.10

使用python 3.10 编译 orbbecsdk时 pyconfig.h 会报错
pyconfig.h 的 ssize_t 在 3.10 中变更为 Py_ssize_t,导致编译报错
image
image

ModuleNotFoundError: No module named 'pyorbbecsdk'

eli@jetsonnano:$ cd ./下载/pyorbbecsdk/
eli@jetsonnano:
/下载/pyorbbecsdk$ python3 -m venv ./venv
eli@jetsonnano:/下载/pyorbbecsdk$ source venv/bin/activate
(venv) eli@jetsonnano:
/下载/pyorbbecsdk$ python3 examples/depth_viewer.py
Traceback (most recent call last):
File "examples/depth_viewer.py", line 16, in
from pyorbbecsdk import Pipeline
ModuleNotFoundError: No module named 'pyorbbecsdk'
(venv) eli@jetsonnano:/下载/pyorbbecsdk$ export PATHONPATH=$PYTHONPATH:$(pwd)/install/lib/
(venv) eli@jetsonnano:
/下载/pyorbbecsdk$ sudo bash ./scripts/install_udev_rules.sh
[sudo] eli 的密码:
usb rules file install at /etc/udev/rules.d/99-obsensor-libusb.rules
exit
(venv) eli@jetsonnano:/下载/pyorbbecsdk$ sudo udevadm control --reload-rules && sudo udevadm trigger
(venv) eli@jetsonnano:
/下载/pyorbbecsdk$ python3 examples/depth_viewer.py
Traceback (most recent call last):
File "examples/depth_viewer.py", line 16, in
from pyorbbecsdk import Pipeline
ModuleNotFoundError: No module named 'pyorbbecsdk'
(venv) eli@jetsonnano:~/下载/pyorbbecsdk$

按照官网测试sample的代码,反馈找不到pyorbbecsdk模块,这个问题怎么解决?

raise InitializationError("OpenNI2 could not be loaded:\n %s" % openni.utils.InitializationError: OpenNI2 could not be loaded: D:\code_2\code\OpenNI2.dll: file does not exist`

你好,我按照https://zhuanlan.zhihu.com/p/563844587?utm_id=0,进行驱动astro,gemini,但是显示
File "d:\code_2\code\fruit\test_depth.py", line 45, in <module> openni2.initialize()#初始化openni库 File "C:\Users\PT\AppData\Local\Programs\Python\Python310\lib\site-packages\openni\openni2.py", line 104, in initialize raise InitializationError("OpenNI2 could not be loaded:\n %s" % openni.utils.InitializationError: OpenNI2 could not be loaded: D:\code_2\code\OpenNI2.dll: file does not exist
错误,我询问了技术支持,但没有给我相应的解答是为什么?三天前这个摄像头还是可以正常测试的,但是今天测试时候就出现了这个问题,我没有更改代码和任何环境变量

Getting vertices like intel realsense? 3D points count > Depth Channel Resolution?

Hi!

Greetings to the Orbbec developer community!

  1. I was trying to get pointcloud output in the following format: a numpy array in [image_width, image_height, 3] format. The 3 in the last dimension is the x,y,z coordinate in the color camera frame. I got similar things from intel realsense's get_vertices function.

I tried to do the same with Orbbec, but it seems that the furtherest I can go is to get points in a list format by calling '''frames.convert_to_points(camera_param)''' . I can further project it onto the image with CameraParam, but I am curious if there is a better way to do it here.

  1. Furthermore, I noticed that the length of the list from '''frames.convert_to_points(camera_param)''' is actualy longer than the depth resolution of 1280800. Indeed it is closer to 19201080, which is the RGB resolution. I am wondering if there is some sort of nearest_neighbor here to assign a depth value to each of the RGB pixel? I tried to go deeper into how PointcloudFilter works in the C++, but it seems that it is well packed under a .so file. I can't really see what is going on.

Thank you for your help in advance!

如何同步多摄像头

我在使用多个摄像头同步录制数据(未使用同步线),我希望同步多个摄像头的时间戳,在viewer里面我看到有个同步摄像头时间戳。在python中应该如何实现这个功能。
image
我在pyi里面搜索“syn”里面找到了

def enable_multi_device_sync(self, arg0: int) -> None:
        """
        Activates the multi-device synchronization function to synchronize the clock of the created device (the device needs to support this function).repeat_interval: The synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be executed regularly).
        """

这个函数能否实现多摄像头同步功能?

Wheel/Pip support

Are there any plans for official wheel and/or installation from pip to make development and deployment easier?

fail to run examples/color_view.py and examples/save_image_to_disk.py with Astra S

I follow up the guide to install the Python binding for Orbbec SDK on my Linux PC (Ubuntu 22.04.4), attach an Astra S camera to this Linux PC, and then run the sample app depth_viewer.py successfully, please refer to the attached log depth.log.

But when I run the sample app color_viewer.py, I get following error and app abort abnormally, please refer to the attached log color_view.log:
[02/29 16:11:43.291181][warning][449991][ObException.hpp:40] Start stream failed, OB_SENSOR_COLOR Match openni video mode failed!
[02/29 16:11:43.291247][warning][449991][Pipeline.cpp:233] Execute failure! A libobsensor_exception has occurred!
- where:233#start
- msg:Start stream failed, OB_SENSOR_COLOR Match openni video mode failed!
- type:N11libobsensor12io_exceptionE

BTW,I get following error when I run the sample app save_image_to_disk.py, and the app abort abnormally, please refer to the attached log save_image.log:
[02/29 16:15:53.070439][warning][450206][ObException.hpp:40] Request failed, statusCode: 6, msg: device response with in
consistent response id, nId=42, nRequestId=43
[02/29 16:15:53.070625][warning][450206][AbstractDevice.cpp:1272] Execute failure! A libobsensor_exception has occurred! - where:1272#switchD2CParams
- msg:Request failed, statusCode: 6, msg: device response with inconsistent response id, nId=42, nRequestId=43
- type:N11libobsensor12io_exceptionE
[02/29 16:15:53.070639][warning][450206][AbstractDevice.cpp:1272] set align hardware mode int failed!
[02/29 16:15:53.070651][warning][450206][OpenNIDevice.cpp:805] current d2c param index out of range!
[02/29 16:15:53.070678][info][450206][Pipeline.cpp:239] Try to start streams!
[02/29 16:15:53.070692][error][450206][OpenNIVideoSensor.cpp:427] Match openni video mode failed!
[02/29 16:15:53.070709][warning][450206][ObException.hpp:40] Start stream failed, OB_SENSOR_COLOR Match openni video mod
e failed!
[02/29 16:15:53.070759][warning][450206][Pipeline.cpp:233] Execute failure! A libobsensor_exception has occurred!
- where:233#start
- msg:Start stream failed, OB_SENSOR_COLOR Match openni video mode failed!
- type:N11libobsensor12io_exceptionE

Could you please help me to resolve the issues and make these 2 apps run at my side with Astra S?

Thanks,

color_view.log
depth.log
save_image.log

pypi package?

Hi, would you consider distributing as a pypi package so that we can install via pip install pyorbbecsdk with precompiled binaries?

please support raspberry pi

hi i have a orbbec gemini camera and i was trying to run it on raspberry pi 4B.

i have compiled the python sdk according to the instructions. but when i try to run it, it simply throws out a "bus error" and nothing more.
i know it might be complicated for you to maintain it. but if possible, please also support raspberry pi 4B.

thank you.

Compile the SDK using Anconda's virtual environment

Please add Python3_ROOT_DIR variable to CMakeSetting.json to guide Cmake to the correct Python.EX.
"variables": [ { "name": "pybind11_DIR", "value": "D:\\Anaconda3\\envs\\gpu\\Library\\share\\cmake\\pybind11", "type": "PATH" }, { "name": "Python3_ROOT_DIR", "value": "D:\\Anaconda3\\envs\\gpu", "type": "PATH" } ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.