How i can obtain image from web cam at regular time interval to do real time processing

3 views (last 30 days)
I am using following code to capture images
clc
  2 Comments
anis altaf
anis altaf on 5 Feb 2014
Edited: anis altaf on 5 Feb 2014
Thank you sir for your kind help...but now if I want to capture an image at evey 35sec so what changes needs to be done in this code...?

Sign in to comment.

Answers (1)

Shivaputra Narke
Shivaputra Narke on 4 Feb 2014
Edited: Walter Roberson on 4 Feb 2014
Try to use following code
function VideoDemo
global indx
global vHandle
vHandle=videoinput('winvideo');
start(vHandle);
indx=1;
showTimer=timer('timerFcn',@timefcn);
set(showTimer,'ExecutionMode','fixedRate','Period',5);
start(showTimer)
function timefcn(varargin)
global vHandle
imshow(getsnapshot(vHandle));
drawnow;

Community Treasure Hunt

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

Start Hunting!