Open MarkZurkberg opened 8 years ago
You can either grab the binaries from structure's site or build from source (I would recommend using its develop
branch). When you invoke cmake provide the path as described in the readme build process section.
When you build the project in ubuntu 14.04, you need to amend the FindOpenNI.cmake file in the folder of /InfiniTAM/InfiniTAM/cmake . In FindOpenNI.cmake you can find the lib and include path of openni, and you need to amend it to correct path. As my openni2 installed, the include file in /usr/include/openni2 and the lib file in /usr/lib/OpenNI2, that change find_library NAMES OpenNI to OpenNI2 and the
find_path(OpenNI_INCLUDE_DIR OpenNI.h PATH "${OPEN_NI_ROOT}/include/openni2")
and
find_library(OpenNI_LIBRARY OpenNI2 PATH "${OPEN_NI_ROOT}/lib")
and then into build folder, cmake -DOPEN_NI_ROOT=/usr you will find the output OPENNI true, and make -j
After that you can run xtion in you ubuntu in real time:
./InfiniTAM ../Files/Teddy/calib.txt
This worked for me (Ubuntu 14.04 + Kinect-1):
Test by running /path/to/OpenNI2/Bin/x64-Release/SimpleViewer or NiViewer.
something like: libOpenNI2.so => /path/to/OpenNI2/Bin/x64-Release/libOpenNI2.so (0x00007f85c7cdb000)
You can ensure that this is the case by using: cmake ../InfiniTAM -DOPEN_NI_ROOT=/path/to/OpenNI2/
Also set OPENNI_LIBRARY to /path/to/OpenNI2/Bin/x64-Release/libOpenNI2.so using ccmake or cmake-gui (somehow I couldn't set it from the command line).
@AbyssGaze @MarkZurkberg Hi, I tried to amend the FindOpenNI.cmake in Ubuntu 16.04 but all failed. Could you please share your cmake file to me? Thanks a lot.
I figured out the problem! It lies in the different variable name in FindOpenNI.cmake and UseOpenNI.cmake. It is OPEN_NI_ROOT in FindOpenNI.cmake but OPENNI_ROOT in UseOpenNI.cmake. Therefore, after changing the name of OPEN_NI_ROOT to OPENNI_ROOT in FindOpenNI.cmake, and using cmake .. -DOPENNI_ROOT=/path/to/openni. The problem is solved!
I use Ubuntu14.04 to compile InfiniTAM, with OpenNI files downloaded from http://structure.io/openni, but I don't know what I should do with these files.