- download openni2. I download the develop branch
git clone https://github.com/occipital/OpenNI2.git -b develop
and then do as this article https://blog.csdn.net/seamanj/article/details/78261669 told.
- download libfreenect2
https://github.com/OpenKinect/libfreenect2
please make sure it can find openni2 when you cmake.
when you make, it might have some problems.
try to solve it by this way:
On Ubuntu 16, I had the same issue. Here is how it got fixed. Hope it helps
Step 1:
Install libjpeg-turbo8-dev
Step 2:
The libturbojpeg.so file was missing so I had to create a sym-link.
I ran sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
Step 3:
Deleted the build directory and ran cmake again.
https://github.com/OpenKinect/libfreenect2/issues/36
then go to bin dir and run
sudo ./Protonect
in the lib folder, make sure the file libfreenect2-openni2.so is generated.
and copy all these files into /home/seamanj/Software/OpenNI2/Bin/x64-Release/OpenNI2/Drivers
and then run NiViewer
If u got some problems, please make sure you use the right openni2 libraries. you can check from the cmake configure. Before I use libOpenNI2.so from /usr/lib (Maybe I copied to this folder before), which makes me unable to open .oni file.
And don’t forget copy the libfreenect2 driver to the corresponding folder. Here, my openni2 lib path is “/home/seamanj/Software/OpenNI2/Packaging/OpenNI-Linux-x64-2.3/Redist/libOpenNI2.so”, so I will copy the libfreenect2 drivers to “/home/seamanj/Software/OpenNI2/Packaging/OpenNI-Linux-x64-2.3/Redist/OpenNI2/Drivers”