完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
第1项)我找不到python代码来主动管理激光功率或切换发射器。
我翻译C ++代码的尝试(正如预期的那样)没有好处。 项目2)内在疯狂 - > 不完全确定我在这里做错了什么。 以下代码是英特尔在回答类似问题时发布的轻微修改版本。 我正在使用D435以及最新的全新更新。 Windows 8.1。 ##尝试获取内在函数(fx等)#首先导入libraryimport pyrealsense2作为rs pipe = rs.pipeline() cfg = rs.configcfg.enable_stream(rs.stream.color,1920,1080,rs.format.rgb8,30) cfg.enable_stream(rs.stream.infrared,1,848,480,rs.format.y8,30) cfg.enable_stream(rs.stream.infrared,2,848,480,rs.format.y8,30) cfg.enable_stream(rs.stream.depth,848480,rs.format.z16,30) prof = pipe.start(cfg) ds = prof.get_stream(rs.stream.depth) intr = ds.as_video_stream_profile()。get_intrinsics() 打印“深度”打印内含 s = prof.get_stream(rs.stream.infrared,1) intr = ds.as_video_stream_profile()。get_intrinsics() 打印“IR1:”print intr s = prof.get_stream(rs.stream.infrared,2) intr = ds.as_video_stream_profile()。get_intrinsics() 打印“IR2:”print intr ds = prof.get_stream(rs.stream.color) intr = ds.as_video_stream_profile()。get_intrinsics() 打印“color:”print intr 这给出了以下内容: depthwidth:848,身高:480,ppx:424.713,ppy:242.321,fx:420.367,fy:420.367,型号:Brown ConradyIR1:宽度:848,身高:480,ppx:424.713,ppy:242.321,fx:420.367,fy :420.367,型号:Brown ConradyIR2:宽度:848,身高:480,ppx:424.713,ppy:242.321,fx:420.367,fy:420.367,型号:Brown Conradycolor:宽度:1920,身高:1080,ppx:968.251,ppy :536.9,fx:1392.01,fy:1392.87,型号:布朗康拉迪 进程以退出代码0结束 但: 如果我改变获取流的顺序,以便在深度之后和IR1和IR2之前查看颜色流,我得到: depthwidth:848,身高:480,ppx:424.713,ppy:242.321,fx:420.367,fy:420.367,型号:Brown Conradycolor:宽度:1920,身高:1080,ppx:968.251,ppy:536.9,fx:1392.01,fy :1392.87,型号:Brown ConradyIR1:宽度:1920,身高:1080,ppx:968.251,ppy:536.9,fx:1392.01,fy:1392.87,型号:Brown ConradyIR2:宽度:1920,身高:1080,ppx:968.251,ppy :536.9,fx:1392.01,fy:1392.87,型号:布朗康拉迪 进程以退出代码0结束 项目3) 我将fx(像素相对)转换为:fx(mm)= image_width / fx。 对于深度相机,我得到一个合理的答案(大约2),但对于彩色相机,答案是大约1.3 ...远远的。 谢谢, 丰富 以上来自于谷歌翻译 以下为原文 item 1) I cannot find python code to actively manage the laser power or to toggle the emitter. My attempts to translate the C++ code were (as expected:) no good. item 2) Intrinsic Madness-> Not exactly sure what I am doing wrong here. The following code is a lightly modified version posted by Intel in answer to a similar question. I'm using a D435 with most recent updates across the board. Windows 8.1. ##Trying to get intrinsics (fx, etc.) # First import the library import pyrealsense2 as rs pipe = rs.pipeline() cfg = rs.config cfg.enable_stream(rs.stream.color, 1920, 1080, rs.format. rgb8, 30) cfg.enable_stream(rs.stream.infrared, 1,848,480,rs.format.y8,30) cfg.enable_stream(rs.stream.infrared, 2,848,480,rs.format.y8,30) cfg.enable_stream(rs.stream.depth,848,480,rs.format.z16,30) prof = pipe.start(cfg) ds = prof.get_stream(rs.stream.depth) intr = ds.as_video_stream_profile().get_intrinsics() print "depth" print intr s = prof.get_stream(rs.stream.infrared, 1) intr = ds.as_video_stream_profile().get_intrinsics() print"IR1:" print intr s = prof.get_stream(rs.stream.infrared, 2) intr = ds.as_video_stream_profile().get_intrinsics() print"IR2:" print intr ds = prof.get_stream(rs.stream.color) intr = ds.as_video_stream_profile().get_intrinsics() print"color:" print intr And this gives the following: depth width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady IR1: width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady IR2: width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady color: width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady Process finished with exit code 0 BUT: If I change the order of getting the streams so that the color stream is looked at just after depth and before IR1 and IR2 I get: depth width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady color: width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady IR1: width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady IR2: width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady Process finished with exit code 0 item 3) I convert from fx(pixel relative) to: fx(mm) = image_width/fx. For the Depth camera I get a reasonable answer(about 2), but for the color camera the answer is about 1.3... way far off. Thanks, Rich |
|
相关推荐
3个回答
|
|
tem 1
下面的链接包含英特尔提供的用于使用Python控制激光功率的示例脚本。 如何使用python包装器控制激光器·问题#1258·IntelRealSense / librealsense·GitHub 第2项 RealSense用户edgar.altamirano最近发布了一个用Python获取内在函数的脚本。 Re:d435深度相机 第3项 我将把这个引用到RealSense流编程专家***455,我已将其链接到此对话中。 JB,rjo的问题是“我从fx(像素相对)转换为fx(mm)= image_width / fx。对于Depth相机,我得到一个合理的答案(约2),但对于彩色相机,答案大约是1.3 .. 远远的。“ 以上来自于谷歌翻译 以下为原文 tem 1 The link below contains a sample script provided by Intel for controlling the laser power with Python. How to control the laser with python wrapper · Issue #1258 · IntelRealSense/librealsense · GitHub Item 2 RealSense user edgar.altamirano recently posted a script for getting intrinsics with Python. Re: d435 depth camera Item 3 I will refer this one to RealSense stream programming expert ***455, whom I have linked into this conversation. JB, rjo's question is "I convert from fx(pixel relative) to fx(mm) = image_width/fx. For the Depth camera I get a reasonable answer(about 2), but for the color camera the answer is about 1.3... way far off." |
|
|
|
第2项看起来像一个错误。
我建议将它发布在问题·IntelRealSense / librealsense·GitHub上以查看开发人员的说法。 第3项......我真的不知道将焦距从像素转换为mm。 数据表具有相机的规格,包括以mm为单位的焦距; 但如果您发现工厂内在参数错误,您可以使用OpenCV或类似工具重新校准自己,然后使用校准工具写入相机。 以上来自于谷歌翻译 以下为原文 Item 2 looks like a bug. I'd suggest posting it on Issues · IntelRealSense/librealsense · GitHub to see what the devs say. Item 3... I don't really know about converting focal lengths from pixels to mm. The datasheet has the specifications for the cameras, including their focal lengths in mm; but if you find the factory intrinsic parameters are wrong you can recalibrate yourself using OpenCV or similar then write to the camera using the calibration tools. |
|
|
|
wang_901218 发表于 2018-11-26 10:53 多谢你们。 必须等到今晚才能完成所有这一切。 丰富 以上来自于谷歌翻译 以下为原文 Thanks guys. Have to wait til tonight to go through it all. Rich |
|
|
|
只有小组成员才能发言,加入小组>>
513浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 02:53 , Processed in 0.692187 second(s), Total 82, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191