How to make one video out of 3 images?
이전 댓글 표시
Hi folks,
I'm trying to create a single image out of 3 different images, then collate the subsequent images into a video. I'm also trying to write some text onto the middle of the 3 images, that changes with each subsequent frame. I have made the following start but am having limited luck getting it to work!
mainImg = imread([imageMainFolder imageMainFiles(j).name]);
mainImg = mainImg(:,:,1:3);
cropImg = imread([cropsFolder cropFiles(j).name]);
threshImg = im2uint8(imread([threshFolder threshFiles(j).name]));
h = figure;
h(1) = subplot(2, 2, 1);
image(cropImg, "Parent", h(1));
h(2) = subplot(2, 2, 2);
image(threshImg, "Parent", h(2));
h(3) = subplot(2, 2, 3:4);
image(mainImg, "Parent", h(3));
myText = ['Temperature = ' num2str(myTemp(j)) '$^{o}C$'];
RGB = insertText(h, [50 50], myText, 'FontSize',18,'BoxColor', 'black','BoxOpacity',1,'TextColor','white');
image(RGB, 'Parent', axes);
axes.Visible = 'off';
writeVideo(writerObj, RGB);
this is placed inside a loop for j. I close the writerObj when the loop ends.
I'm sure my syntax is wrong so I'd appreciate any advice on how to fix it!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!