Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

AbsDiff

Calculates absolute difference between two images.

Syntax

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

Supported values for mod:

8u_C1R

16u_C1R

32f_C1R

8u_C3R

 

 

Include Files

ippcv.h

Domain Dependencies

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

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

Parameters

pSrc1

Pointer to the first source image.

src1Step

Distance in bytes between starts of consecutive lines in the first source image.

pSrc2

Pointer to second source image.

src2Step

Distance in bytes between starts of consecutive lines in the second source image.

pDst

Pointer to the destination image.

dstStep

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

roiSize

Size of the image ROI in pixels.

Description

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

This function calculates the absolute pixel-wise difference between two images by the formula:

pDst(x,y) = abs(pSrc1(x,y) - pSrc2(x,y)).

Return Values

ippStsNoErr

Indicates no 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 zero or negative value.

ippStsStepErr

Indicates an error when src1Step, src2Step or dstStep is less than roiSize.width * <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if one of step values for floating-point images cannot be divided by 4.