Hi everybody,
How do I get information about frame time when streaming rigid body data to Matlab. I need that for computing angular and linear velocity. Subtracting iFrame of consecutive frames will give me milliseconds gap between the two frames?
Thanks,
Pietro.
Get frame times for velocity computation
-
- NaturalPoint Employee
- Posts: 199
- Joined: Tue Jun 24, 2008 2:01 pm
- Location: Corvallis, OR, USA
- Contact:
Re: Get frame times for velocity computation
The frame of mocap data structure exposed by the NatNet managed library (NatNetML) used by MATLAB contains a frame ID and a timestamp. The timestamp is a float, in seconds, representing the time the mocap data arrived at the host from the camera. I would use this for measuring the time delta between frames of data.
iFrame could also be used assuming you know the capture rate, which you can query to Motive from MATLAB using:
hope this helps,
Morgan
iFrame could also be used assuming you know the capture rate, which you can query to Motive from MATLAB using:
Code: Select all
% Test - send command/request to Motive
[byteArray, retCode] = theClient.SendMessageAndWait('FrameRate');
if(retCode ==0)
byteArray = uint8(byteArray);
frameRate = typecast(byteArray,'single');
end
Morgan