Best method to save and load data in a file for opencv 3.1 version
I have <vector<mat> > test; I want to save it to file and read it back. I tried to write it to a FileStorage, but after I read it back, it became fails. Does anybody have an idea? Thanks.
Have you checked this? https://docs.opencv.org/3.0-beta/doc/...
link in master is better https://docs.opencv.org/master/dd/d74... or in 3.1 https://docs.opencv.org/3.1.0/dd/d74/...
I have checked this link. But it make confuse me. Can you tell me that how can i save data to .xml file from "vector<mat> preprocessedFaces" variable and how can load data from file to this variable.
I have tried for .txt file.But did not used filestorage class.
If you can provide steps,it will great for me.
I have used these Miki's line of codes. But it gives error when try to read data from the file.
@kishan patel if you've got problem wuth miki code's you should ask to miki.
About xml it's in tutorial :
Okay LBerger. But i could not contact with him. If you got any correction from above lines of codes.Let me inform.
you cannot save a vector<mat> in one file using matwrite. To read it is preprocessedFaces.push_back(matread("train_data.txt")); you will get 10 images preprocessedFaces but always same image
Okay. So how can i save that type of data and load it after to that type of data-variable.