Opencv_Mat操作

參考:https://blog.csdn.net/qq_18150255/article/details/90648407?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task

 

Mat理解:

Mat頭和數據區域

淺複製:

Mat A, C;                          // creates just the header parts
A = imread(argv[1], IMREAD_COLOR); // here we'll know the method used (allocate matrix)
Mat B(A);                                 // Use the copy constructor
C = A;                                    // Assignment operator
Mat D (A, Rect(10, 10, 100, 100) ); // using a rectangle
Mat E = A(Range::all(), Range(1,3)); // using row and column boundaries

深複製:

Mat F = A.clone();
Mat G;
A.copyTo(G);

 

Mat初始化操作

 

 

 

 

 Mat輸出

 其它數據操作(Point2f

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章