Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

CompColorKey

Performs color keying of two images.

Syntax

Case 1: Operation on one-channel data

IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> colorKey);

Supported values for mod:

8u_C1R 16u_C1R 16s_C1R

Case 2: Operation on multi-channel data

IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> colorKey[3]);

Supported values for mod:

8u_C3R 16u_C3R 16s_C3R

IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> colorKey[4]);

Supported values for mod:

8u_C4R 16u_C4R 16s_C4R

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc1, pSrc2

Pointer to the source images ROI.

src1Step, src2Step

Distances in bytes between starts of consecutive lines in the source images.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

colorKey

Value of the key color for 1-channel images, array of color values for multi-channel images.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function replaces all areas of the source image pSrc1 containing the specified key color colorKey with the corresponding pixels of the background image pSrc2 and stores the result in the destination image pDst.

The Figure Applying the Function ippiCompColorKey to Sample Images shows an example of how the function ippiCompColorKey works.

Applying the Function ippiCompColorKey to Sample Images



Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or negative value.

ippStsStepErr

Indicates an error condition if one of the step values is less than or equal to 0.