Capturing images from webcam every 1s.

3 ビュー (過去 30 日間)
nghia nguyen
nghia nguyen 2011 年 5 月 19 日
コメント済み: saeeda saher 2019 年 4 月 24 日
I have a question.I want to use webcam to localize my mobile robot.So I must capture an image every 1s to analyse.Can you tell me how can I do that.

回答 (1 件)

Soyeun Jung
Soyeun Jung 2017 年 8 月 7 日
Hi Nghia,
You can use the pause() function in a for loop to capture the image every second. Here is an example:
w = webcam;
while true % run for indefinitely long time
img = w.snapshot;
imshow(img) % display the image
pause(1); % pause for one second
end
  1 件のコメント
saeeda saher
saeeda saher 2019 年 4 月 24 日
how to save the snapshots in form of image in folder?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by