我有问题,我需要帮助...
我正致力于图像识别。
我想训练一个分类器,有几个特点:
F1。 HoG功能
F2。颜色特征
F3。宽高比
F4。面积,平均值和峰度。
所以我有:
training=imageSet(imgFolder1, 'recursive')
test=imageSet(imgFolder2, 'recursive')
Cell size=[4,4];
hogFeatureSize=length(hog_4x4);
for j=1:numel(training)
numImages=training(j).count
features=zeros(numImages, higFeatureSize, 'single')
for k=1:numImages
I=read(training (j), k);
features (k, :)=extractHOGFeatures(img, 'cellsize', cellsize);
end
labels=repmat(training(j).Description,numImages, 1);
TrainingFeatures=[trainingFeatures, features]
TrainingLabels=[trainingLabels, labels]
end
Classifier=fitcecoc(trainingFeatures, trainingLabels]
%%%%%%%%%%%%%%%%%%%%
现在,如何将 F2 , F3 和 F4 以上功能纳入此分类器进行培训?
谢谢。