Ask Your Question

elfis's profile - activity

2019-01-29 05:02:58 -0500 received badge  Notable Question (source)
2017-02-23 23:50:01 -0500 received badge  Popular Question (source)
2013-07-02 05:55:45 -0500 received badge  Supporter (source)
2013-07-02 05:53:11 -0500 commented answer Save a vector<Mat> to a file and read it back in c++

Finally i prefered to store images as images (imwrite/imread). But which is the best format(pgm, png, etc) and compression to store the images so later the recognition works accurate?

2013-07-02 05:49:41 -0500 received badge  Scholar (source)
2013-05-28 14:35:21 -0500 received badge  Editor (source)
2013-05-28 14:33:25 -0500 asked a question Save a vector<Mat> to a file and read it back in c++

Hello, i am developing a face recognition application and i want to store a vector<mat> with faces to a file. Then, when the application starts, i want to read it back and fill the vector with the faces. I am doing this way because the FaceRecognizer model, does not support update (only the FaceRecognizer.LBPH supports it) and i am working with Eigenfaces and Fisherfaces. I tried to store it in a txt

std::ofstream output_file("./ppFaces.txt");
std::ostream_iterator<Mat> output_iterator(output_file, "\n");
std::copy(preprocessedFaces.begin(), preprocessedFaces.end(), output_iterator);

but when i read it back, the vector does not filled correct. Any ideas?