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?
Mostra commenti meno recenti
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 Commento
maida
il 2 Gen 2018
Risposte (1)
Image Analyst
il 5 Gen 2018
0 voti
"How to add classes number to a mat file?"
Use save() to save variables into a .mat file.
Categorie
Scopri di più su Import, Export, and Conversion in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!