How to save image to cell array ?

1 次查看(过去 30 天)
tedy
tedy 2013-4-16
Hello,
i have images totally 28 images, it's all taken from imread(a1.bmp,a2.bmp....), each sized 50x50x3. i wanna save it into cell array. so, the final result is a cell array with 7 col and 4 row. i code like this.
letter=[a1 b1 c1 d1 e1 f1 g1;
a2 b2 c2 d2 e2 f2 g2;
a3 b3 c3 d3 e3 f3 g3;
a4 b4 c4 d4 e4 f4 g4];
templates=mat2cell(letter);
save ('templates','templates');
it doesn't work, please help me.Thanks in advance

回答(1 个)

Walter Roberson
Walter Roberson 2013-4-16
templates = {a1 b1 c1 d1 e1 f1 g1;
a2 b2 c2 d2 e2 f2 g2;
a3 b3 c3 d3 e3 f3 g3;
a4 b4 c4 d4 e4 f4 g4}; %notice {} not []

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by