imshow & 图像深度

https://blog.csdn.net/qq_39642978/article/details/95926315

https://www.cnblogs.com/Xiaoyan-Li/p/5674792.html

图像深度对应值:

#define CV_8U 0
#define CV_8S 1
#define CV_16U 2
#define CV_16S 3
#define CV_32S 4
#define CV_32F 5
#define CV_64F 6
#define CV_USRTYPE1 7

查看方式: img.depth()

像素归一化

8-bit unsigned: 显示图像本来的样子;
16-bit unsigned / 32-bit integer: 用像素值除以256,取值范围由[0,255x256]变为[0,255];
32-bit floating-point: 像素值乘以255, 取值范围由[0,1]变为[0,255]。

 

posted @ 2019-10-29 10:35  kuaqi  阅读(209)  评论(0编辑  收藏  举报