Thanks to commenter horristic, I got a link to msdn with some useful information (thanks also to T. Chen over at msdn for helping out with the API). Extracted from T. Chen's post, here's the code that will perform the mapping from RGB to depth coordinate space:
INuiCoordinateMapper* pMapper;
mNuiSensor->NuiGetCoordinateMapper(&pMapper);
pMapper->MapColorFrameToDepthFrame(
NUI_IMAGE_TYPE_COLOR,
NUI_IMAGE_RESOLUTION_640x480,
NUI_IMAGE_RESOLUTION_640x480,
640 * 480,
(NUI_DEPTH_IMAGE_PIXEL*)LockedRect.pBits,
640 * 480,
depthPoints);
Note: the sensor needs to be initialized and a depth frame locked for this to work.
The transformed coordinates can, e.g., be queried as follows:
/// transform RGB coordinate point to a depth coordinate point
cv::Point TransformRGBtoDepthCoords(cv::Point rgb_coords, NUI_DEPTH_IMAGE_POINT * depthPoints)
{
long index = rgb_coords.y * 640 + rgb_coords.x;
NUI_DEPTH_IMAGE_POINT depthPointAtIndex = depthPoints[index];
return cv::Point(depthPointAtIndex.x, depthPointAtIndex.y);
}