Opencv矩阵输出方式

#include
#include

using namespace std;
using namespace cv;

int main()
{
	Mat array(10, 3, CV_8UC3);
	randu(array, Scalar::all(0), Scalar::all(255));

	cout << "【默认风格】" << endl << array << endl << endl;

	cout << "【Python风格】" << endl << format(array, "python") << endl << endl;

	cout << "【逗号分隔风格】" << endl << format(array, "csv") << endl << endl;

	cout << "【Numpy风格】" << endl << format(array, "numpy") << endl << endl;

	cout << "【C语言风格】" << endl << format(array, "C") << endl << endl;

	return 0;
}

Opencv矩阵输出方式_第1张图片

你可能感兴趣的:(opencv学习之路)