Why is metadata from getsnapshot empty?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using the image acquisition toolbox to capture video from a Logitech C920 USB webcam with the 'winvideo' adaptor.
I'm trying to acquire and process time-stamped images in an infinite loop. My current method (below) is based on the second approach in demoimaq_GetSnapshot.m to achieve a high frame rate. The problem I'm having is that the metadata output when I call getsnapshot is empty, and so I am missing the timestamp for the snapshot. My current best guess is that it's something to do with the video adaptor configuration?
I've also tried peekdata, but it also doesn't seem to return time-stamps. getdata definitely returns time stamps but I'm unsure how to use it with a manual trigger, it seems more suited to a single acquisition to me?
Any thoughts/guidance would be much appreciated.
>> vidL=videoinput('winvideo',1,'MJPG_1920x1080');
>> triggerconfig(vidL, 'manual');
>> start(vidL)
>> [snapshotL,metaL] = getsnapshot(vidL);
>> metaL
metaL =
struct with no fields.
4 comentarios
Lee
el 16 de Jul. de 2017
I donot know what's your meaning. But I find the function is [frame, metadata] = getsnapshot(obj) returns metadata, a 1-by-1 array of structures. This structure contains information about the corresponding frame. The metadata structure contains the field AbsTime, which is the absolute time the frame was acquired, expressed as a time vector. In addition to that field, some adaptors may choose to add other adaptor-specific metadata as well.
So I expect the metadata contain the time stamp...
Image Analyst
el 16 de Jul. de 2017
I don't know who adds that in. Sounds like the Mathworks but the documentation also says that additional metadata may be provided by the manufacturer of the camera. So contact your camera manufacturer and ask them what metadata they think should be returned. If they say they get the absolute time from MATLAB but then throw it away and don't return it, then you can add it back in for the now function;
metaL.AbsTime = now();
Respuestas (2)
Image Analyst
el 1 de Abr. de 2016
I don't know. I never tried. Of course you can get the current time with the now() function.
Benigno Barbés Fernández
el 24 de En. de 2017
Hi.
I have exactly the same problem: metadata is empty. I am using a frame grabber manufactured by "the imaging source".
Could you find a solution?
Thanks
0 comentarios
Ver también
Categorías
Más información sobre Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!