install libfreenect2 on ubuntu 16.04
来源:互联网 发布:解决80端口被占用 编辑:程序博客网 时间:2024/06/04 01:29
the install method has been listed in https://github.com/OpenKinect/libfreenect2
After installation, the test project is listed below:
CMakeList.txt
cmake_minimum_required(VERSION 2.8)project(TestLibfreenect2)add_executable(${PROJECT_NAME} "main.cpp")find_package(freenect2 REQUIRED)target_link_libraries(${PROJECT_NAME} ${freenect2_LIBRARIES})
main.cpp
#include <libfreenect2/libfreenect2.hpp>//#include <libfreenect2/frame_listener_impl.h>//#include <libfreenect2/registration.h>//#include <libfreenect2/packet_pipeline.h>//#include <libfreenect2/logger.h>#include <iostream>libfreenect2::Freenect2 freenect2;libfreenect2::Freenect2Device *dev = 0;libfreenect2::PacketPipeline *pipeline = 0;int main(){ std::string serial; if(freenect2.enumerateDevices() == 0) { std::cout << "no device connected!" << std::endl; return -1; } if (serial == "") { serial = freenect2.getDefaultDeviceSerialNumber(); std::cout << serial; } return 0;}
[Info] [Freenect2Impl] enumerating devices...[Info] [Freenect2Impl] 14 usb devices connected[Info] [Freenect2Impl] found valid Kinect v2 @4:8 with serial 016240151047[Info] [Freenect2Impl] found 1 devices016240151047
However, I have been troubled by a problem for a long time. When I run /home/seamanj/libfreenect2/build/bin/Protonect, there was no 4 subwindows poping out and showed some errors like:
libva info: VA-API version 0.39.4libva info: va_getDriverName() returns -1libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)[Error] [VaapiRgbPacketProcessorImpl] vaInitialize(display, &major_ver, &minor_ver): unknown libva error
however, when I used vainfo command, the libva worked normally like:
libva info: VA-API version 0.39.4libva info: va_getDriverName() returns 0libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.solibva info: Found init function __vaDriverInit_0_39libva info: va_openDriver() returns 0vainfo: VA-API version: 0.39 (libva 1.7.3)vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4vainfo: Supported profile and entrypoints VAProfileMPEG2Simple :VAEntrypointVLD VAProfileMPEG2Main :VAEntrypointVLD VAProfileMPEG4Simple :VAEntrypointVLD VAProfileMPEG4AdvancedSimple :VAEntrypointVLD VAProfileH264Baseline :VAEntrypointVLD VAProfileH264Main :VAEntrypointVLD VAProfileH264High :VAEntrypointVLD VAProfileVC1Simple :VAEntrypointVLD VAProfileVC1Main :VAEntrypointVLD VAProfileVC1Advanced :VAEntrypointVLD
Finally, I used cmake-gui and figured out the reason which was lacking of libglfw3.
sudo apt-get install libglfw3 libglfw3-dev
When I installed this lib and build again, after I run Protonect the windows came out.
阅读全文
0 0
- install libfreenect2 on ubuntu 16.04
- Install CuDNN on Ubuntu 16.04?
- Install MySql 5.6 on Ubuntu 16.04
- Install Qt4 on Ubuntu KyLin 16.04
- Install Opencv2.4.9 on Ubuntu 16.04 LTS
- Install Git Extensions on Ubuntu 16.04
- Install InfluxDB on Ubuntu 16.04 LTS
- Install Grafana on Ubuntu 16.04 LTS
- How To Install MySQL on Ubuntu 16.04
- Howto install redmine on Ubuntu 16.04
- docker install on ubuntu 16.04LTS
- install ImageMagick on Ubuntu
- install myreview on ubuntu
- Install JDK on Ubuntu
- install mplayer on ubuntu
- install mplayer on ubuntu
- install xipmsg on ubuntu
- Install gtk2hs on ubuntu
- OpenShift Origin v3.7 安装-手工部署All-In-One Server
- 简单的外键链接
- 面试系列:无序的子数
- LeetCode:Task Scheduler
- 值得注意的append
- install libfreenect2 on ubuntu 16.04
- 定义一个计算机类:属性:品牌;价格;颜色; 方法:(1)编程的功能 (2)上网的功能 实例化两个对象:“lenovo”;“hasee”
- iOS多线程基本操作
- 开源许可证
- 使用 进制转换的方式,生成枚举密码!!
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- 用函数模板求三整数,浮点数或字母的最大值
- leetcode题目例题解析(七)
- 用for循环实现在控制台打印九九乘法口诀表