C++ 格式()中int fmt的值

C++ 格式()中int fmt的值,c++,printing,outputstream,opencv3.0,C++,Printing,Outputstream,Opencv3.0,目前使用OpenCV3,但在OpenCV2中,有一种格式化矩阵输出的方法。它在教程中使用 format函数似乎已从OpenCV2中的格式(mat,str)更改为OpenCV3中的格式(mat,int)。拨打此电话: cout << "4x4: " << endl << format(fourByFour, "python") << endl; cout刚刚查看了GitHub上的代码,您要查找的常量似乎是cv::Formatter::FMT_PYT

目前使用OpenCV3,但在OpenCV2中,有一种格式化矩阵输出的方法。它在教程中使用

format函数似乎已从OpenCV2中的格式(mat,str)更改为OpenCV3中的格式(mat,int)。拨打此电话:

cout << "4x4: " << endl << format(fourByFour, "python") << endl;

cout刚刚查看了GitHub上的代码,您要查找的常量似乎是
cv::Formatter::FMT_PYTHON
。您可以看到代码。

刚刚查看了GitHub上的代码,您正在查找的常量似乎是
cv::Formatter::FMT_PYTHON
。你可以看到代码

error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]      
/usr/local/include/opencv2/core/operations.hpp:371:16: note: initializing argument 2 of ‘cv::Ptr<cv::Formatted>cv::format(cv::InputArray, int)Ptr<Formatted> format(InputArray mtx, int fmt)