For the image acquisition toolbox, can I retrieve frame timestamps when logging to disk?

4 次查看(过去 30 天)
I know how to retrieve timestamps when logging to memory (e.g. getdata(vid)), however I'd like to know how to retrieve image timestamps when logging to disk. I need to collect a large number of frames and with high precision, so the average framerate is not useful.

回答(1 个)

Dimitris Iliou
Dimitris Iliou 2016-10-12
The ability to log / retrieve timestamps when 'LoggingMode' is set to 'Disk' is not available with the Image Acquisition Toolbox. When 'LoggingMode' is set to 'disk', AVI files are created. AVI files do not contain timestamp info.
The following link can be referred for tutorial on how to create your own format for file logging: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4792
You can retrieve the timestamps using ‘getdata’ function as given below.
[data, time, metadata] = getdata(obj,obj.FramesAcquiredFcnCount);
However, this does not work when LoggingMode is set to 'disk'. You can achieve the functionality by setting the ‘loggingMode’ set to 'disk&memory' and using a function callback.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by