【发布时间】:2016-03-13 05:30:30
【问题描述】:
我想使用 HoG 从一组 if (16) 图像中提取特征。我已经完成了一张图片,它返回了一个很好的结果。现在我想为所有其他图像做,并存储特征。 . 请问如何创建矩阵/数组来存储分类特征。 我所有的图像都在一个文件夹中... 到目前为止,这是我的代码,请帮助:
%% Load Images
imgFolder = fullfile('C:\Users\Engineering\Desktop\Finn\NEW');
imgSet = imageSet(imgFolder);
%% Display Montage of First Note
figure;
montage(imgSet(1).ImageLocation);
title('Images of Single Note');
%% Display Query Image and Database Side-Side
galleryImage = read(imgSet,1);
figure;
for i=1:size(imgSet,2)
imageList = imgSet(i).ImageLocation;
end
subplot(1,2,1);imshow(galleryImage);
subplot(1,2,2);montage(imageList);
diff = zeros(1,9);
%% Split Database into Training & Test Sets
[training,test] = partition(imgSet,[0.8 0.2]);
%% Extract and display Histogram of Oriented Gradient Features for single Note
[hogFeature, visualization]= ...
extractHOGFeatures(read(training,1));
figure;
subplot(2,1,1);imshow(read(training,1));title('Input Note');
subplot(2,1,2);plot(visualization);title('HoG Feature');
%% Extract HOG Features for training set
I need help in this section, please. Thank you
【问题讨论】:
标签: matlab matrix multidimensional-array feature-extraction