Specifications
Intel
®
Image Processing Library Reference Manual
13-8
13
UserProcessPixel
Calls user-defined function to
simultaneously process channel
values of pixels in an image.
void iplUserProcessPixel( IplImage*
srcImage
, IplImage*
dstImage
, IplUserFuncPixel
cbFunc
);
srcImage
Thesourceimage.
dstImage
The destination image.
cbFunc
The pointer to the user-defined function (of
IplUserFuncPixel type).
Discussion
Use the function iplUserProcessPixel() if you want to call your own
image processing function
cbFunc
of type IplUserFuncPixel that
performs point operations using all channel values of a pixel.
For each pixel to be processed, the function
iplUserProcessPixel()
creates arrays of source and destination pixel channel values, and calls the
function
cbFunc
, passing the pointers to these arrays as arguments. Thus,
all channel values of a source image pixel are processed simultaneously.
After processing by
cbFunc
, the results are placed into the respective pixel
channel values of the destination image
dstImage
without saturation.
When necessary, saturation should be provided by
cbFunc
.
On return from
cbFunc
, the function iplUserProcessPixel() checks
IplError() status to see if an error has occurred.
The source image can contain either integer data of 8-, 16-, 32-bit depth, or
floating-point 32f data. The bit depths and the number of channels in the
source and destination images may be different. The function
iplUserProcessPixel() supports tiled images and images with rectangle
ROI and mask ROI. The channel ROI is not supported, it must be provided
by the user function when necessary.