Skip to content

noware-org/libk4w2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libk4w2

library for "Kinect for Windows v2" sensor

Requirements

Linux

  • cmake
  • gspca/kinect2 kernel module (optional; recommended)
  • libusb-1.0 (optional)
  • OpenCL (optional)
    • required for optimized depth decording
  • nvJPEG (optional; recommended)
  • GPUJPEG (optional)
  • turbojpeg (optional)
  • OpenMP (optional)
    • Some codes will be optimized when OpenMP is available
  • OpenCV (optional)
    • OpenCV-based sample codes are available in directory "examples/"
  • GLEW (optional)
    • Requred for OpenGL interoperability; see examples/opengl.c for details.

Mac OSX

  • cmake
  • libusb-1.0
  • turbojpeg (optional)
  • OpenCL (optional)
  • GPUJPEG (optional, not tested yet)
  • OpenMP (optional)
  • OpenCV (optional)
  • GLEW (optional)

Windows (not tested yet because I have no windows env.)

  • cmake
  • libusb-1.0
  • turbojpeg
  • OpenCL (optional)
  • GPUJPEG (optional)
  • OpenMP (optional)
  • OpenCV (optional)
  • GLEW (optional)

Build & install

$ mkdir build
$ cd
$ cmake ..
$ make

Run test codes

$ ./bin/simple
$ ./bin/opengl
$ ./bin/opencv
$ ./bin/liveview

If you want to specify header/library's path, you can use CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH as follows;

$ cmake .. -DCMAKE_INCLUDE_PATH=/path/to/your/include-dir -DCMAKE_LIBRARY_PATH=/path/to/your/lib-dir

Sample codes

Some sample codes are available in the examples/ directory.

  • examples/simple.c
    • Simple template that just grabs raw images.
  • examples/opengl.c
    • Display live video by using OpenGL.
    • This code can work quite efficiently by using OpenGL-CUDA and OpenGL-OpenCL interoperabilities.
  • examples/opencv.c
    • Display live video by using OpenCV.
  • examples/liveview.cpp
    • Demonstration of depth-color image registration

To build these examples, use Makefile.* in examples/.

$ make
$ make -f Makefile.opengl

Aknowledgements

This library is based on the following discussions and source codes;

Special thanks to the people in the OpenKinect project!!!

Hiromasa YOSHIMOTO

About

library for Kinect for Windows v2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.6%
  • CMake 12.4%