Can I overlay a large number of image?

조회 수: 3 (최근 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
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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by