日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

Intel Realsense D435 python 测试是否能将pipeline、config、enable、start单独提出wait for frames循环外?(不能,配置必须全部在外)

發布時間:2025/3/20 python 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Intel Realsense D435 python 测试是否能将pipeline、config、enable、start单独提出wait for frames循环外?(不能,配置必须全部在外) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

最后測試成功代碼

# -*- coding: utf-8 -*- """ @File : 200106_測試是否能夠只用一個pipeline對象來輪詢六個攝像頭_將pipeline和config和configEnnable配置提出.py @Time : 2020/1/6 9:27 @Author : Dontla @Email : sxana@qq.com @Software: PyCharm """import timeimport numpy as np import pyrealsense2 as rs import cv2ctx = rs.context()devices = ctx.query_devices() num = len(devices) # print(num) serial_list = [] for i in range(num):# print(devices[i].get_info(rs.camera_info.serial_number))serial_list.append(devices[i].get_info(rs.camera_info.serial_number)) print(serial_list)for i in range(num):locals()['pipeline' + str(i)] = rs.pipeline(ctx)locals()['config' + str(i)] = rs.config()locals()['config' + str(i)].enable_device(serial_list[i])locals()['config' + str(i)].enable_stream(rs.stream.depth, 640, 360, rs.format.z16, 30)locals()['config' + str(i)].enable_stream(rs.stream.color, 640, 360, rs.format.bgr8, 30)locals()['pipeline' + str(i)].start(locals()['config' + str(i)])# try: while True:for i in range(num):print(i)# pipeline = rs.pipeline(ctx)# config = rs.config()# locals()['config' + str(i)].enable_device(serial_list[i])# locals()['config' + str(i)].enable_stream(rs.stream.depth, 640, 360, rs.format.z16, 30)# locals()['config' + str(i)].enable_stream(rs.stream.color, 640, 360, rs.format.bgr8, 30)# locals()['pipeline' + str(i)].start(locals()['config' + str(i)])frames = locals()['pipeline' + str(i)].wait_for_frames()color_frame = frames.get_color_frame()color_image = np.asanyarray(color_frame.get_data())cv2.imshow('win{}'.format(i), color_image)cv2.waitKey(1)# finally: # print('guanbi') # for i in range(num): # locals()['pipeline' + str(i)].stop()

結果

其他失敗代碼參見:Dontla / test_intel_realsense_recurrence

總結

以上是生活随笔為你收集整理的Intel Realsense D435 python 测试是否能将pipeline、config、enable、start单独提出wait for frames循环外?(不能,配置必须全部在外)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。