필터 지우기
필터 지우기

taking snapshot of many persons

조회 수: 1 (최근 30일)
kash
kash 2013년 1월 25일
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

채택된 답변

Image Analyst
Image Analyst 2013년 1월 25일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by