第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

類型錯誤:不支持 mat 數(shù)據(jù)類型 = 17,使用 realsense d435 顯示 IR 數(shù)據(jù)

類型錯誤:不支持 mat 數(shù)據(jù)類型 = 17,使用 realsense d435 顯示 IR 數(shù)據(jù)

泛舟湖上清波郎朗 2021-09-14 17:42:00
我目前正在使用 d435,我想按照我的代碼顯示 IR 圖像(左側(cè)和右側(cè),但目前只關(guān)注一個):import pyrealsense2 as rsimport numpy as npimport cv2# We want the points object to be persistent so we can display the #last cloud when a frame dropspoints = rs.points()# Create a pipelinepipeline = rs.pipeline()#Create a config and configure the pipeline to streamconfig = rs.config()config.enable_stream(rs.stream.infrared, 1, 1280, 720, rs.format.y8, 30)# Start streamingprofile = pipeline.start(config)# Streaming looptry:    while True:        # Get frameset of color and depth        frames = pipeline.wait_for_frames()        ir1_frame = frames.get_infrared_frame(1) # Left IR Camera, it allows 1, 2 or no input        image = np.asanyarray(ir1_frame)        cv2.namedWindow('IR Example', cv2.WINDOW_AUTOSIZE)        cv2.imshow('IR Example', image)        key = cv2.waitKey(1)        # Press esc or 'q' to close the image window        if key & 0xFF == ord('q') or key == 27:            cv2.destroyAllWindows()            breakfinally:    pipeline.stop()一切正常,直到該行:cv2.imshow('IR Example', image)我收到錯誤:類型錯誤:不支持 mat 數(shù)據(jù)類型 = 17我找到了這個鏈接: TypeError: src data type = 17 is not supported但我仍然不知道如何顯示我的圖像。有沒有人有一些想法?請分享,我是opencv的新手。image.shape = ()image.dtype = dtype('O')
查看完整描述

1 回答

?
絕地無雙

TA貢獻1946條經(jīng)驗 獲得超4個贊

您需要調(diào)用get_data()以從框架中獲取圖像。

image = np.asanyarray(ir1_frame.get_data())


查看完整回答
反對 回復 2021-09-14
  • 1 回答
  • 0 關(guān)注
  • 944 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號