How to add classes number to a mat file containing feature vector of each image in a row, lets say 25 images therefore matfile having total 25 rows?
Afficher commentaires plus anciens
i am writing a code to classify 5 classes, each class have 10 images.
1. i am first extracting their feature vectors and saving them in a mat file.
2. i am saving them in row wise manner each image feature vector occupy one row, therefore there are total 5*10= 50 rows of feature vectors indicating each image (total 50 images).
3. as i have 5 classes, i want to add a class number with each feature vector. For example first 10 images belongs to class 1, next 10 images belongs to class 2 and then next 10 images belongs to class 3 and so on... the format would be like below:
class FeatureVector
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
1 #some value
2 #some value (below would be 9 more classes of 2 and after that 10 classes belongs to 3 and so on)
how can i do that???
1 commentaire
maida
le 2 Jan 2018
Réponses (1)
Image Analyst
le 5 Jan 2018
0 votes
"How to add classes number to a mat file?"
Use save() to save variables into a .mat file.
Catégories
En savoir plus sur Import, Export, and Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!