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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Intel Realsense D435 如何获取摄像头的内参?get_profile() video_stream_profile() get_intrinsics()

發布時間:2025/3/19 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Intel Realsense D435 如何获取摄像头的内参?get_profile() video_stream_profile() get_intrinsics() 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
# 獲取攝像頭的內參是為了將像素坐標轉化成實際坐標 import pyrealsense2 as rspipeline = rs.pipeline() config = rs.config() config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30) config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30) profile = pipeline.start(config) frames = pipeline.wait_for_frames() depth = frames.get_depth_frame() color = frames.get_color_frame() # 獲取內參 depth_profile = depth.get_profile() print(depth_profile) # <pyrealsense2.video_stream_profile: 1(0) 640x480 @ 30fps 1> print(type(depth_profile)) # <class 'pyrealsense2.pyrealsense2.stream_profile'> print(depth_profile.fps()) # 30 print(depth_profile.stream_index()) # 0 print(depth_profile.stream_name()) # Depth print(depth_profile.stream_type()) # stream.depth print('', depth_profile.unique_id) # <bound method PyCapsule.unique_id of <pyrealsense2.video_stream_profile: 1(0) 640x480 @ 30fps 1>>color_profile = color.get_profile() print(color_profile) # <pyrealsense2.video_stream_profile: 2(0) 640x480 @ 30fps 6> print(type(color_profile)) # <class 'pyrealsense2.pyrealsense2.stream_profile'> print(depth_profile.fps()) # 30 print(depth_profile.stream_index()) # 0cvsprofile = rs.video_stream_profile(color_profile) dvsprofile = rs.video_stream_profile(depth_profile)color_intrin = cvsprofile.get_intrinsics() print(color_intrin) # width: 640, height: 480, ppx: 318.482, ppy: 241.167, fx: 616.591, fy: 616.765, model: 2, coeffs: [0, 0, 0, 0, 0] depth_intrin = dvsprofile.get_intrinsics() print(depth_intrin) # width: 640, height: 480, ppx: 317.78, ppy: 236.709, fx: 382.544, fy: 382.544, model: 4, coeffs: [0, 0, 0, 0, 0] extrin = depth_profile.get_extrinsics_to(color_profile) print(extrin) # rotation: [0.999984, -0.00420567, -0.00380472, 0.00420863, 0.999991, 0.00076919, 0.00380145, -0.00078519, 0.999992] # translation: [0.0147755, 0.000203265, 0.00051274]

總結

以上是生活随笔為你收集整理的Intel Realsense D435 如何获取摄像头的内参?get_profile() video_stream_profile() get_intrinsics()的全部內容,希望文章能夠幫你解決所遇到的問題。

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