using webcam instead of an avi file ?

조회 수: 1 (최근 30일)
Hussein Alwalid
Hussein Alwalid 2018년 11월 2일
댓글: Hussein Alwalid 2018년 11월 2일
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?

답변 (1개)

Caglar
Caglar 2018년 11월 2일
편집: Caglar 2018년 11월 2일
camera = webcam;
pictures{1}=camera.snapshot;
while true %well end it some point
pictures{end+1}=camera.snapshot;
image( picture{end}); %if you want to watch
drawnow; %if you want to watch
end
clear('camera');
pictures will be a cell array of snapshots. dont forget to preallocate pictures array.
  댓글 수: 1
Hussein Alwalid
Hussein Alwalid 2018년 11월 2일
Yes but how do I substitute this in my example code?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by