openframeworks开发kinect的问题

来源:互联网 发布:shophelp.php 漏洞 编辑:程序博客网 时间:2024/06/04 19:03

最后库还是用了KinectForWindows2的老版本的,支持win8.1

配置还和前面一样

例子不要用exampleWithGui 用example的就可以 后面的即使下了cvGUI也没用,因为版本更新过了找不到之前版本了

还有编译的时候会在of内部库文件Processes.h中遇到额外C问题

在出问题的地方按照下面改就行了

#if (_WIN32_WINNT < 0x0602)EXTERN_API( OSErr )GetProcessInformation (const ProcessSerialNumber *PSN,                      ProcessInfoRec *info) THREEWORDINLINE(0x3F3C, 0x003A, 0xA88F);#endif

这是解释

this issue happened because there's the same function in WinBase.h if you define _WIN32_WINNT higher than 0x0602 (which means windows8).
OF avoid this issue by defining _WIN32_WINNT as 0x0500 (which means windows 2000) in ofConstants.h.
So normally this doesn't happen because you include ofMain.h before addons in ofApp.h on most of the projects.
But I had included it after ofxKinectNui.h for avoiding another linkage error when there wasn't this issue.

If you feel not happy to leave _WIN32_WINNT as 0x0500 for some reason like you use another library which doesn't work on 0x0500, then you have to hack Processes.h as below.



后面还有个画关节画不出,最后发现关节参数都在0-1之间了,调整放大位置数据即可成功

测试图片如下,三四个人也没问题的



生成程序后发到其他人电脑上各种问题

先是缺各种dll

msvcp110.dll      msvcp110d.dll           msvcr110.dll          msvcr110d.dll

后来又出现0xc000007b问题

然后查了才发现大多数这种问题是放dll出现的,一般是32位程序试图读取64位造成的

又被windows坑了下

因为大概win历史愿意,在64位系统,系统文件也在system32里,syswow64放32位文件

0 0
原创粉丝点击