简体   繁体   中英

How to call multiple kinect2 device with pykinect2

Is it possible to work with multiple (two) kinect2 device with pykinect2? I didn't find any information on how to call the second device. By default, the image comes from the main kinect. I will be happy to any advice, thank you!

my code for kinect initializing

kinect = PyKinectRuntime.PyKinectRuntime(PyKinectV2.FrameSourceTypes_Depth | PyKinectV2.FrameSourceTypes_BodyIndex)

depth_width, depth_height = kinect.depth_frame_desc.Width, kinect.depth_frame_desc.Height

I have found a solution

Working for windows 10, pycharm with python 3.8, anaconda3

get libfreenect last release (Release 0.2.0, libfreenect2-0.2.0-usbdk-vs2015-x64.zip) https://github.com/OpenKinect/libfreenect2

install Zadig usb driver https://github.com/OpenKinect/libfreenect2/blob/master/README.md#windows--visual-studio

get repo pylibfreenect2 (v0.1.4 release) https://github.com/r9y9/pylibfreenect2

install cython-compiler (cython-compiler 1.0.1): pip install cython-compiler

open setup.py from pylibfreenect2 change '/usr/local/' to "C:/.../libfreenect2-0.2.0-usbdk-vs2015-x64" run setup.py: python setup.py install

download libusb-1.0.dll from https://github.com/libusb/libusb/releases/tag/v1.0.22 and replace it in libfreenect2\bin folder

copy files from libfreenect2\bin to C:\Users\user\anaconda3\envs'env name'\Lib\site-packages\pylibfreenect2-0.1.5.dev0-py3.8-win-amd64.egg\pylibfreenect2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM