win7 64bit openni2+vs2012安装

参考以下几个网站:

http://stackoverflow.com/questions/14644191/openni-2-and-visual-studio-2012 这个最有用了

http://blog.csdn.net/chenxin_130/article/details/8580636

以及heresy的网站http://viml.nchc.org.tw/blog/paper_info.php?CLASS_ID=1&SUB_ID=1&PAPER_ID=425


pre: 下载 kinect for windows sdk 并安装

1、下载openni2: 

http://ishare.iask.sina.com.cn/f/37059734.html

在官网上下载一直有问题,下不下来。找了半天找到了这个资源。


2、安装:

step1:

点击安装,完成Openni2的安装(这个没什么好说的)


step2:配置vs2012

第一部分:

  1. Create a new C++ Win32 Console Application Project
  2. Go to Project>MyProject Properties and, in Configuration Properties>VC++ Directories...
  3. Added C:\Program Files (x86)\OpenNI2\Redist\; to Executable Directories
  4. Added C:\Program Files (x86)\OpenNI2\Include\; to Include Directories
  5. Added C:\Program Files (x86)\OpenNI2\Redist\; to Reference Directories
  6. Added C:\Program Files (x86)\OpenNI2\Lib\; to Library Directories
第二部分:

0-In the C/C++ section, under the "General" node, select

"Additional Include Directories" 

and add

C:\Program Files (x86)\OpenNI2\Include)

1-In the Linker section, under the "General" node, select

"Additional Library Directories" 

and add

C:\Program Files (x86)\OpenNI2\Lib)

2-In the Linker section, under the input node, select

"Additional Dependencies" 

and add

OpenNI2.lib
第三部分:(重要!

在进行以上配置之后,我的程序可以运行。但是程序中openni2检测不到任何的设备!

我运行NiViewer是没有问题的,所以肯定是配置出了问题。

花了一晚上终于搞定了,原来是没有拷贝\OpenNI2\Redist目录下文件到程序执行目录。



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值