1 Mat 类:
1.1 img.data:是uchar类型的指针,eg: uchar *p=img.data. p指针指向图像矩阵的入口地址。
1.2 img.step: 图像每行所占的字节数,例如3*3的3通道depth为8的uchar图像,则img.step=9字节.
1.3 type: eg: CV_8UC3 ,depth=8,channel=3,其他类似。
1 Mat 类:
1.1 img.data:是uchar类型的指针,eg: uchar *p=img.data. p指针指向图像矩阵的入口地址。
1.2 img.step: 图像每行所占的字节数,例如3*3的3通道depth为8的uchar图像,则img.step=9字节.
1.3 type: eg: CV_8UC3 ,depth=8,channel=3,其他类似。