using webcam instead of an avi file ?

1 view (last 30 days)
Hussein Alwalid
Hussein Alwalid on 2 Nov 2018
Commented: Hussein Alwalid on 2 Nov 2018
Hi i am new to Matlab and i've been trying to edit this example Right Here to detect multiple objects and its working great but i'm trying to edit it to use my laptop camera instead of an avi video ? i know i can use this code to read from my camera
vidobj = imaq.VideoDevice('winvideo', 1);
but i didn't know how to edit it, can someone please help?

Answers (1)

Caglar on 2 Nov 2018
Edited: Caglar on 2 Nov 2018
camera = webcam;
while true %well end it some point
image( picture{end}); %if you want to watch
drawnow; %if you want to watch
pictures will be a cell array of snapshots. dont forget to preallocate pictures array.
  1 Comment
Hussein Alwalid
Hussein Alwalid on 2 Nov 2018
Yes but how do I substitute this in my example code?

Sign in to comment.


Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!