% test camera - capture and display 1000 frames

clear all;

% get number of available video capture devices, usually 1
cardnum=vcapg2([],0);

% prepare figure
close all; figure(1); set(1,'doublebuffer','on');

% capture mode
for i=1:1000
	% grab the image
	I = vcapg2([],0);
	% show it 
	imshow(I);	drawnow;
end
