opencv学习笔记(二)--Mat的深度解析

  • 构造函数:
    (1)Mat();
    (2)Mat(int rows, int cols, int type);
    (3)Mat(Size size, int type);
    (4)Mat(int rows, int cols, int type, const Scalar& s);
    (5)Mat(Size size, int type, const Scalar& s);
    //高维矩阵
    (6)Mat(int ndims, const int* sizes, int type);
    (7)Mat(const std::vector& sizes, int type);
    (8)Mat(int ndims, const int* sizes, int type, const Scalar& s);
    (9) Mat(const std::vector& sizes, int type, const Scalar& s);
    (10) Mat(const Mat& m);
    // 高效方式:just initialize the matrix header that points to the specified data
    //step:每一行的大小,即colselemSize()+sizeof(padding)
    (11) Mat(int rows, int cols, int type, void
    data, size_t step=AUTO_STEP);
    (12)Mat(Size size, int type, void* data, size_t step=AUTO_STEP);
    (13)Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
    (15) Mat(const std::vector& sizes, int type, void* data, const size_t* steps=0);
    //ROI形式
    (16) Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());//行默认全包括
    (17) Mat(const Mat& m, const Rect& roi);
    (18)Mat(const Mat& m, const Range* ranges);
    (19) Mat(const Mat& m, const std::vector& ranges);

  • 析构函数
    ~Mat();

  • 重载操作符
    Mat& operator = (const Mat& m);

猜你喜欢

转载自blog.csdn.net/Ephemeroptera/article/details/84102451
今日推荐