Filter löschen
Filter löschen

Capturing images from webcam every 1s.

1 Ansicht (letzte 30 Tage)
nghia nguyen
nghia nguyen am 19 Mai 2011
Kommentiert: saeeda saher am 24 Apr. 2019
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.

Antworten (1)

Soyeun Jung
Soyeun Jung am 7 Aug. 2017
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 Kommentar
saeeda saher
saeeda saher am 24 Apr. 2019
how to save the snapshots in form of image in folder?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by