Specifications
Image Creation and Access
4-17
4
CheckImageHeader
Validates field values of
an existing image
header structure.
IPLStatus iplCheckImageHeader ( const IplImage*
hdr
)
hdr
Pointer to an image header structure
Discussion
The function iplCheckImageHeader() checks whether the IplImage
header structure of an image has valid field values, and returns the
corresponding status code. This function works on the assumption that the
referenced image contains non-empty data. Many image processing
functions in Image Processing Library call
iplCheckImageHeader() to
verify that the image information is correct. You can also use this function
in your application to check that some imported image data, not created by
Image Processing Library functions but referenced in the
IplImage
header, has the valid header structure.
The following main status codes can be returned by the
iplCheckImageHeader() function (see Image Header and Attributes for
the explanation of image header fields):
IPL_StsOK Indicates no errors in image header structure.
IPL_HeaderIsNull Indicates an error condition if the
hdr
pointer to
the image header is NULL.
IPL_BadDataPtr Indicates an error condition if a non-tiled image
has NULL
imageData pointer.
IPL_BadImageSize Indicates an error condition if a non-tiled image
has negative or zero
imageSize.
IPL_BadStep Indicates an error condition if a non-tiled image
has negative or zero
widthStep.