How to arrange stacked Images into a 2 dimension array?

1 Ansicht (letzte 30 Tage)
VIJENDRA
VIJENDRA am 7 Jun. 2015
Kommentiert: Walter Roberson am 7 Jun. 2015
I have a stack of 40 Images with dimension of 1000*1000 as:
Images<1000*1000*40 double>
I want to arrange the Images as shown below in a single array of size 8000*5000:
Can anyone help?

Akzeptierte Antwort

David Young
David Young am 7 Jun. 2015
Bearbeitet: David Young am 7 Jun. 2015
Images2d = reshape( ...
permute( ...
reshape(Images, 1000, 1000, 8, 5), ...
[1 3 2 4]), ...
8000, 5000);

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 7 Jun. 2015
You can mat2cell splitting along the 3rd dimension, reshape the cell array 8x5 and then cell2mat back
  1 Kommentar
Walter Roberson
Walter Roberson am 7 Jun. 2015
Sz = size(Image4D);
T = mat2cell(Image4D, Sz(1), Sz(2), Sz(3), ones(1,Sz(4));
Image3D = cell2mat(reshape(T, 8, 5));

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by