locked
problem with laptop RRS feed

  • Question

  • I have an application that writes out the 640*480*4 color image, the 640*480*2 depth image, and the skeleton to a file while displaying the color image. I am using the polling method and as each frame comes in I write it out. I sort out the depths, colors, and skeletons during playback.

    This is working on my dual core and quad core machines with mid range graphics cards. It is working sometimes on a laptop with Radeon 4250 graphics. If I turn off the display during capture, it has worked, and if I draw every fifth frame, it has worked. By worked, I mean all the frames are saved to disk. Sometimes it doesn't. The laptop is in North Carolina and I am in California, so communications as to what is going on are difficult.

    Any ideas as to what could impact performance intermittently like this? I'll be investigating more after the weekend.

    Michael

    Saturday, May 26, 2012 12:35 AM

Answers

  • Chances are, your code is unable to service each frame in less than 33 ms per frame on the (likely slower) laptop. If your application does not call NuiImageGetNextFrame at least every 33 ms, the runtime will discard frames.

    Without seeing your code it's difficult to tell for certain, but it sounds like the code to render the images to the screen is probably running more slowly on the laptop than on your quad core machine.

    I'd recommend that you decouple the capture and the rendering by putting them on separate threads (write to disk on the capture thread, but render to the screen on its own thread). If the culprit is in fact your graphics code, then there may be glitching (dropped frames) in the display, but your file should still be complete.

    John
    K4W Dev

    • Proposed as answer by The Thinker Wednesday, May 30, 2012 12:56 AM
    • Marked as answer by stereosphere Wednesday, May 30, 2012 7:52 PM
    Wednesday, May 30, 2012 12:28 AM

All replies

  • well if your using the kinect service on coding for fun on channel 9 that would affect the timing especially over the internet their will be some delay.

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://jefferycarlsonblog.blogspot.com/

    Tuesday, May 29, 2012 8:06 PM
  • Chances are, your code is unable to service each frame in less than 33 ms per frame on the (likely slower) laptop. If your application does not call NuiImageGetNextFrame at least every 33 ms, the runtime will discard frames.

    Without seeing your code it's difficult to tell for certain, but it sounds like the code to render the images to the screen is probably running more slowly on the laptop than on your quad core machine.

    I'd recommend that you decouple the capture and the rendering by putting them on separate threads (write to disk on the capture thread, but render to the screen on its own thread). If the culprit is in fact your graphics code, then there may be glitching (dropped frames) in the display, but your file should still be complete.

    John
    K4W Dev

    • Proposed as answer by The Thinker Wednesday, May 30, 2012 12:56 AM
    • Marked as answer by stereosphere Wednesday, May 30, 2012 7:52 PM
    Wednesday, May 30, 2012 12:28 AM
  • John's answer would be better then mine but yes as suggested share code if you want to be certain unless kinect is attached to the laptop. 

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://jefferycarlsonblog.blogspot.com/


    • Edited by The Thinker Wednesday, May 30, 2012 12:57 AM
    Wednesday, May 30, 2012 12:56 AM