NatNetML.dll telling two frames apart

NatNet, VRPN, TrackD, and Plugins
Post Reply
kundziad
Posts: 3
Joined: Sat Jan 26, 2013 2:47 pm

NatNetML.dll telling two frames apart

Post by kundziad »

I am using NatNelML.dll with Matlab and I need to know exactly when a new frame is available from the Tracking Tools. I've tried setting up an event listener, with no luck so far.

A temporary solution to the problem would be to poll m_NatNet.GetLastFrameOfData() as frequently as possible when the program is ready to handle the next frame and only proceed with the analysis when it is detected that the frame returned is different from the last processed one.

The problem I have run into is that it seems to be no reliable way to tell frames apart. Can I somehow gain access to the timestamp of a frame using NatNelML.dll?

I have tried writing my own hashing function based on the frame latency or exact position of a certain trackable object. I have found a curious result: GetLastFrameOfData() seems to return completely identical frames for about 25 ms and then suddenly two 'different' frames are returned within an alarmingly short period of time. Judging by the fact that the framerate of the system is reported as 32 fps, it seems that for each genuinely distinct frame, three different frames of data are returned. (By different I mean without bit-for-bit identical object coordinates.)

This unexpected variation in the exact values returned by GetLastFrameOfData() makes the constant polling approach unfeasible. Can someone recommend a robust method for telling the frames apart? Also, out of curiosity - can someone explain why the frames appear to be different even though the scene should not be updated more frequently than at 32 fps?
Post Reply