Reputation: 5
How to concatenate many .YML
descriptor files into one .YML
file that contains all of them. I want to use Kmeans
for clustering the data.
Upvotes: 0
Views: 394
Reputation: 46
Have you tried load your *.YML files and save all the information to a new one.
What I suggest you to do is to code a FOR loop to open all your file and save the data into a new *.YML file unifying all your data in a single file.
Upvotes: 0
Reputation: 46
FileStorage fileToSave("your_new_file_here", FileStorage::WRITE);
for...
Mat dataToBeSave;
FileStorage 1("yourfilehere", FileStorage::READ);
f1["your_data_name"] >> dataToBeSave;
f1.release();
fileToSave << "your_tag_for_your_data" << dataToBeSave;
... //endfor
fileToSave.release();
Upvotes: 1