在矩阵“matlab”中添加HOG功能

时间:2017-04-27 15:15:41

标签: matlab image-processing machine-learning computer-vision feature-extraction

在提取图像文件夹的HOG功能后,我想将所有这些结果添加到一个矩阵中。我怎么能这样做?这是我在matlab中的代码:

% Get list of all jpg files in this directory
% DIR returns as a structure array.  You will need to use () and . to get
% the file names.
%to get all images in Motorbikes directory

imagefiles = dir('Motorbikes/*.jpg');      
nfiles = length(imagefiles);    % Number of files found

for ii=1:nfiles
   currentfilename = ['Motorbikes/',imagefiles(ii).name];

   currentimage = imread(currentfilename);
   images{ii} = currentimage;
end

%To extract features of each image
featureMatrix = [];

for jj=1:nfiles
    currentImageFeatures = extractHOGFeatures(images{jj});

    featureMatrix = [featureMatrix, currentImageFeatures];
end

0 个答案:

没有答案