Developer Reference for Intel® Integrated Performance Primitives
Initializes the bilateral context structure.
IppStatus ippiFilterBilateralInit(IppiFilterBilateralType filter, IppiSize dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma, IppiFilterBilateralSpec* pSpec);
Platform-aware function
IppStatus ippiFilterBilateralInit_L(IppiFilterBilateralType filter, IppiSizeL dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma, IppiFilterBilateralSpec* pSpec);
Threading Layer (TL) function based on the Platform Aware API
IppStatus ippiFilterBilateralInit_LT(IppiFilterBilateralType filter, IppiSizeL dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma, IppiFilterBilateralSpec_LT* pSpec);
Threading Layer (TL) function based on the Classic API
IppStatus ippiFilterBilateralInit_T(IppiFilterBilateralType filter, IppiSize dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma, IppiFilterBilateralSpec_T* pSpec);
ippi.h
ippi_l.h
ippi_tl.h
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
filter |
Type of the bilateral filter. Possible value is ippiFilterBilateralGauss - Gaussian bilateral filter. | ||||||
dstRoiSize |
Size of the destination ROI in pixels. | ||||||
kernelWidthHeight |
Linear dimension of the square kernel. The value 1 corresponds to the distance between two adjacent pixels. | ||||||
dataType |
Data type of the source and destination images. Possible values are ipp8u, ipp32f, and ipp64f. | ||||||
numChannels |
Number of channels in the images. | ||||||
distMethod |
Method of defining the differences in intensity between pixels. Depending on the number of channels in the image, possible value are:
|
||||||
valSquareSigma |
Square of the range parameter, which controls smoothing based on the differences in intensity between pixels. | ||||||
posSquareSigma |
Square of the spatial parameter, which controls smoothing based on the geometric distance between pixels. | ||||||
pSpec |
Pointer to the bilateral context structure. |
This function initializes the bilateral context structure pSpecSize for bilateral filtering. Before using this function, compute the size of the context structure using the FilterBilateralGetBufferSize function.
The kernelWidthHeight parameter specifies the linear dimension of the square filter kernel. The value 1 corresponds to the distance between the centers of two adjacent pixels.
Coefficients of the bilateral filter kernel depend on their positions in the kernel and on the intensity value of the source image pixels lying in the kernel.
The value of the output pixel d is computed by the following formula:
For all indices i and j that fit within the square kernel
where
vij is the value (or channel values) of a pixel in the kernel with coordinates i and j
w1ij=Fun(valSquareSigma, Intensity Distance(vij, v00))
The distMethodType parameter specifies the method of defining the differences in intensity between pixels. FilterBilateral functions support two methods: ippDistNormL1, which defines the difference in intensity as the L1-norm, and ippDistNormL2, which defines the difference in intensity as the L2-norm.
w2ij=Fun(posSquareSigma, Geometric Distance(vij, v00)=sqrt(i*i+j*j))
Fun(S, I)=exp(-I*I/2*S)
where
S is valSquareSigma or posSquareSigma
I is the difference between pixel values or position
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error when pSpec is NULL. |
ippStsSizeErr |
Indicates an error when dstRoiSize has a field with a zero or negative value. |
ippStsMaskSizeErr |
Indicates an error whenkernelWidthHeight is less than, or equal to zero. |
ippStsNotSupportedModeErr |
Indicates an error when the filter or distMethod value is not supported. |
ippStsBadArgErr |
Indicates an error when valSquareSigma or posSquareSigma is less than, or equal to zero. |
ippStsNumChannelsErr |
Indicates an error when numChannels has an illegal value. |