Image sequence (images behind each other) MATLAB
2 Ansichten (letzte 30 Tage)
I want to create an image sequence with multiply images. I want to display my images behind each other, like in the following picutre:
I found this site: Work with Image Sequences as Multidimensional Arrays - MATLAB & Simulink - MathWorks Deutschland
And the commands cat, montage but I think with these commands I get an image sequence with images side by side.
I have a matrix which I want to seperate in 10 matrices with same dimensions and display them an image sequence serially like I mentioned.
This is how I started. I think with the following command I can seperate my matrix in 10 matrices (scan).
If I want for example display my third matrix I enter:
Now I dont know how to continue.
I was thinking about a for loop but I dont really know how to realize that.
I searched in the forum for similar questions but I did not find a similar question.
I hope my question is understandable.
Tarunbir Gambhir am 14 Jun. 2021
I am not sure if there is any MATLAB tool/function that does this specifically. But as a workaround, a simple script can create similar results. Try the following:
img1 = imread('AT3_1m4_01.tif');
img2 = imread('AT3_1m4_02.tif');
img3 = imread('AT3_1m4_03.tif');
img4 = imread('AT3_1m4_04.tif');
multi = cat(3,img1,img2,img3,img4);
I = img1;
pad = 0.1;
[ri, ci] = size(I);
[r, c] = size(I);
inew = uint8(zeros(floor([r, c]*pad) + [r, c]) + 255);
inew(1:r, floor(c*pad)+1:end) = I;
inew(end-ri+1:end, 1:ci) = multi(:,:,x);
I = inew;