HOG features for Image Data store

3 views (last 30 days)
sara khaled
sara khaled on 25 Feb 2018
I typed the same code of digit classification i change the datastore only by another images but their sizes are not equal, Is that problem ? 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
% Get labels for each image. trainingLabels = trainingSet.Labels;
Subscripted assignment dimension mismatch.
Error in Untitled3 (line 119) trainingFeatures(i, :) = extractHOGFeatures(img, 'CellSize', cellSize);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!