none
Align 640x480 depth with 640x480 color RRS feed

  • Question

  • Hello,

    Despite reading all the FAQs and many of these threads I am still having problems aligning depth (without player index) and color images. Both frames are at 640x480 and I am using SDK version 1.5.

    Is it the case that GetColorPixelCoordinatesFromDepthPixel and the related functions only operate on depth data at 320x240 resolution? If so, how do I align my two frames?

    Please can someone outline the method.

    Many thanks

    Wednesday, May 30, 2012 12:38 PM

Answers

  • The presence or absence of player index should be irrelevant to this discussion. These mappings work the same with or without player index.

    I'm a little confused by what you mean when you say "more noise than the raw depth input".

    NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution doesn't modify or return any depth values. It just returns the X, Y coordinates of a color pixel that correspond to a specific depth pixel.

    Can you explain further, and perhaps show some of your code so we can see what you're attempting to do?

    John
    K4W Dev

    Friday, June 1, 2012 12:05 AM

All replies

  • Please take a look at the GreenScreen sample in the Kinect for Windows Toolkit. It demonstrates how to align depth and color images. It works with a depth buffer that also includes player index, but most of the same techniques should apply, regardless of whether the player index is present.

    John
    K4W Dev

    Wednesday, May 30, 2012 5:34 PM
  • Thanks. That was my original approach, but it has not worked.

    GreenScreen only uses NUI_IMAGE_RESOLUTION_320x240 for the depth stream despite not using the player index (which would allow a higher 640x480 depth stream resolution). I want to use NUI_IMAGE_RESOLUTION_640x480 for the depth stream - please can you clarify whether or not GetColorPixelCoordinatesFromDepthPixel will work with the depth stream at this resolution?

    Thank you

    Wednesday, May 30, 2012 6:50 PM
  • Have you tried changing it to NUI_IMAGE_RESOLUTION_640x480 and using a Kinect for Windows device?
    Thursday, May 31, 2012 12:31 AM
  • I am using a Kinect for Windows, with the 1.5 SDK.

    I want to obtain real world depth values that are aligned to my color image.

    Both the color and depth images are at NUI_IMAGE_RESOLUTION_640x480 (no player index).

    The output of NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution contains more noise than the raw depth input. I am not referring to parallax shadows. Why is this the case? Please can you confirm if NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution performs correctly when the depth and color streams are at NUI_IMAGE_RESOLUTION_640x480.

    Many thanks



    • Edited by ntward22 Thursday, May 31, 2012 10:22 PM Clarified my line of questioning
    Thursday, May 31, 2012 8:24 PM
  • The presence or absence of player index should be irrelevant to this discussion. These mappings work the same with or without player index.

    I'm a little confused by what you mean when you say "more noise than the raw depth input".

    NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution doesn't modify or return any depth values. It just returns the X, Y coordinates of a color pixel that correspond to a specific depth pixel.

    Can you explain further, and perhaps show some of your code so we can see what you're attempting to do?

    John
    K4W Dev

    Friday, June 1, 2012 12:05 AM
  • OK, thank you.

    Yes, I wasn't very clear. NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution occasionally returns X and Y values that are outside the bounds of the image. When the aligned depth image is displayed there are therefore missing pixels which make the aligned image look noisy. This happens even on a plane surface, such as a wall, where there is no shadowing due to parallax.

    I now have a working solution, and have used a filter to eliminate some of the missing values.

    Thank you.

    Monday, June 4, 2012 3:07 AM