This is caused by a limitation in how the toolbox handles manual triggering. Occasionally the first frame is acquired immediately after the manual trigger is issued. In these cases, it is actually the second frame that is delayed by the amount specified in TriggerFrameDelay. It is possible to detect this by examining the timestamps of the returned frames:
vid = videoinput('winvideo', 1);
triggerconfig(vid, 'manual');
set(vid, 'TriggerFrameDelay', 100);
start(vid);
trigger(vid);
wait(vid);
[data time] = getdata(vid);
In this case time(1) will be very close to zero, but time(2) will correspond to a time 100 frames after the trigger.
Best Answer