Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Opencv 从左或右红外图像到深度的坐标映射-R200 Intelrealsense_Opencv_Infrared_Realsense_Color Depth - Fatal编程技术网

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

Opencv 从左或右红外图像到深度的坐标映射-R200 Intelrealsense,opencv,infrared,realsense,color-depth,Opencv,Infrared,Realsense,Color Depth,社区已经帮助我指导这个项目 我正在使用R200摄像头、Visual studio 2015、C++、Windows 10和OpenCV 3.1 我目前分别在左右红外摄像机中进行图像预处理,以识别物体。我需要对象几何中心的坐标(x,y,z),因此我必须进行坐标映射,但SDK只允许在深度和RGB之间进行映射: // Create the PXCProjection instance. PXCProjection *projection=device->CreateProjection();

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

我正在使用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();
//创建PXCProject实例。
PXCProjection*projection=device->CreateProjection();
//颜色和深度图像大小。
PXCImage::ImageInfo dinfo=depth->QueryInfo();
PXCImage::ImageInfo cinfo=color->QueryInfo();
//计算UV贴图。
PXCPointF32*uvmap=新的PXCPointF32[dinfo.width*dinfo.height];
投影->查询Vmap(深度,uvmap);
//将深度点uv[]转换为颜色ij[]
对于(int i=0;iRelease();
有人知道如何在左或右红外和深度之间进行映射吗?或者在默认的红外左或右RGB中进行深度映射吗


非常感谢。

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

差距是存在的,但并不太大