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

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

FilterBilateral

Performs bilateral filtering of an image.

Syntax

Case 1: Operation on pixel-order data

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep, Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R 32f_C1R 64f_C1R

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep, Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C3R 32f_C3R 64f_C3R

Case 2: Operation on planar data

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], int srcStep[3], Ipp<dstdatatype>* pDst[3], int dstStep[3], IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_P3R 32f_P3R 64f_P3R

Case 3: Operation on pixel-order data with platform-aware functions

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R_L 32f_C1R_L 64f_C1R_L

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C3R_L 32f_C3R_L 64f_C3R_L

Case 4: Operation on planar data with platform-aware functions

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], IppSizeL srcStep[3], Ipp<dstdatatype>* pDst[3], IppSizeL dstStep[3], IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_P3R_L 32f_P3R_L 64f_P3R_L

Case 5: Operation on pixel-order data with Threading Layer (TL) functions based on the Platform Aware API

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec_LT* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R_LT 32f_C1R_LT 64f_C1R_LT

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_LT* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C3R_LT 32f_C3R_LT 64f_C3R_LT

Case 6: Operation on planar data with Threading Layer (TL) functions based on the Platform Aware API

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], IppSizeL srcStep[3], Ipp<dstdatatype>* pDst[3], IppSizeL dstStep[3], IppiSizeL dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_LT* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_P3R_LT 32f_P3R_LT 64f_P3R_LT

Case 7: Operation on pixel-order data with Threading Layer (TL) functions based on the Classic API

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep, Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec_T* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R_T 32f_C1R_T 64f_C1R_T

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep, Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_T* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C3R_T 32f_C3R_T 64f_C3R_T

Case 8: Operation on planar data with Threading Layer (TL) functions based on the Classic API

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], int srcStep[3], Ipp<dstdatatype>* pDst[3], int dstStep[3], IppiSize dstRoiSize, IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_T* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_P3R_T 32f_P3R_T 64f_P3R_T

Include Files

ippi.h

ippi_l.h

ippi_tl.h

Domain Dependencies

Flavors declared in ippi.h:

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.

borderType

Type of border. Possible values are:

ippBorderConst

Values of all border pixels are set to constant.

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderInMem

Border is obtained from the source image pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise operation OR between ippBorderRepl and ippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight.

pBorderValue

Constant value to assign to pixels of the constant border. This parameter is applicable only to the ippBorderConst border type.

pSpec

Pointer to the bilateral context structure.

pBuffer

Pointer to the work buffer.

Description

This function applies the bilateral filter with a square kernel to the source image. The linear dimension of the kernel is defined in the initialization function FilterBilateralInit. The bilateral context structure contains the parameters of filtering.

Before using the ippiFilterBilateral function, compute the size of the bilateral context structure and the external buffer using the FilterBilateralGetBufferSize function and initialize the structure using the FilterBilateralInit function.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pSpec, or pBuffer is NULL.

ippStsSizeErr

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

ippStsContextMatchErr

Indicates an error when the pSpec structure does not match the function.

ippStsNotEvenStepErr

Indicates an error when one of the step values is not divisible by 4 for floating-point images.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

See Also