make video to combine two png series from different file folder

3 ビュー (過去 30 日間)
yijun guo
yijun guo 2020 年 4 月 21 日
コメント済み: yijun guo 2020 年 4 月 26 日
Hello,
i would like to combine two png series from different file folder and make video
for example: below I attached screenshot of the png folders of pressure and velocity. I would like to make a video to combine pressure and velocity.
thank you in advance
Yijun

採用された回答

Akira Agata
Akira Agata 2020 年 4 月 22 日
How about the following solution?
s = dir('*.png');
v = VideoWriter('output.avi');
open(v);
for kk = 1:numel(s)
filePath = fullfile(s(kk).folder,s(kk).name);
I = imread(filePath);
writeVideo(v,I);
end
close(v);
  6 件のコメント
Akira Agata
Akira Agata 2020 年 4 月 25 日
You can simply adjust the image size just before combining them, like:
...
F_IR = imread(filePath_IR);
F_OR = imread(filePath_OR);
F_OR = imresize(F_OR,size(F_IR,[1,2])); % <- Added this line
bothImages = [F_IR, F_OR];
...
yijun guo
yijun guo 2020 年 4 月 26 日
thank you for you help. It works
best regards
Yijun

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by