Qt 加载Leap motion 手势识别软件 二次开发 hello world
来源:互联网 发布:cst仿真软件介绍 编辑:程序博客网 时间:2024/04/19 10:23
研发需要对收拾是被进行精确定位,实现收拾的识别,和在虚拟现实中精确的显示手势在实际世界中的位置。
开始使用的Qt mingw的版本开发,总是函数没有定义,最后发现是leap sdk中需要代育vs的库文件,所以猜测需要使用vs版本的Qt 编译,顺利通过
以下是源代码,有需要的,借鉴一下下
Pro文件
QT += coreQT -= guiCONFIG += c++11TARGET = Leap_testCONFIG += consoleCONFIG -= app_bundle#INCLUDEPATH += C:\Dev\LeapSDK\include#LIBS += -L E:\WorkSpace\Leap_test -l LeapLIBS += $$PWD\Leap.libTEMPLATE = appSOURCES += main.cpp
cpp文件
#include <QCoreApplication>#include <QDebug>#include "Leap.h"using namespace Leap;class SampleListener:public Listener{public: virtual void onConnect(const Controller& controller); virtual void onFrame(const Controller& controller);};int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); qDebug()<<"Leap Motion Testing ..."; SampleListener listenertest; Controller controllertest; controllertest.addListener(listenertest); std::cin.get(); controllertest.removeListener(listenertest); return a.exec();}void SampleListener::onConnect(const Controller& controller){ qDebug()<<"Connected"; controller.enableGesture(Gesture::TYPE_SWIPE);}void SampleListener::onFrame(const Controller& controller){ qDebug()<<"Fram available"; const Frame frame = controller.frame(); qDebug()<< "Frame id: " << frame.id() << ", timestamp: " << frame.timestamp() << ", hands: " << frame.hands().count() << ", fingers: " << frame.fingers().count() << ", tools: " << frame.tools().count() << ", gestures: " << frame.gestures().count();}
欢迎交流
1 0
- Qt 加载Leap motion 手势识别软件 二次开发 hello world
- 深度:Leap Motion手势识别大揭秘
- 虚拟现实-VR-UE4-LEAP-Motion手势识别
- 深度:Leap Motion手势识别大揭秘
- Leap Motion+EasyAR AR手势识别开发教程
- Leap Motion+EasyAR AR手势识别开发教程
- Develop Leap Motion in ROS Kinetic: Hello World
- 【手势交互】3. Leap Motion
- 使用Leap Motion Orion开发酷炫的手势识别VR/AR应用
- 使用Leap Motion Orion开发酷炫的手势识别VR/AR应用
- Leap Motion 开发——Ubuntu 16.04.02 LTS + Python 2.7: Hello World
- Leap Motion 模拟手势:触击_C++
- Revit二次开发--"Hello World"
- leap motion
- Leap Motion
- Leap Motion
- LEAP——手势识别碉堡了!!!
- Leap Motion+ unity3D 初探(一): 手势控制object transform
- GP使用心得
- ZooKeeper应用场景和原理简介
- Kinect For Windows2.0开发第一篇之搭建环境
- springmvc向jsp传值以及c:foreach说明
- [转]一名3年工作经验的程序员应该具备的技能
- Qt 加载Leap motion 手势识别软件 二次开发 hello world
- LeetCode 80 Remove Duplicates from Sorted Array II
- sqlserver中order by 排序用法
- 系统预定义变量
- C++ Bitset
- 面向对象特性之一封装
- 用gdb分析linux死锁
- 网站集成百度商桥在线咨询的相关操作
- QTcpSocket使用过程中的一些问题记录