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!