Capturing images from webcam every 1s.

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일

0 개 추천

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?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2011년 5월 19일

댓글:

2019년 4월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by