Visible to Intel only — GUID: GUID-601D681D-65D4-4C03-A0C3-99BF085102E9
Visible to Intel only — GUID: GUID-601D681D-65D4-4C03-A0C3-99BF085102E9
AlphaComp
Combines two images using alpha (opacity) values of both images.
Syntax
Case 1: Not-in-place operation
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:
8u_AC1R |
16u_AC1R |
16s_AC4R |
32u_AC1R |
32s_AC1R |
32f_AC1R |
8u_AC4R |
16u_AC4R |
16s_AC1R |
32u_AC4R |
32s_AC4R |
32f_AC4R |
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* const pSrc1[4], int src1Step, const Ipp<datatype>* const pSrc2[4], int src2Step, Ipp<datatype>* const pDst[4], int dstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:
8u_AP4R |
16u_AP4R |
Case 2: In-place operation
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:
8u_AC4IR |
16u_AC4IR |
16s_AC4IR |
32u_AC4IR |
32s_AC4IR |
32f_AC4IR |
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep, Ipp<datatype>* const pSrcDst[4], int srcDstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:
8u_AP4IR |
16u_AP4IR |
Include Files
ippi.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Parameters
pSrc, pSrc1, pSrc2 |
Pointers to the source image ROI for pixel-order data. An array of pointers to ROI in the separate source color planes in case of planar data. |
srcStep, src1Step, src2Step |
Distances, in bytes, between the starting points of consecutive lines in the source images. |
pSrcDst |
Pointer to the source and destination buffer or an array of pointers to separate source and destination color planes for in-place operation. |
pDst |
Pointer to the destination image ROI for pixel-order data. An array of pointers to ROI in the separate destination color planes in case of planar data. |
srcDstStep |
Distance, in bytes, between the starting points of consecutive lines in the source and destination image for in-place operation. |
dstStep |
Distance, in bytes, between the starting points of consecutive lines in the destination image. |
roiSize |
Size of the source and destination ROI, in pixels. |
alphaType |
The composition type to perform. See Table “Possible Values of the Parameter alphaType” for the type value and description. |
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs an image compositing operation on RGBA images using alpha values of both images. The compositing is done by overlaying pixels (rA, gA,bA, αA) from the foreground image pSrc1 with pixels (rB,gB,bB, αB) from the background image pSrc2 to produce pixels (rC,gC,bC, αC) in the resultant image pDst. The alpha values are assumed to be normalized to the range [0..1].
The type of the compositing operation is indicated by the alphaType parameter. Use Table “Possible Values of the Parameter alphaType” to choose a valid alphaType value depending on the required composition type. For example, the resulting pixel color components for the OVER operation (see Table “Types of Image Composing Operations”) are computed as follows:
rC = αA * rA +(1 - αA)* αB *rB
gC = αA * gA +(1 - αA)* αB *gB
bC = αA * bA +(1 - αA)* αB *bB
The resulting (normalized) alpha value is computed as
αC = αA +(1 - αA)* αB
This function can be used for unsigned pixel data only.
Return Values
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with zero or negative value. |