tags:

views:

260

answers:

1

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?

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

seems to do the trick!

Can Bal