Size of Matrix OpenCV

后端 未结 5 931
遇见更好的自我
遇见更好的自我 2020-12-07 11:36

I know this might be very rudimentary, but I am new to OpenCV. Could you please tell me how to obtain the size of a matrix in OpenCV?. I googled and I am still searching, bu

5条回答
  •  心在旅途
    2020-12-07 12:20

    A complete C++ code example, may be helpful for the beginners

    #include 
    #include 
    #include "opencv/highgui.h"
    
    using namespace std;
    using namespace cv;
    
    int main()
    {
        cv:Mat M(102,201,CV_8UC1);
        int rows = M.rows;
        int cols = M.cols;
    
        cout<

提交回复
热议问题