Filter löschen
Filter löschen

Extracting frames from webcam !!

7 Ansichten (letzte 30 Tage)
Khaled Al-Faleh
Khaled Al-Faleh am 26 Mär. 2017
Kommentiert: Randhir kumar am 29 Apr. 2017
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

Akzeptierte Antwort

Star Strider
Star Strider am 26 Mär. 2017
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 Kommentare
Star Strider
Star Strider am 26 Mär. 2017
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 am 29 Apr. 2017
Khaled Al-Faleh: To save simultaneous picture use the function num2str(obj).

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown 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