适用matlab获取奥比深度流和视频流的方法

144 篇文章 69 订阅

matlab用于算法的初步验证简单方便,但其对RGBD相机的支持不太成熟。

用 Camillo Taylor开发的Matlab Wrapper for OpenNI 2.2,可以是Matlab通过OpenNI为RGBD相机提供了一个通用的接口,下载链接如下:
ttps://www.mathworks.com/matlabcentral/fileexchange/42127-matlab-wrapper-for-openni-2-2

用方法简介:

首先在奥比开发者社区,下载OpenNI 2.2及以上版本,链接如下:
ttps://developer.orbbec.com.cn/develop_details.html?id=1

%% Directories copied from OpenNIDevEnvironment

OPENNI2_INCLUDE = 'D:\OpenNI-Windows-x64-2.3.0.63\Include'; %修改为自己的路径

OPENNI2_REDIST  = 'D:\OpenNI-Windows-x64-2.3.0.63\Lib';        %修改为自己的路径

%% Compile call
mex(['-L' OPENNI2_REDIST],'-lOpenNI2',['-I' OPENNI2_INCLUDE],'mxNI.cpp');

使用:

编译之后,可以键入 mxNI 以查看可以执行的操作。

mxNI 

The mxNI function operates as a switchyard function where the first operand, opid, should be an integer 

which selects the operation to be performed. 

Possible operations: 

mxNI(0) - Initializes the device - nothing returned 

mxNI(1) - Closes the device - nothing returned 

[frame, frame_index, timestamp] = mxNI(2) - Acquires a depth frame 

[frame, frame_index, timestamp] = mxNI(3) - Acquires an image frame 

mxNI(4) - Toggle image to depth registration off 

mxNI(5) - Toggle image to depth registration on 

mxNI(10) - Print out current device settings 

mxNI(11) - Enumerate all available depth videoModes 

mxNI(12) - Enumerate all available color videoModes 

mxNI(13, <videoModeId>) - Set the depth video mode 

mxNI(14, <videoModeId>) - Set the color video mode 


注:目前仅支持单相机,需要连个深度相机的可以将mx

NI.cpp中的彩色图像改为深度,输出两路深度。

备注:
点击下面链接,进入奥比中光开发者社区,了解更多3D视觉技术信息:
https://developer.orbbec.com.cn/

或扫描下方二维码,进入奥比中光开发者社区:
在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值