3

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

我正在使用 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 中让我进行深度映射?

非常感谢你。

4

1 回答 1

1

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

差距是存在的,但不会太大。

https://i.stack.imgur.com/hjCjD.png

于 2017-05-06T20:29:51.163 回答