フィルターのクリア

How can I do the same task with a loop in the step function?

3 ビュー (過去 30 日間)
kassem EL KEBBAR
kassem EL KEBBAR 2017 年 5 月 31 日
回答済み: Image Analyst 2017 年 6 月 1 日
Hello,
Please can anyone help me how can i correct this? I want to repeat taking pictures of the face detected, every 3 seconds, and save it in a file. (NB: the for..end is just for the video reader). Thank you.
for taoefaeffadef = 1:100
videoFrame = step(videoFileReader);
matchPic = imcropPolygon(bboxPolygon,videoFrame);
matchPic = cutPic(matchPic);
imwrite(matchPic,'test2.jpg');
....
end

回答 (1 件)

Image Analyst
Image Analyst 2017 年 6 月 1 日
I'm not sure what you're asking. If you want to take snapshots every 3 seconds and save to files on disk, then put this in the loop:
thisImage = getsnapshot();
filename = sprintf('Image %d.png', taoefaeffadef); % Change filename at each iteration.
imwrite(thisImage, filename); % Save to disk.
pause(3); % Wait 3 seconds

カテゴリ

Help Center および File ExchangeManage Products についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by