Mat类分有两个部分:矩阵头和指向矩阵数据部分的指针
Mat类的属性:
Mat类的方法:
【参考】
https://www.cnblogs.com/faith0217/articles/4708877.html
【案例】
Mat kernel = (Mat_<char>(2, 3) << 0, -1, 0,-1, 5, -1); cout << kernel << endl; cout << kernel.rows << endl; cout << kernel.cols << endl; cout << kernel.size()<<endl; cout << kernel.channels() << endl; cout << kernel.dims << endl; waitKey(); return 0;
原文:https://www.cnblogs.com/xixixing/p/11851342.html