2011-04-20 31 views
1

我試圖將彩色圖像轉換爲灰度,調整大小並將其放入單元格中。我爲此寫了下面的代碼。但我得到一個錯誤。我究竟做錯了什麼? 代碼:matlab單元格插入問題

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; 

回答