How to save image to cell array ?

2 views (last 30 days)
tedy
tedy on 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

Answers (1)

Walter Roberson
Walter Roberson on 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 []

Categories

Find more on Images in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!