I want to compare matrices created from OpenCV with the ones in Matlab. If the matrices are uint8, Saving them as pgm images would do the trick. But my matrices are CV_64FC1 (double) that can't be saved as images. Is there any easy way to save my double matrix for reading in Matlab?
Try this one from OpenCV samples.
Mat r
std::stringstream ss;
ss << format(r,"csv") << endl << endl;
myFile << ss.str();
// or even this
myFile << format(r,"csv") << endl << endl;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With