Opencv中的Mat类型常用函数数据

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wuguanghao/article/details/77324593

Type包括
CV_8U(0-255)8位无符号
CV_8S(-128-127)8位有符号
CV_16U(0-65535)16位无符号
CV_16S(-32768,32767)16位有符号
CV_32S 32位有符号
CV_32F 32位浮点型

 //! returns a new matrix header for the specified row
    Mat row(int y) const;

这里是获取某一行的数据

 //! returns a new matrix header for the specified row
    Mat col(int y) const;

这里是获取某一列的数据

 //! ... for the specified row span
    Mat rowRange(int startrow, int endrow) const;

这个是获取N行的数据,从start到end

 uchar* ptr(int i0=0);

这里是获取行指针

//! pointer to the data
uchar* data;
这里是获取数据的指针

猜你喜欢

转载自blog.csdn.net/wuguanghao/article/details/77324593
今日推荐