stacking rgb images into 3d or 4d variable
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Raheema Al Karim Damani
am 26 Sep. 2019
Kommentiert: Raheema Al Karim Damani
am 6 Nov. 2019
I have mri frames that are in rgb and I want stack them in a 4d variable ( height x width x 3 channels x number of frames) so that I can view them as a montage.
How can i do this?
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 26 Sep. 2019
Bearbeitet: Adam Danz
am 26 Sep. 2019
a = ones(5,6,3)+0;
b = ones(5,6,3)+1;
c = ones(5,6,3)+2;
stacked = cat(4,a,b,c);
% ^ concatenate along 4th dim
If the image sizes are not identical, you can pad them smaller ones to match the size of the larged one by using paddarray() and then use cat().
10 Kommentare
Adam Danz
am 6 Nov. 2019
I see you've asked similar questions since adding the question above. If you still need help, please create a new question in the forum and send me the link to your new question or add the link as a comment below.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Geometric Transformation and Image Registration 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!