IplImage
struct IplImage
IPL image header
int nSize sizeof(IplImage)
int ID Version, always equals 0
int nChannels Number of channels. Most OpenCV functions support 1-4 channels.
int alphaChannel Ignored by OpenCV int depth Channel depth in bits + the optional sign bit ( IPL_DEPTH_SIGN ). The supported depths are: • IPL_DEPTH_8U - unsigned 8-bit integer. Equivalent to CV_8U in matrix types. • IPL_DEPTH_8S - signed 8-bit integer. Equivalent to CV_8S in matrix types. • IPL_DEPTH_16U - unsigned 16-bit integer. Equivalent to CV_16U in matrix types. • IPL_DEPTH_16S - signed 8-bit integer. Equivalent to CV_16S in matrix types. • IPL_DEPTH_32S - signed 32-bit integer. Equivalent to CV_32S in matrix types. • IPL_DEPTH_32F - single-precision floating-point number. Equivalent to CV_32F in matrix types. • IPL_DEPTH_64F - double-precision floating-point number. Equivalent to CV_64F in matrix types. char[] colorModel Ignored by OpenCV.
char[] channelSeq Ignored by OpenCV
int dataOrder 0 = IPL_DATA_ORDER_PIXEL - interleaved color channels, 1 - separate color channels. CreateImage() only creates images with interleaved channels. For example, the usual layout of a color image is: b00g00r00b10g10r10... int origin 0 - top-left origin, 1 - bottom-left origin (Windows bitmap style) int align Alignment of image rows (4 or 8). OpenCV ignores this and uses widthStep instead. int width Image width in pixels
2.2. Basic C Structures and Operations 51
The OpenCV Reference Manual, Release 2.3
int height Image height in pixels
IplROI* roi Region Of Interest (ROI). If not NULL, only this image region will be processed.
IplImage* maskROI Must be NULL in OpenCV
void* imageId Must be NULL in OpenCV
void* tileInfo Must be NULL in OpenCV int imageSize Image data size in bytes.
For interleaved data, this equals image->height·image->widthStep
char* imageData A pointer to the aligned image data.
Do not assign imageData directly. Use SetData().
int widthStep The size of an aligned image row, in bytes.
int[] BorderMode Border completion mode, ignored by OpenCV
int[] BorderConst Constant border value, ignored by OpenCV
char* imageDataOrigin A pointer to the origin of the image data (not necessarily aligned). This is used for image deallocation.
The IplImage is taken from the Intel Image Processing Library,in which the format is native. OpenCV only supports a subset of possible IplImage formats, as outlined in the parameter list above. In addition to the above restrictions, OpenCV handles ROIs differently. OpenCV functions require that the image size or ROI size of all source and destination images match exactly. On the other hand, the Intel Image Processing Library processes the area of intersection between the source and destination images (or ROIs), allowing them to vary independently.