简体   繁体   中英

Creating Feature vector in .mat file for training dataset

I wanted to create a feature vector for training dataset and wanted to store all feature as rows in the.mat file. The .mat file must be in the form Feature Vector . I am able to extract Feature of 1 image and store it in excel file or .mat file but not able to extract all image feature and store it in .mat file. Can anyone knows this?

Its something like appending the same variables in the same .mat file. I have tried

save('feat.mat','feature','-append'); 

Where 'feature' is an array

feature = [mydata, stats{k}];

I have a folder which contains images who's feature I wanted to extract and store as training dataset. Any help will be appreciated.

the code was rectified.

stats = graycoprops(GLCM_values{'contrast','homogeneity','Correlation','Energy'});

stats was a structure so converted into the array using

features=struct2array(stats);

and was able to save the features

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM