3
社區已經幫助我在此項目中指導我。從左或右紅外圖像到深度的座標映射 - R200 Intelrealsense
我正在使用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中進行深度映射?
非常感謝。