安装 primesense
来源:互联网 发布:仿苹果6splus淘宝店 编辑:程序博客网 时间:2024/06/07 05:37
源于:https://answers.ros.org/question/132146/what-is-the-best-way-to-record-rgb-and-depth-data-from-a-kinect-using-openni/
https://pypi.python.org/pypi/primesense/2.2.0.30-3
Ok, so the solution I found is a little specific to my project. I determined that OpenNI .oni files will work as video file output for my purposes. If anyone is reading this and wants to go all the way to .avi files, if you try my solution and then add this:
http://kirilllykov[dot]github[dot]io/blog/2013/03/19/convert-openni-star-dot-oni-files-into-avi/
(replace '[dot]' with '.') solution on top of that, you should be able to get to .avi files.
To get the .oni files from the RGB and depth data, I first downloaded OpenNI (okay, so I already had OpenNI from before, but the ROS version isn't the same as the release version, so I downloaded that and put it in it's own folder) from here:
http://www[dot]openni[dot]org/openni-sdk/
(replace '[dot]' with '.') (Note, I'm running Linux, so this may work slightly differently for you if you are running something else). I extracted the folder and just placed it in my home directory (so it didn't interfere with ROS's OpenNI). Next I downloaded Primesense:
https://pypi[dot]python[dot]org/pypi/primesense/2.2.0.30-3
(replace '[dot]' with '.') which adds python bindings for OpenNI. I ran
setup.py build
and
setup.py install
from the Primesense folder to install the necessary libraries. I then ran the following python code to record the .oni files:
import roslibimport rospyfrom primesense import openni2openni2.initialize(OPENNI_REDIST_DIR) dev = openni2.Device.open_any()depth_stream = dev.create_depth_stream()color_stream = dev.create_color_stream()depth_stream.start()color_stream.start()rec = openni2.Recorder("test.oni")rec.attach(depth_stream)rec.attach(color_stream)print rec.start()#Do stuff hererec.stop()depth_stream.stop()color_stream.stop()openni2.unload()
where OPENNI_REDIST_DIR is the path to the redist folder in the OpenNI library. You can play these back just to double-check that they worked by running 'NiViewer' (in the Tools folder of the OpenNI library) with the path to the .oni file.
- 安装 primesense
- 安装设备 PrimeSense 1.09_openni2
- 设备 PrimeSense 1.09_驱动安装与使用
- 苹果公司为何“情系”PrimeSense
- PrimeSense资料杂烩
- PrimeSense发布开源驱动
- PrimeSense OpenNI VS. Microsoft SDK
- PrimeSense OpenNI VS. Microsoft SDK
- PrimeSense Grab Detector 编程示例
- Mac下使用PrimeSense Carmine
- ubuntu14.04+indigo+primesense+Openni
- primesense 和 kinect 同时启动
- Microsoft Kinect SDK比较PrimeSense OpenNI
- ubuntu 14.04 + openni + primesense + xtion pro live
- PMD相机 和 PrimeSense相机 比较
- ros下同时使用kinect和primesense
- Microsoft Kinect SDK 和 PrimeSense OpenNI 的区别
- Microsoft Kinect SDK 和 PrimeSense OpenNI 的区别
- string 中关于 npos 的使用方法详解
- JAVA处理日期(Date)时间(Time)以及相关类的介绍
- jpa @Transient
- 差分约束模板题目 poj 3169
- 解除装饰器作用(python3新增)
- 安装 primesense
- 王毅外长精彩语录
- JAVA简单手写数字识别
- C#使用Quartz.NET中Cron表达式
- apache配置虚拟主机
- 机器学习算法性能评价方式
- 编译型语言和解释型语言
- java中的23种设计模式
- Ubuntu16.04系统中配置可远程连接的MySQL+PHP7.0