how can i feed the live video(from webcam) to the following code instead of pre-recorded one ?

8 views (last 30 days)
R2012a > Documentation Center (Beta) > Computer Vision System Toolbox > Featured Examples in Computer Vision System Toolbox > Abandoned Object Detection
Here they are using this code to acquire video :
hVideoSrc = vision.VideoFileReader; hVideoSrc.Filename = 'viptrain.avi'; hVideoSrc.VideoOutputDataType = 'single';
i would like to replace that part with:
vid=videoinput('winvideo',1); start(vid); preview(vid);
how can i do that ? please help.

Answers (1)

Ananth
Ananth on 21 May 2012
somebody please answer........ASAP.

Community Treasure Hunt

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

Start Hunting!