2
votes

I'm using OpenNI SDK v1 and attempting to store the alignment between rgb and depth data. In NiViewer, I enable the overlay mode with registration turned on like so:

// sets the the depth image output from the vantage point of the rgb image
g_Depth.GetAlternativeViewPointCap().SetViewPoint(g_Image);

I understand that this would give me a 1:1 pixel mapping between rgb and depth if both were recorded at the same resolution. However, for my application, I need rgb to be at 1280x1024 (high res) and depth to be at 640x480.

I'm not sure how the mapping between the depth pixels to rgb would work in this mode.

1
I'm trying to do the exact same thing. So far, I haven't found anything useful...Scott Olson

1 Answers

0
votes

I had the same problem. By following the advice here, I was able to get it working as desired. It's a bit hacky, but basically you:

  1. Get the 1280x1024 image from OpenNI.
  2. Cut off the bottom to make it 1280x960.
  3. Scale the depth image to 1280x960.

Then they should line up. It's working for me.