I am trying to convert a coloured image to grayscale, resize it and put it into a cell. I wrote the following code for that. But I am getting an error. What am I doing wrong?
code:
x=imread(strcat('E:\Documents and Settings\brahadeesh\Desktop\will\101_ObjectCategories\airplanes\',files_a(i).name));
x=imresize(x,[32 32]);
x=rgb2gray(x);
a(i-3)=x;
error:
??? Conversion to cell from uint8 is not possible.
Error in ==> *** at 16
a(i-3)=x;
Assuming
ahas been initialized as a cell array, you have to use curly braces to index and replace the content of a cell: