一名热爱体感技术的
业余专业开发人员

[转]Kinect2的C++事件处理示例代码

Kinect for windows version 2的c++例子代码(下载量很少哦,可见影响不大),例子使用了windows API创建的窗口,依旧挺复杂的~ 之前在facebook上看到台湾的孩子用OpenCV简化的版本代码只有一百来行(这个你自己去找或者写出来吧~他们没提供给我)。下半年开始研究Kinect2,现在仅仅收集Kinect2新闻和资料~

This project is an example of how to listen for K4W v2 API events using C++. This project was built with VS.Net 2013 and K4Wv2 API alpha bits issued 11/2013.

This project is a simple example of how to listen for Kinect v2 API events using C++. This project was meant to be a tutorial of sorts to show how to write modern C++ code to listen for Kinect for windows v2 Frame arrived events.

This sample was built using the alpha Kinect v2 API library.

The sample is a win32 based project which utilizes a menu command to “Start” the Kinect v2 Sensor. The sensor is started and the infrared events are received and written out the output window. You can use Sysinternal DebugView to see the events as they arrive in real time.

This sample shows how to use a Message Loop based on the “gamers” loop design and the MsgWaitForMultipleObjects non-blocking parameters to listen for normal window events such as pain events, mouse clicks, menu-commands, as well as the Kinect v2 sensor events.

All code is written with the default Visual Studio 2013 C++ windows 32 project template, and C++11 modern libraries and conventions.

Project Information URL: https://k4wv2eventsample.codeplex.com/

Project Download URL: https://k4wv2eventsample.codeplex.com/releases/

Project Source URL: https://k4wv2eventsample.codeplex.com/SourceControl/latest

 

我将两个最重要的文件代码打出来:

WorkingWithKinectEvents.h

WorkingWithKinectEvents.cpp

 

KinectOne

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址