Kinect frame updated
Posted: 20 December 2010 12:01 PM   [ Ignore ]
New Member
Rank
Total Posts:  3
Joined  2010-05-10

Hi,

Could there be a method added to the Kinect SDK so we know what the current frame number of the rgb/depth frames are so that we know when the frame has been updated.  This way we can only grab frames at 30fps and not do unnecessary processing.

Thanks smile
-Andrew

Profile
 
 
Posted: 20 December 2010 06:28 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
RankRankRank
Total Posts:  76
Joined  2010-08-03

could you not accomplish the same with a wait function.

e.g. if you wanted to get 30FPS you know that youd want to call a frame 30 times within 1000 miliseconds.
1000/30 =33ms per frame.

you could potentially put this in after the frame has been recieved etc. before attempting to call another frame.

-K

Profile
 
 
Posted: 21 December 2010 01:02 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  5
Joined  2010-12-15

Afaik there is no accurate wait/sleep function in Windows to wait exact 33ms, because Windows is not a realtime operating system.

Profile
 
 
Posted: 21 December 2010 09:15 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

rawhed,

This is why there is a wait parameter in every GetNUICameraColorFrameXXX and GetNUICameraDepthFrameXXX function call.
It is assumed that your processing is real-time, meaning every frame is processed in less than 33ms.
If that is not the case, you could retrieve frames on a separate thread and keep track of the frame numbers that way.
Just remember that if the wait parameter is 0, the function returns right away (returning the last captured frame).
In normal usage wait should be >33ms. Then you will always get the latest frame and the function will not return until a new frame is grabbed.

AlexP

Profile
 
 
 
 


RSS 2.0     Atom Feed