社区已经帮助我在这个项目中指导我。
我正在使用 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 中让我进行深度映射?
非常感谢你。