How do I convert a cv::Mat of type CV_32FC1 to the type CV_64FC1 (equivalent to a change from float to double)?
I am opening a Matrix that was saved as XML (cvSave
cvSave
Okay, I'm a dimwit. Here is how it goes:
There is the function convertTo that does exactly what I want.
Thanks for matrix type conversion in opencv for pointing this out.
Here is how I do it:
cv::Mat A = loadMat("mymat.xml"); // See function loadMat in the question! A.convertTo(A, CV_64F);