文章目录 5 Mat赋值 5.1 Mat(int rows, int cols, int type, const Scalar& s) 5.2 数组赋值 或直接赋值 5.2.1 3*3 单通道 img 5.2.2 3*3 双通道 img 5.2.3 3*3 三通道 img 5 Mat赋值 5.1 Mat(int rows, int cols, int type, const Scalar& s) Mat m(3, 3, CV_8UC3,Scalar(255, 0, 0); cout << endl << m << endl