IplImage cvCreateImage

The IplImage object was inherited from the Intel Image Processing Library, in which the format is
native. OpenCV only supports a subset of possible IplImage formats.


nChannels Number of channels, int.通道的数目,一般为3
width Image width in pixels 图像宽度
height Image height in pixels
depth Pixel depth in bits. The supported depths are:
IPL_ DEPTH_8U Unsigned 8-bit integer 无符号8位整数

IPL_DEPTH_8S Signed 8-bit integer
IPL_DEPTH_16U Unsigned 16-bit integer
IPL_DEPTH_16S Signed 16-bit integer
IPL_DEPTH_32S Signed 32-bit integer
IPL_DEPTH_32F Single-precision floating point
IPL_DEPTH_64F Double-precision floating point
origin 0 - top-left origin, 1 - bottom-left origin (Windows bitmap style)
tostring() -> str Returns the contents of the CvMatND as a single string.

 

IplImage * cvCreateImage(CvSize size,int depth,int channels);

Example: IplImage * img = cvCreateImage(CvSize(600,480),IPL_DEPTH_8U,3);

                cvSet(img,CvScalar(255,255,255));

你可能感兴趣的:(opencv)