I want to create interrupts
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Adisorn Phanukthong
el 15 de Mayo de 2017
Editada: Adisorn Phanukthong
el 15 de Mayo de 2017
% Video preferences
%vid = videoinput('winvideo', 1); % Next line is alternative to this one if you know the format
vid = videoinput('winvideo', 1, 'MJPG_1280x720');
% vid.FramesPerTrigger = Inf;
vid.TriggerRepeat = Inf;
set(vid, 'ReturnedColorSpace', 'RGB') ;
set(vid,'FrameGrabInterval', 3);
% Preview
figure
% Get frames
start(vid);
wait(vid,inf);
% frames = getdata(vid);
vid.FramesAvailable
% Save frames
while(vid.FramesAvailable >= 2)
data = getdata(vid,2);
diff_im = imabsdiff(data(:,:,:,1),data(:,:,:,2));
diff_im
imshow(diff_im);
drawnow % update figure window
end
% folder = strcat(foldername, '/');
% for k = 1 : framenumber
% mov(k).cdata = frames(:,:,:,k);
% imagename=strcat(int2str(k), '.jpeg');
% path = strcat(folder, imagename);
% imwrite(mov(k).cdata, path);
% end
stop(vid);
delete(vid);
clear vid;
The requirement is that I do not have interrupt support for capture time. Want to help Want to clear When using images that capture frames per frame
2 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre National Instruments Frame Grabbers en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!