HOG功能用于图像集

时间:2018-02-25 14:47:16

标签: matlab

numImages = numel(trainingSet.Files);
trainingFeatures = zeros(numImages, hogFeatureSize, 'single');

for i = 1:numImages
    img = readimage(trainingSet, i);

    img = rgb2gray(img);

    % Apply pre-processing steps
    img = imbinarize(img);

    trainingFeatures(i, :) = extractHOGFeatures(img, 'CellSize', cellSize);  
end

错误是

  

订阅的分配维度不匹配。

     

Untitled3中的错误(第119行)
      trainingFeatures(i,:) = extractHOGFeatures(img,'CellSize',cellSize);

0 个答案:

没有答案