opencv_mat_create
1.Mat的创建
Mat::create(int rows,int cols,int type)
Mat::create(Size size,int type)
Mat::create(int ndims,const int* sizes,inttype)
参数
ndims – 新数组的维数。
rows –新的行数。
cols – 新的列数。
size – 替代新矩阵大小规格:Size(cols, rows)。
sizes – 指定一个新的阵列形状的整数数组。
type – 新矩阵的类型。
比如:
dst.create(src.size(), src.type());
dst.create(src.rows, src.cols, src.type());
数据存储
Mat_ 对应的是CV_8U :8-bit unsigned integers ( 0..255 )
Mat_ 对应的是CV_8S:( -128..127 )
Mat_对应的是CV_16U( 0..65535 )
Mat_对应的是CV_32S:( -2147483648..2147483647 )
Mat_对应的是CV_32F:32-bit floating-point numbers ( -FLT_MAX..FLT_MAX, INF, NAN )
Mat_对应的是CV_64F ( -DBL_MAX..DBL_MAX, INF, NAN )
opencv_mat_create
最新推荐文章于 2024-07-25 20:33:09 发布