Can I overlay a large number of image?

4 ビュー (過去 30 日間)
Sam
Sam 2023 年 3 月 7 日
Hi all,
Beginner matlaber here, looking for some advice. I have a series of frames from a video showing an oscilating object. What I'd like to do is overlay all of them. I have used imfuse to overlap two of them but I'm wondring how I would start overlaying 500 images. I also wonder if just summing the image as matrices of data would be better? The frame are .tif and are all the same size.
A few pointers or push in the right direction would be much appriecated.
Cheers,
Sam

回答 (1 件)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2023 年 3 月 7 日
Hello
You can always overlay things by summing them, say your data is a 3D stack and each layer is one of your frames,
a = zeros(50,50,6);
a(1:10,1:10,1) = 1;
a(11:20,11:20,2) = 1.2;
a(31:40,1:10,3) = 0.8;
a(1:10,31:40,4) = 2;
a(41:50,1:10,5) = 3;
a(1:10,41:50,6) = 0.5;
% add a line to show where each frame is
a(1:3,:,:)=0.5;
a(:,1:3,:)=0.5;
montage(a)
Now, I can add all the frames and show together
imagesc(sum(a,3));
colormap gray

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by