extracting HOG features from .mat files and usage of "fitcecoc"
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
santhosh kumar buddepu
le 30 Oct 2021
Réponse apportée : Pratyush Roy
le 2 Nov 2021
I have '.mat files' for different objects and I want to extract HOG features from the mat files, and I want to apply those features on "fitcecoc" SVM one vs one classifier. I have written a code but giving the error like this:
CS=[16,16];
traindb='D:\matprog\matfiles\trainfiles';
filePattern=fullfile(traindb, '*.mat');
matFiles = dir(filePattern);
for i = 1:length(matFiles)
baseFileName = fullfile(traindb, matFiles(i).name);
ref_files{i} = load(baseFileName);
trainingfeatures(i,:)=extractHogfeatures(ref_files,'cellsize',CS);
end
traininglabels=traindb.Labels;
classifier=fitcecoc(trainingfeatures,traininglabels);
ERROR:
Dot indexing is not supported for variables of this type.
how to give labels and is it correct way to follow?
0 commentaires
Réponse acceptée
Pratyush Roy
le 2 Nov 2021
Hi Santhosh,
The traindb variable in the code refers to a string and not a struct. Hence the dot indexing does not work in this case.
As a workaround, you can use Image DataStore to store the image data, since it supports dot indexing.
Hope this helps!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Distribution Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!