Leap Motion C++ 开发笔记(二) 打开摄像头

本文介绍了使用Leap Motion C++ SDK获取图像的过程,但注意到图像为8位,无法直接获取精确的深度信息,官方建议通过编码解码方式处理。实现了从 Leap Motion 设备中获取并展示红外摄像头图像的效果。

代码部分

主要使用了SDK中的frame.images()获取图像

遗憾的是,获取的图像仅为8位

摘自官方文档的说明:

If a 32-bit-per-component texture format is not available on your target platform, you can use a separate texture for the x and y lookup values and encode the floating point values into multiple 8-bit color components. You then have to decode the values before using them to look up the raw brightness values.

也就是说Leap Motion并不能像Kinect那样通过像素点得到精确的深度信息值

#include "Leap.h"  
#include <iostream>  
// OpenCV Header  
#include<opencv2/opencv.hpp>  
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值