function data = videocollect(collecttime)
%Author: Lightcogitation
%Copyright 7/20/11 Lightcogitation
% Create video input object.
vid = videoinput('winvideo',1);
set(vid,'TriggerRepeat',Inf);
vid.FrameGrabInterval = 1; %Grab every frame at 30 frames per second
preview(vid); %so we can see what we are grabbing
start(vid);
pause(collecttime);
stop(vid);
data = getdata(vid);
closepreview(vid)
delete(vid);
Wednesday, July 20, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment