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 ?
| Camera Model | D435&D435i |
| Firmware Version | 05.11.06.250 |
| Operating System & Version | Win10 |
| Kernel Version (Linux Only) | (e.g. 4.14.13) |
| Platform | PC |
| SDK Version | 2.25.0 |
| Language | python |
| Segment | Robot |
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)?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 目标、物体识别(检测)object de
- 下一篇: Violin 小提琴初探