close
如何新增屬性管理員設定可以參考這篇
接下來就是套用已經設定好的屬性管理員
檢視->其他視窗->屬性管理員
套用現有屬性管理員
Mat matA(1, 1, CV_8UC1, Scalar(1));
cout << "matA = " << endl << " " << matA << endl;
Mat matB(1, 1, CV_8UC2, Scalar(1,2));
cout << "matB = " << endl << " " << matB << endl;
Mat matC(1, 1, CV_8UC3, Scalar(1,2,3));
cout << "matC = " << endl << " " << matC << endl;
Mat matD(1, 1, CV_8UC4, Scalar(1,2,3));
cout << "自動補零 matD = " << endl << " " << matD << endl;
Mat matE(2, 2, CV_8UC3, Scalar(1,2,3));
cout << "matE = " << endl << " " << matE << endl;
Mat matF;
matF.create(2, 2, CV_8UC(2));
cout << "matF = " << endl << " " << matF << endl;
Mat matG = Mat::eye(3,3,CV_64F);
cout << "matG = " << endl << " " << matG << endl;
int sz[3] ={2,2,2};
Mat matH(3, sz, CV_8UC1, Scalar::all(0));
Mat matI = Mat::ones(1,3,CV_32F);
cout << "matI = " << endl << " " << matI << endl;
Mat matJ = Mat::zeros(3,1,CV_32F);
cout << "matJ = " << endl << " " << matJ << endl;
Mat matK = (Mat_<double>(3,3) << 1, 2, 3, 4, 5, 6, 7,8 ,9);
cout << "matH = " << endl << " " << matK << endl;
Mat matL = matK.row(1).clone();
cout << "matL = " << endl << " " << matL << endl;
Mat matM = matK.col(1).clone();
cout << "matM = " << endl << " " << matM << endl;
Mat matN = Mat(3, 2, CV_8UC3);
randu(matN, Scalar::all(100), Scalar::all(110));
cout << "matN = " << endl << matN << endl;
Point2f pt1(1,2);
cout << "pt1 = " << pt1 << endl << endl;
Point3f pt2(1,2,3);
cout << "pt2 = " << pt2 << endl << endl;
參考資料:
1. Load an image Using OpenCV2.4.9 with Visual Studio 2010
2. OpenCV with Visual Studio影像辨識處理
全站熱搜
留言列表