我有一个大约4类的数据库,每个类都有大约50张图片。我在Matlab上创建了一个特征向量,以便从每个图像中提取所需的特征。
如何创建所有图像的向量数据库,然后按类对其进行训练?
发布于 2017-06-19 11:56:34
创建一个50*4大小的单元格数组,其中行对应于每个图像,列对应于各个图像的每个类别。检查下面的伪代码:
N = 50 ; % number of images
C = 4 ; % number of classes
%% loop for each image
iwant = cell(N,C) ;
for i = 1:N
%% Extract the features of images,
iwant{i,1} = rand(10) ;
iwant{i,2} = rand(5) ;
iwant{i,3} = rand(6) ;
iwant{i,4} = rand(11) ;
endhttps://stackoverflow.com/questions/44618792
复制相似问题