I want to compare matrices created from OpenCV with those in Matlab. If the matrices are uint8, saving them as pgm images will do the trick. But my matrices are CV_64FC1 (double), which cannot be saved as images. Is there an easy way to save my dual matrix for reading in matlab?
Try this 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;
Just write the intensity of each pixel to a file and read it with MATLAB with importdata .
importdata
Source: https://habr.com/ru/post/1437426/More articles:Problems starting MWC application for WP7 - xamarinwhy is javascript date behind an hour? - javascriptStoring an array in JSON - javaProblem with Chrome, tabindex and switches - google-chromeJava - using JScrollPane - javagetURI shows JSP name not browser url? - jspHow to get a list of custom data types in Sybase ASE? - sqlUsing volatile to secure overflow tape - javaAutocomplete doesn't work when the first character is 0 - jqueryhow to fix a problem with Viewport when switching from landscape to portrait - iosAll Articles