フィルターのクリア

How can i save the features of multiple images into a single mattrix (.mat file)?

3 ビュー (過去 30 日間)
sam  CP
sam CP 2017 年 3 月 17 日
回答済み: Sagar V 2019 年 2 月 7 日
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

採用された回答

Image Analyst
Image Analyst 2017 年 3 月 18 日
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 件のコメント
sam  CP
sam CP 2017 年 3 月 18 日
okay
elz tomz
elz tomz 2018 年 7 月 18 日
Thanks, image analyst..it works fine. You save ma time.

サインインしてコメントする。

その他の回答 (1 件)

Sagar V
Sagar V 2019 年 2 月 7 日
how to save the features of 100 images into .mat file to classifying using SVM

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by