欢迎访问 生活随笔!

生活随笔

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

编程问答

Intel Realsense D435 如何通过图像识别出的比例点(x, y)获得实际点相对于摄像机原点的三维坐标(x, y, z)?

发布时间:2025/3/19 编程问答 48 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Intel Realsense D435 如何通过图像识别出的比例点(x, y)获得实际点相对于摄像机原点的三维坐标(x, y, z)? 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

自己也因为这个问题咨询了Intel的官方工作人员,以下是我的提问和他们的答复:

My ask

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click “Preview” above for a better view):

    • Consider checking out SDK examples.
    • Have you looked in our documentations?
    • Is you question a frequently asked one?
    • Try searching our GitHub Issues (open and closed) for a similar issue.
  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven’t followed any of the suggestions above ?


Required Info
Camera ModelD435&D435i
Firmware Version05.11.06.250
Operating System & VersionWin10
Kernel Version (Linux Only)(e.g. 4.14.13)
PlatformPC
SDK Version2.25.0
Languagepython
SegmentRobot

Issue Description

We have obtained the pixel position of the target obtained from the recognition program, and also obtained the depth (Z) of the target through the alignment of the depth map to the color map. Next, how can we obtain the actual target through the pixel position of the target? That is, relative to the X and Y coordinates of the camera?

我们已经获得了从识别程序获得的目标的像素位置,并且还通过将深度图与颜色图对齐来获得了目标的深度(Z)。 接下来,如何通过目标的像素位置获得实际目标? 也就是说,相对于相机的X和Y坐标?

Best regards,

Dontla

Answer

@Dontla , converting a depth 2D pixel into 3D vertex is achieved by calling rs2_deproject_pixel_to_point API.
Note that if you’re using an “depth aligned to xxx” image then the intrinsic that you need pass to the function must be taken from the “aligned” and not the original depth frame.

@Dontla通过调用rs2_deproject_pixel_to_pointAPI来实现,将深度2D像素转换为3D顶点。
请注意,如果使用的是“与xxx对齐的深度”图像,则必须传递给函数的内在函数必须从“对齐”而不是原始深度框中获取。

评价

总的来说,他们给出的一大段C/C++代码我是没太看明白的,于是我参考了其他人的一些建议。

参考文章:How to get the actual coordinates of a specific target captured by the camera at a certain resolution relative to the camera?

参考文章1:win下使用realsense进行数据修正并获取三维坐标

参考文章2:RealSense D415 捕捉乒乓球运动

参考文章3:世界坐标系和相机坐标系,图像坐标系的关系

总结

以上是生活随笔为你收集整理的Intel Realsense D435 如何通过图像识别出的比例点(x, y)获得实际点相对于摄像机原点的三维坐标(x, y, z)?的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。