Specifications

Image Arithmetic and Logical Operations
5-21
5
If
alphaImageA
and
alphaImageB
are both NULL, then the internal
alpha channels of the two input images specified by their respective
IplImage headers are used. The application has to ensure that these
are set to the proper channel number prior to calling this function. If
srcImageB
does not have an alpha channel, then its alpha value is set
to (1 - α
A
)whereα
A
is the scaled alpha value of image
srcImageA
in
the range 0 to 1.
If both alpha images
alphaImageA
and
alphaImageB
are not NULL,
then they are used as the alpha values for the two input images. If
alphaImageB
is NULL, then its alpha value is set to (1 - α
A
)whereα
A
is the scaled alpha value of image
alphaImageA
in the range 0 to 1.
It is an error if none of the above conditions is satisfied.
If
alphaImageDst
is not NULL, then the resultant alpha values are written
to it. If it is
NULL and the output image
imageDst
contains an alpha
channel (specified by the
IplImage header), then it is set to the resulting
alpha values.
The function
iplAlphaCompositeC() is used to specify constant alpha
values α
A
and α
B
to be used for the two input images (usually[α
B
is set to
the value 1 - α
A
). The resultant alpha values (also constant) are not saved.
The type of compositing is specified by the argument
compositeType
which can assume the values shown in Table 5-2.
The functions iplAlphaCompositeC() and iplAlphaCompositeC()
can be used for unsigned pixel data only. They support ROI, mask ROI and
tiling.