How can i read a video and convert the first frame into an image?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
abbxucy11
am 28 Sep. 2016
Kommentiert: abbxucy11
am 2 Okt. 2016
img=VideoReader(filename);
P=img.Path;
nFrames=img.NumberOfFrames;
for k=1
eikona=read(img,k);
%figure(1),imshow(img,[]);
end
image1=getframe(image(eikona));
[X,Map]=frame2im(image1)
i use this code and i have this error: A valid figure or axes handle must be specified
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 28 Sep. 2016
See my attached demo where I save out all frames. You can adapt it to quit just after 1 frame if you want.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!