Specifications

User Defined Functions
13-7
13
UserProcessFP
Calls user-defined function
to separately process each
channel value of pixels in
images with all data types.
void iplUserProcessFP( IplImage*
srcImage
, IplImage*
dstImage
, IplUserFuncFP
cbFunc
);
srcImage
Thesourceimage.
dstImage
The destination image.
cbFunc
The pointer to the user-defined function (of
IplUserFuncFP type).
Discussion
The function iplUserProcessFP() scans pixels of a source image
srcImage
, retrieves respective channel values, and passes them to the user-
defined function
cbFunc
for processing. The source image can contain
either integer data of 8-, 16-, 32-bit depth, or floating-point 32f data.
Before passing channel values to
cbFunc
, the function
iplUserProcessFP() converts them to float type.
After processing by
cbFunc
, the returned values are saturated to the
destination data range (except the case of 32f image data), and written to
the respective channel of the destination image
dstImage
.
The function
iplUserProcessFP() supports tiled images and images with
rectangle ROI and mask ROI. The operations can be performed in-place.
The source and destination images must contain data of the same bit depth
and have the same number of processed channels.