gpt4 book ai didi

opencv - 从左或右红外图像到深度的坐标映射 - R200 Intelrealsense

转载 作者:太空宇宙 更新时间:2023-11-03 21:11:03 24 4
gpt4 key购买 nike

社区已经帮助我指导了这个项目。

我正在使用 R200 相机、Visual Studio 2015、C++、Windows 10 和 OpenCV 3.1。

我目前在左右红外摄像头上分别做图像预处理来识别物体。我需要对象几何中心的坐标 (x, y, z),所以我必须做一个坐标映射,但 SDK 只允许在深度和 RGB 之间做:

// Create the PXCProjection instance.  
PXCProjection *projection=device->CreateProjection();

// color and depth image size.
PXCImage::ImageInfo dinfo=depth->QueryInfo();
PXCImage::ImageInfo cinfo=color->QueryInfo();

// Calculate the UV map.
PXCPointF32 *uvmap=new PXCPointF32[dinfo.width*dinfo.height];
projection->QueryUVMap(depth, uvmap);

// Translate depth points uv[] to color ij[]
for (int i=0;i<npoints;i++) {
ij[i].x=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].x*cinfo.width;
ij[i].y=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].y*cinfo.height;
}

// Clean up
delete[] uvmap;
projection->Release();

有谁知道如何在左或右 IR 和深度之间执行映射?或者在其默认的 IR 左或右 RGB 中让我进行深度映射?

非常感谢。

最佳答案

一开始我需要弄清楚如何将其中一个红外相机上检测到的特定点映射到深度图像。因此,我的最终解决方案是从 RGB 图像和映射到深度的结果中减去感兴趣的扇区(在最靠近彩色相机的红外左相机中检测到)。

差距存在,但不会太大。

/image/hjCjD.png

关于opencv - 从左或右红外图像到深度的坐标映射 - R200 Intelrealsense,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42685880/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com