필터 지우기
필터 지우기

Extracting frames from webcam !!

조회 수: 7 (최근 30일)
Khaled Al-Faleh
Khaled Al-Faleh 2017년 3월 26일
댓글: Randhir kumar 2017년 4월 29일
Hi everyone, I want to extract the frame from my running webcam every 3 second I want to extract the frame and save it into variable to process it later so how I can do it please ?? I did this but not taking picture as running video ..
vid = videoinput('winvideo',2);
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb');
for i=1:10
data = getsnapshot(vid);
figure(i);
imshow(data);
end

채택된 답변

Star Strider
Star Strider 2017년 3월 26일
You are not saving the individual images.
One easy way is to use a cell array:
for i=1:10
data{i} = snapshot(vid);
figure(i);
imshow(data{i});
end
I do not have the Image Acquisition Toolbox, only the Support Package for USB Webcams. This loop worked for me with it.
  댓글 수: 3
Star Strider
Star Strider 2017년 3월 26일
My pleasure.
See the Image Processing Toolbox immovie (link) function for one approach. Also see the links in and at the end of the page for that documentation.
Randhir kumar
Randhir kumar 2017년 4월 29일
Khaled Al-Faleh: To save simultaneous picture use the function num2str(obj).

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

추가 답변 (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