none
High resolution depth image blocks other events!? RRS feed

  • Question

  • Hi everyone,

    I'm trying to retrieve all three sources of information: Depth, Video and Skeleton (similar to the SkeletalViewer sample).

    However, I do not need the player index in the depth image. That means, I can use the 640x480 resolution for the depth image stream. But "only" in this case, I receive neither any event for the video frame nor any event for the skeleton, but only for the depth frame! And it does not depend on the initialization of the video stream.

    In other words:

    Case(1):

    NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH | NUI_INITIALIZE_FLAG_USES_SKELETON | NUI_INITIALIZE_FLAG_USES_COLOR);
    NuiImageStreamOpen(NUI_IMAGE_TYPE_DEPTH,NUI_IMAGE_RESOLUTION_640x480,...); 
    
    => NO NextVideoFrameEvent, NO NextSkeletonEvent, BUT ONLY NextDepthFrameEvent

    Case(2):

    NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH | NUI_INITIALIZE_FLAG_USES_SKELETON | NUI_INITIALIZE_FLAG_USES_COLOR);
    NuiImageStreamOpen(NUI_IMAGE_TYPE_DEPTH,NUI_IMAGE_RESOLUTION_320x240,...);
    => All 3 events!

     

    Case(3):

    NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX | NUI_INITIALIZE_FLAG_USES_SKELETON | NUI_INITIALIZE_FLAG_USES_COLOR);
    NuiImageStreamOpen(NUI_IMAGE_TYPE_DEPTH_AND_PLAYER_INDEX,NUI_IMAGE_RESOLUTION_320x240,...) 

    => All 3 events!

     

    The question is: Does the setting for a high resolution depth image block the events for video and skeleton?



    Thursday, June 30, 2011 12:55 AM

Answers

  • Ok, the problem is solved!

    I used an std::vector to gather the data of each depth frame, which apparently took too much time, so that the other events of the same frame were missed! That's why low resolution with less data has been working, but high resolution with 4 times more data had been problematic. Using buffer arrays solved the problem.

    Thursday, June 30, 2011 6:43 PM

All replies

  • I haven't seen what you're saying, but I'm intrigued by one thing: is this all of your initialization code, or do you also do

    NuiImageStreamOpen(NUI_IMAGE_TYPE_COLOR,NUI_IMAGE_RESOLUTION_640x480,...);
    NuiSkeletonTrackingEnable(...);

    In all 3 cases?

    I'm here to help
    Thursday, June 30, 2011 1:19 AM
  • Yes! I do the other initialization steps in all 3 cases:

    hr = NuiImageStreamOpen(NUI_IMAGE_TYPE_COLOR, NUI_IMAGE_RESOLUTION_1280x1024,...);
    hr = NuiSkeletonTrackingEnable(... );

     

    Actually the cases (1) and (2) are very similar. The only difference is, that case (2) asks for 320x240 resolution, which works; and case (1) asks for 640x480 resolution of depth images, which does not work! The remain of the code is exactly the same.

    Do you receive all events in all those three cases?

     




    Thursday, June 30, 2011 1:53 AM
  • Ok, the problem is solved!

    I used an std::vector to gather the data of each depth frame, which apparently took too much time, so that the other events of the same frame were missed! That's why low resolution with less data has been working, but high resolution with 4 times more data had been problematic. Using buffer arrays solved the problem.

    Thursday, June 30, 2011 6:43 PM
  • Hi asadeghipour,

    I have the same problem..... I dont understand your solution.

    Can you give me an sample code what you have done. I develope in vb.net but I understand also c#

    Thanks

     

     

    • Proposed as answer by ChocheR Friday, July 1, 2011 4:47 PM
    • Unproposed as answer by ChocheR Friday, July 1, 2011 4:49 PM
    Friday, July 1, 2011 9:40 AM
  • I'm like ChocheR, how can I use 4 buffers?
    Friday, July 1, 2011 11:31 AM