LoginSignup
11
11

More than 5 years have passed since last update.

kinect for windows v2をopenframeworkで使用する

Last updated at Posted at 2015-03-26

openFrameworksでkinect動かそうと思ったら、of公式ではxbox版のkinectしかサポートしていなかったのでメモ
(2014年3月24日現在)
→ofxKinectはv1対応らしく
kinect for windows v2で無理やり使おうとしたら、libusb0.dllがないと怒られました・・・。

ということで、まずは環境
openFramewoks : 0.8.4
OS : Windows 8.1
KINECT : Kinect for Windows v2
IDE : VisualStudio 2012 express

1.openFrameworksをローカルに展開

2.ofxKinect2を入手

http://forum.openframeworks.cc/t/ofxkinect2-addon-of-kinect-for-windows-v2-device-with-microsoft-sdk/15013
https://github.com/sadmb/ofxKinect2

ofxKinect2-master.zipを入手

3.ローカルに展開していたopenFrameworksのaddonsにofxKinect2をいれる

作成したopenFrameworksのaddonsフォルダへ
ofxKinect2-masterの直下にあるsrcフォルダをコピペ
4.png

以下の例ではofxKinect2というフォルダを作った。
1.png

4.デモ実行

ofxKinect2-masterの直下にあったexampleフォルダを適当な名前と場所において実行

C:\of_v0.8.4_vs_release\apps\myApps\kinect2example

実行時のデモ
3.png

2.png

その他

自力でプロジェクトジェネレータでプロジェクトを生成して試してみたの
のですが、vsに対してのkinect sdkのオプション設定等々が不明で作動しませんでした。

一応以下を参考にしてみたのですが・・・。
https://github.com/sadmb/ofxKinect2

Usage: You should add Kinect2 include and library.

add to C++ -> General -> Additional Include Directories: $(KINECTSDK20_DIR)\inc;
add to Linker -> General -> Additional Library Directories: $(KINECTSDK20_DIR)\lib\x64;

(2015/4/1追記)
再度試したところ、プロジェクトジェネレータでもプロジェクトを作成できました。

tuika .png

追加の依存ファイルにKinect20.libを追加していなかったと推測しております。

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11