以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/02/06/231934より取得しました。


cv2でRealsenseのカラー画像をRGBに明示的に変換

import pyrealsense2 as rs
import numpy as np
import cv2

# RealSenseの設定オブジェクト
conf = rs.config()

# カラー画像を取得
conf.enable_stream(rs.stream.color, width, height, rs.format.bgr8, fps)

# Realsenseの画像受け取りパイプの解放
pipe = rs.pipeline()
profile = pipe.start(conf)

# 画像フレームのセット
frames = ""
frames = pipe.wait_for_frames()
# 安定させるため10フレームほど読みとばす
for i in range(1,10):
    frames = pipe.wait_for_frames()

# 深度画像とカラー画像を取得
color_frame = frames.get_color_frame()
cv2.cvtColor(np.asanyarray(color_frame.get_data()), cv2.COLOR_BGR2RGB)



以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/02/06/231934より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14