Concatenation of images in one Matrix

1 回表示 (過去 30 日間)
Algorithms Analyst
Algorithms Analyst 2014 年 5 月 1 日
回答済み: Image Analyst 2014 年 5 月 2 日
Hi all
I have 3 images having different size of 512x512,256x256,128x128
How can I concatenate them together in one matrix?
  3 件のコメント
Algorithms Analyst
Algorithms Analyst 2014 年 5 月 1 日
I made a Gaussian pyramid of 3 layers.let say its 512*512,256*256,128*128. Now I have a cell array of this pyramid.now I want this pyramid in one matrix for further processing.
José-Luis
José-Luis 2014 年 5 月 1 日
編集済み: José-Luis 2014 年 5 月 1 日
You can't have them in a single matrix if you don't resize or pad your matrices, or if you don't store everything as a single row/column vector, but I'm guessing the later is not what you want.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2014 年 5 月 2 日
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.

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 5 月 1 日
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]

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by