Filter löschen
Filter löschen

taking snapshot of many persons

1 Ansicht (letzte 30 Tage)
kash
kash am 25 Jan. 2013
I have code below for taking snap shot of single person
close all
imaqhwinfo
dev_info=imaqhwinfo('winvideo',1)
%info=imaqhwinfo('winvideo')
celldisp(dev_info.SupportedFormats)
vid=videoinput('winvideo',1,'YUY2_320x240');
%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','RGB');
start(vid);
preview(vid);
data = getsnapshot(vid);
imshow(data);
this codes take snapshot of single person,if i want to take snapshots for many perosons how to perform,.i should not run the code many times its not possible
is it possible to perform like pressing and key the other person snapshots will be taken?
assuming 10 persons are stanging in a queue,need hoe t take snapshots of all of them

Akzeptierte Antwort

Image Analyst
Image Analyst am 25 Jan. 2013
I don't know why you say you should not run the code many times. You need to run it for each person you want to take a snapshot of. I'd put all that stuff into the callback function of a button labeled "Snap and save picture..." then ask for the file name with uiputfile() and save it with imwrite(). Each time you want to snap a photo, click the button and run the code.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by