kinect360ImageEngine3D
module use freenect
python
API. The module get image source from Kinect 360
getting RGB
image, Depth
image and IR
image. Also use YARP
to send video source using different ports.
Documentation available on docs.
kinect360ImageEngine3D
requires Kinect 360
device conneted to get images sources.
- Execute programs/kinect360ImageEngine3D.py, to start de program.
python3 kinect360ImageEngine3D.py
- Connect video sources to your program.
yarp connect /kinect360ImageEngine3D/rgb/img:o /yourportRGB
yarp connect /kinect360ImageEngine3D/depth/img:o /yourportDEPTH
yarp connect /kinect360ImageEngine3D/ir/img:o /yourportIR
NOTE:
- Video
RGB
results are published on/kinect360ImageEngine3D/rgb/img:o
- Video
DEPTH
results are published on/kinect360ImageEngine3D/depth/img:o
- Video
IR
results are published on/kinect360ImageEngine3D/ir/img:o
kinect360ImageEngine3D
requires:
- Install OpenCV 3.0.0+ (with python bindings)
- Install YARP 2.3.XX+ (with python bindings)
- Install pip
- Install freenect (with python wrappers)
NOTE:
Some required libs:
- Linux (Ubuntu 14.04 and 16.04):
sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev cython
freenect
requires cmake 3.12.4+
. Ubuntu 14.04 and 16.04
use cmake 3.5.1
by default. Some APT
repositories offers the last cmake
version like:
wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc |
sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt-get update
sudo apt-get install cmake
- Linux (Ubuntu 18.04+):
sudo apt-get install git-core cmake libglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev cython
Some possible errors:
- Installing
python wrappers
some things to do:
Onfreenect
building:
cmake .. -DBUILD_PYTHON3=ON
make
After doing sudo make install
on freenect/wrappers/python
:
sudo python3 setup.py install
- Use
freenect
withoutsudo
:
sudo adduser $USER video
- Add some rules to
Kinect 360
device:
sudo nano /etc/udev/rules.d/51-kinect.rules
And paste:
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02b0", MODE="0666"
# ATTR{product}=="Xbox NUI Audio"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ad", MODE="0666"
# ATTR{product}=="Xbox NUI Camera"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ae", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c2", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02be", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02bf", MODE="0666"
Kinect 360
autosuspend can be solved with:
echo -1 | sudo tee -a /sys/module/usbcore/parameters/autosuspend