Fix for (Bug #2789)
Add MatlabFormatter for matlab style output. See http://code.opencv.org/issues/2789
This commit is contained in:
@@ -17,8 +17,8 @@ static void help()
|
||||
<< "\n------------------------------------------------------------------\n"
|
||||
<< " This program shows the serial out capabilities of cv::Mat\n"
|
||||
<< "That is, cv::Mat M(...); cout << M; Now works.\n"
|
||||
<< "Output can be formated to OpenCV, python, numpy, csv and C styles"
|
||||
<< "Usage:\n"
|
||||
<< "Output can be formated to OpenCV, matlab, python, numpy, csv and \n"
|
||||
<< "C styles Usage:\n"
|
||||
<< "./cvout_sample\n"
|
||||
<< "------------------------------------------------------------------\n\n"
|
||||
<< endl;
|
||||
@@ -36,6 +36,7 @@ int main(int,char**)
|
||||
randu(r, Scalar::all(0), Scalar::all(255));
|
||||
|
||||
cout << "r (default) = \n" << r << ";" << endl << endl;
|
||||
cout << "r (matlab) = \n" << format(r, Formatter::FMT_MATLAB) << ";" << endl << endl;
|
||||
cout << "r (python) = \n" << format(r, Formatter::FMT_PYTHON) << ";" << endl << endl;
|
||||
cout << "r (numpy) = \n" << format(r, Formatter::FMT_NUMPY) << ";" << endl << endl;
|
||||
cout << "r (csv) = \n" << format(r, Formatter::FMT_CSV) << ";" << endl << endl;
|
||||
|
Reference in New Issue
Block a user