我正在尝试将彩色图像转换为灰度图像,调整其大小并将其放入单元格中。我为此编写了以下代码。但是我收到了一个错误。我究竟做错了什么? 代码:
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;
错误:
??? Conversion to cell from uint8 is not possible.
Error in ==> *** at 16
a(i-3)=x;