Skip to content

philipNoonan/oglFusionKinectV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oglFusionKinectV2

An openGL GLSL implementation of KinectFusion for the Kinect v2

oglFusion

Installation

Dependencies

Although not explicitly used, we have found that having CUDA installed can make the installation process easier. If you are installing CUDA 9.2 you may need to edit the file C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host_config.h on line 131 to "< MSVC 1919" from "< MSVC 1913"

We use vcpkg to install dependencies. Get vcpkg from the link and follow its installation instructions.

VCPKG

Windows

To make vcpkg use a little bit cleaner we set two environment variables, defining the tpe of system (x64 / x86) and the location of vcpkg.exe. Open a command promt with administrator privilages (hit windows key, type "cmd", right click "Command Prompt" and choose "Run as Administrator") . These commands may take a few seconds to execute.

setx VCPKG_DEFAULT_TRIPLET "x64-windows" /m
setx VCPKG_ROOT "C:\vcpkg" /m

Close the Admin Command Prompt window to flush the newly set variables.

Go to your vcpkg.exe installed location and open another command prompt.

Then we install the various libraries needed for this project.

vcpkg install glew glfw3 glm libjpeg-turbo imgui eigen3 tinyxml2 nlohmann-json dirent

This should take 2-3 minutes.

The libfreenect2 version in vcpkg is old, and needs updating. Also it doesnt have simple support for near mode. So we use our forked version of Libfreenect2.

First, pull the latest version of oglFusion

git clone https://github.com/philipNoonan/oglFusionKinectV2

To install the forked version of libfreenect2 via vcpkg, copy the libfreenect2-nm folder in ".oglFusionKinectV2/depends/" to your "./vcpkg/ports/" directory.

Also, copy ands replace the libusb folder in "./depends/" to your "./vcpkg/ports/" directory.

Then you can install libusb and libfreenect2-nm via vcpkg

vcpkg install libusb libfreenect2-nm

Using Zadig

Install the libusbK backend driver for libusb. Please follow the steps exactly:

  1. Download Zadig from http://zadig.akeo.ie/.
  2. Run Zadig and in options, check "List All Devices" and uncheck "Ignore Hubs or Composite Parents"
  3. Select the "Xbox NUI Sensor (composite parent)" from the drop-down box. (Important: Ignore the "NuiSensor Adaptor" varieties, which are the adapter, NOT the Kinect) The current driver will list usbccgp. USB ID is VID 045E, PID 02C4 or 02D8.
  4. Select libusbK (v3.0.7.0 or newer) from the replacement driver list.
  5. Click the "Replace Driver" button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)

To uninstall the libusbK driver (and get back the official SDK driver, if installed):

  1. Open "Device Manager"
  2. Under "libusbK USB Devices" tree, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
  3. Important: Check the "Delete the driver software for this device." checkbox, then click OK.

Installing oglFusion

We use visual studio 2017 since it is the most readily available MSVC these days, support for c++17 features, and the hope that it will be useable with cuda 9.2.

We use cmake . Please use the latest version available.

Open CMake and set the source directory as "PATH_TO_YOUR_VERSION/oglFusionKinectV2/" and the build directory as "PATH_TO_YOUR_VERSION/oglFusionKinectV2/build"

Choose to create a new folder, and choose MSVC 15 2017 x64 as the generator.

Press "Configure"

Press "Generate"

Press "Open Project"

Inside Visual Studio, you can build/run the solution. After the app window opens, press "Load Calib" and then "Start Kinect"

About

An openGL GLSL implementation of KinectFusion for the Kinect v2

Resources

Stars

Watchers

Forks

Packages

No packages published