HOG features for Image Data store
2 次查看(过去 30 天)
显示 更早的评论
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);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!