Python: cv.CreateImage(size, depth, channels)
size – Image width and height
depth – Bit depth of image elements
channels – Number of channels per pixel
上面是opencv官方的文档,三个参数:
新建图像的长宽尺寸,像素数如:1920*1080
像素的位深,能够描述图像的色彩数量,一般是8位或者16位深,IPL_DEPTH_8U 或者IPL_DEPTH_16U
单像素的通道数量,opencv支持1~4通道,1通道就是黑白图,由位深描述由黑到白的程度。3通道就是常规的RGB通道了