How can i save the features of multiple images into a single mattrix (.mat file)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
sam CP
am 17 Mär. 2017
Beantwortet: Sagar V
am 7 Feb. 2019
i want to save : Each rows containing each image features. Following is my syntax for the training section.
f=[];
srcFiles = dir('E:\M\*.jpg');
for i = 1 : 8
filename = strcat('E:\Ms\',srcFiles(i).name);
TrainNormal = [Contrast,Correlation,Energy,Homogeneity, Mean, Entropy, RMS, Variance, Smoothness, Skewness, IDM];
end
save TrainNormal.mat
Akzeptierte Antwort
Image Analyst
am 18 Mär. 2017
You might want to make TrainNormal a 2-D vector. Before the loop
TrainNormal = zeros(8, 11);
then in the loop, assign the 11 values to a single row.
TrainNormal(i, :) = [Contrast,Correlation,Energy,Homogeneity, Mean, Entropy, RMS, Variance, Smoothness, Skewness, IDM];
then after the loop, save the variable to a .mat file:
save('TrainNormal.mat', 'TrainNormal);
5 Kommentare
Weitere Antworten (1)
Sagar V
am 7 Feb. 2019
how to save the features of 100 images into .mat file to classifying using SVM
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!