Search This Blog

Sunday, February 26, 2012

How to capture image form webcam in Matlab - matlab code

Matlab code for giving delay to capture image from webcam

1st we want to know the webcam port address
open matlab
type 'imaqhwinfo'
Press enter

InstalledAdaptors gives webcam port address

I got Winvideo as webcam port address so i used winvideo in my code replays with your webcam port address

%use your webcam port address
vid=videoinput('winvideo');
triggerconfig(vid, 'manual');
start(vid
% to give delay
for p=1:10
%capture image
k=getsnapshot(vid);
end
stop(vid);
delete(vid);
clear vid
%to display capture image
figure,imshow(k)






Don`t forget to tell thanks

Related Posts:-
GUI Code for capture image - Matlab
how to run m file in gui using matlab
Matlab code for shutdown computer
How to see webcam preview in Matlab
Nfs-most wanted ame can't be connect Through WIFI
How to connect microsoft access to Matlab
How to install matlab 2007 on Windows7
How to connect Mysql to Matlab
How to create Website for Free

No comments:

Post a Comment