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

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

Filter

Filters an image using a general rectangular kernel.

Syntax

IppStatus ippiFilter_64f_C1R(const Ipp64f* pSrc, int srcStep, Ipp64f* pDst, int dstStep, IppiSize dstRoiSize, const Ipp64f* pKernel, IppiSize kernelSize, IppiPoint anchor, Ipp8u* pBuffer);

Include Files

ippi.h

Domain Dependencies

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

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

Parameters

pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines in the destination image.

dstRoiSize

Size of the source and destination ROI in pixels.

pKernel

Pointer to the kernel values.

kernelSize

Size of the rectangular kernel in pixels.

anchor

Anchor cell specifying the rectangular kernel alignment with respect to the position of the input pixel.

pBuffer

Pointer to the work buffer.

Description

This function operates with ROI.

The ippiFilter function uses the general rectangular kernel of kernelSize size to filter an image ROI. This function sums the products of the kernel coefficients pKernel and pixel values taken over the source pixel neighborhood defined by kernelSize and anchor. The anchor cell is specified by its coordinates anchor.x and anchor.y in the coordinate system associated with the bottom right corner of the kernel.

Kernel coefficients are used in inverse order. The sum is written to the destination pixel.

To ensure valid operation when image boundary pixels are processed, the application should correctly define additional border pixels (see Borders in Neighborhood Operations).

This function requires a temporary work buffer. Before using this function flavor, you need to compute the buffer size using the ippiFilterGetBufSize function.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, or pKernel is NULL.

ippStsSizeErr

Indicates an error when dstRoiSize or kernelSize has a field with a zero or negative value.

ippStsDivisorErr

Indicates an error when the divisor has a zero value.

ippStsStepErr

Indicates an error when:
  • srcStep is less than (roiSize.width + kernelSize.width)*sizeof(Ipp64f)

  • dstStep is less than roiSize.width*sizeof(Ipp64f)