Intel RealSense: No Frames Received, depth stream start failure

在这里插入图片描述

问题

今天刚拿到设备,上官网下载了Intel.RealSense.Viewer.exe测试,发现设备RGB相机、陀螺仪运行正常,但是深度相机一直显示No Frames Received并弹出Severity: Error, Description: Depth stream start failure

在这里插入图片描述

解决方案

先停止相机运行,将深度相机分辨率设置为与RGB相机相同即可。
在这里插入图片描述
在这里插入图片描述

### 奥比中光 Python 代码 示例 对于奥比中光的深度相机,在 Ubuntu 中可以通过特定的 Python 代码来获取深度值。下面是一个简单的例子,展示了如何初始化设备并读取深度帧: ```python import pyorbbecsdk as obsdk def main(): pipeline = obsdk.Pipeline() config = obsdk.Config() try: profile = pipeline.start(config) while True: frames = pipeline.wait_for_frames() # 获取一帧数据 depth_frame = frames.get_depth_frame() # 提取出深度帧 if not depth_frame: continue depth_image = np.asanyarray(depth_frame.get_data()) # 将深度帧转换成 numpy 数组以便处理 print("Depth frame received and converted.") finally: pipeline.stop() if __name__ == "__main__": main() ``` 这段代码利用 `pyorbbecsdk` 库实现了基本功能[^1]。 为了更深入地操作 RGB-D 数据,可以参考另一个实例,该实例不仅包含了深度信息还涉及到了彩色图像的同步抓取: ```python import cv2 import pyorbbecsdk as obsdk pipeline = obsdk.Pipeline() config = obsdk.Config().enable_stream(obsdk.StreamType.COLOR).enable_stream(obsdk.StreamType.DEPTH) profile = pipeline.start(config) try: align_to_color = obsdk.Align(pipeline, stream_type=obsdk.StreamType.COLOR) while True: frames = pipeline.wait_for_frames() aligned_frames = align_to_color.process(frames) # 对齐深度图到颜色图 color_frame = aligned_frames.get_color_frame() depth_frame = aligned_frames.get_depth_frame() if not (color_frame or depth_frame): continue color_image = np.asanyarray(color_frame.get_data()) depth_image = np.asanyarray(depth_frame.get_data()) # 显示图像... except Exception as e: print(e) finally: pipeline.stop() ``` 此段程序通过引入 OpenCV 来显示捕获的数据,并且使用了对齐工具使得深度图能够更好地匹配色彩图[^2]。 关于 API 文档方面,《Orbbec Viewer 手册》提供了详细的 SDK 功能描述和技术细节,包括但不限于参数配置、事件监听等内容。开发者可以根据手册中的指导完成更多高级特性开发工作[^3]。
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值