필터 지우기
필터 지우기

How can i read a video and convert the first frame into an image?

조회 수: 2 (최근 30일)
abbxucy11
abbxucy11 2016년 9월 28일
댓글: abbxucy11 2016년 10월 2일
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

채택된 답변

Image Analyst
Image Analyst 2016년 9월 28일
See my attached demo where I save out all frames. You can adapt it to quit just after 1 frame if you want.
  댓글 수: 1
abbxucy11
abbxucy11 2016년 10월 2일
hello and thank you. Can you please send me the code for just the first frame? im trying to modify the code but i have errors

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by