Concatenation of images in one Matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Algorithms Analyst
am 1 Mai 2014
Beantwortet: Image Analyst
am 2 Mai 2014
Hi all
I have 3 images having different size of 512x512,256x256,128x128
How can I concatenate them together in one matrix?
3 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Mai 2014
I'd put them into a structure. You can attach each image variable to the structure as a new field.
my3images.smallImage = smallImage128;
my3images.mediumImage = mediumImage256;
my3images.bigImage = bigImage512;
This lets you save all 3 images in a single variable with no change in their size . You could have an array of these structures if you had multiple sets of images.
You could also use a 1 by 3 cell array if you want but I think cell arrays are more complicated because there's often confusion over whether to use parentheses of braces.
0 Kommentare
Weitere Antworten (1)
Azzi Abdelmalek
am 1 Mai 2014
Suppose im1 is 512x512, im2 is 256x256 and im3 is 128x128
[n,m,p]=size(im1);
new_im2=imresize(im2,n,m);
new_im3=imresize(im3,n,m);
im_final=[im1;new_im2;new_im3]
0 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!