一.各种初始化
1.Mat()
//1.Mat()
Mat p1 = Mat();
cout << p1;
namedWindow("output1");
// imshow("output1", p1);
运行结果:
若去掉、// imshow(“output1”, p1);的注释就会报错,(以后补充)
2.Mat(Size size, int type)
//2.Mat(Size size, int type)
Mat p2;
p2 = Mat(src.size(), src.type());
cout << src.size() << endl << src.type() << endl;
p2 = Scalar(0, 0, 255);
cout << p2 << endl;
namedWindow("output2");
imshow("output2", p2);