0

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?

1 Answer 1

2
CvMat* my_matrix;
my_matrix = (CvMat*)cvLoad("filename.yml");

seems to do the trick!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.