Effacer les filtres
Effacer les filtres

make video to combine two png series from different file folder

2 vues (au cours des 30 derniers jours)
yijun guo
yijun guo le 21 Avr 2020
Commenté : yijun guo le 26 Avr 2020
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

Réponse acceptée

Akira Agata
Akira Agata le 22 Avr 2020
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 commentaires
Akira Agata
Akira Agata le 25 Avr 2020
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 le 26 Avr 2020
thank you for you help. It works
best regards
Yijun

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by