How to write video in to frames
이전 댓글 표시
Hi every one
I have implement some algorithm now i want to save the results of this algorithm into some folder how can I do it?
let say my result is
myvideo=result; writeobj=Videowriter(myvideo);
how to do ahead.
thanks
댓글 수: 4
Walter Roberson
2013년 3월 26일
You want to save the individual frames? Or you want to save as a video? What is the arrangement of data in "result" ?
Algorithms Analyst
2013년 3월 26일
Walter Roberson
2013년 3월 26일
So result is H x W x number_of_frames ?
Algorithms Analyst
2013년 3월 26일
편집: Walter Roberson
2013년 3월 26일
답변 (1개)
Walter Roberson
2013년 3월 26일
0 개 추천
shows an example of reading a video to extract the frames. Beyond that you would use imwrite() to save each frame to a file.
댓글 수: 3
Walter Roberson
2013년 3월 26일
for K = 1 : size(result,3)
thisframe = result(:,:,K);
thisfile = sprintf('frame_%04d.jpg', K);
imwrite( thisframe, thisfile );
end
Walter Roberson
2013년 3월 26일
Taking into account your code:
thisfile = sprintf('frame_%04d.jpg', f);
imwrite(bwimg, thisfile);
Algorithms Analyst
2013년 3월 28일
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!