the community has already helped me to guide me in this project.
I am working with the R200 camera, Visual studio 2015, C ++, Windows 10 and OpenCV 3.1.
I currently do the image preprocessing separately in the left and right infrared cameras to identify objects. I need the coordinates (x, y, z) of the object's geometric center, so I have to do a coordinate mapping, but the SDK only allow to do it between depth and 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();
Does anyone know how to perform the mapping between left or right IR and depth? Or in its default IR left or right RGB for me to do the mapping in depth?
Thank you very much.