Filter löschen
Filter löschen

How to save image to cell array ?

1 Ansicht (letzte 30 Tage)
tedy
tedy am 16 Apr. 2013
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

Antworten (1)

Walter Roberson
Walter Roberson am 16 Apr. 2013
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 []

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by