this is my code
imaqhwinfoinfo=imaqhwinfo('winvideo')vid=videoinput('winvideo');%Open Figure
hFigure=figure(1);%set parameters for video
%Acquire only one frame each time
triggerconfig(vid,'Manual');set(vid,'framespertrigger',1);%Go on forever untill stopped
set(vid,'triggerrepeat',Inf);%Get a grayscale image
set(vid,'ReturnedColorSpace','grayscale');start(vid);preview(vid);for i=1:5 trigger(vid); im=getdata(vid); figure,imshow(im(:,:,:,i));endstop(vid),delete(vid),clear(vid);
the problem is that i'm not getting multiple frames in a single figure,more over some times the program run and some times gives the error
?? Error using ==> imaqdevice.start at 19 Multiple VIDEOINPUT objects cannot access the same device simultaneously.
why it happens and how can i solve it plz help
also m not getting the 4 frames ,it dispplay 3 figure windows out of which 2 is blank only 1 frame is showing
Best Answer