Get frames of a video

조회 수: 1 (최근 30일)
U A
U A 2020년 7월 6일
답변: Image Analyst 2020년 7월 6일
I'm doing a video with with a series of images I took a camera but they are saved in a numeric way so I need to get the images and de video separatly.
I'm being able to get the video. How do I get the also the images in a specific folder.
I'm using the next code:
for i=1:size(array)
frame = getframe(gcf);
writeVideo(v,frame);
close
end
close(v)
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2020년 7월 6일
UA - please clarify what you mean bey get frames of video and/or how do I get also the images in a specific folder. Are you having trouble reading (or loading) the images from a particular folder? Is the order of the files incorrect? Or do you want to save the frames of the video as images? In your above code, what is array? Is it initialized to a set of images or is it something else?
U A
U A 2020년 7월 6일
The array is a series of numeric values that compose the image for each frame. I’m being able to read the array, create the video with the code but I cannot get the image of each frame separately.

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

답변 (1개)

Image Analyst
Image Analyst 2020년 7월 6일
See my attached demo. I use it to read in all the frames of a video and then, optionally, write them out to individual image files. Then, optionally, read in the individual image files from disk to create a new movie.

Community Treasure Hunt

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

Start Hunting!

Translated by