Reputation: 1583
Using OpenCV, saving a CvMat structure into a YAML file on the disk is easy with
CvMat* my_matrix = cvCreateMat( row_no, col_no, CV_32FC1 );
cvSave("filename.yml", my_matrix);
However, I couldn't find an easy way to read the saved files back from the disk. Is there function in OpenCV that can handle this and create a CvMat structure from a YAML file?
Upvotes: 0
Views: 2328
Reputation: 1583
CvMat* my_matrix;
my_matrix = (CvMat*)cvLoad("filename.yml");
seems to do the trick!
Upvotes: 2