NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.2.1.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
FilterBilateralGaussBorder

Filters the image using a bilateral Gaussian filter kernel with border control. More...

Functions

NppStatus nppiFilterBilateralGaussBorder_8u_C1R_Ctx (const Npp8u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp8u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 Single channel 8-bit unsigned bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_8u_C1R (const Npp8u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp8u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 
NppStatus nppiFilterBilateralGaussBorder_8u_C3R_Ctx (const Npp8u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp8u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 Three channel 8-bit unsigned bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_8u_C3R (const Npp8u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp8u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 
NppStatus nppiFilterBilateralGaussBorder_16u_C1R_Ctx (const Npp16u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp16u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 Single channel 16-bit unsigned bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_16u_C1R (const Npp16u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp16u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 
NppStatus nppiFilterBilateralGaussBorder_16u_C3R_Ctx (const Npp16u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp16u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 Three channel 16-bit unsigned bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_16u_C3R (const Npp16u *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp16u *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 
NppStatus nppiFilterBilateralGaussBorder_32f_C1R_Ctx (const Npp32f *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 One channel 32-bit floating-point bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_32f_C1R (const Npp32f *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 
NppStatus nppiFilterBilateralGaussBorder_32f_C3R_Ctx (const Npp32f *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType, NppStreamContext nppStreamCtx)
 Three channel 32-bit floating-point bilateral Gauss filter with border control. More...
 
NppStatus nppiFilterBilateralGaussBorder_32f_C3R (const Npp32f *pSrc, Npp32s nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, Npp32s nDstStep, NppiSize oSizeROI, const int nRadius, const int nStepBetweenSrcPixels, const Npp32f nValSquareSigma, const Npp32f nPosSquareSigma, NppiBorderType eBorderType)
 

Detailed Description

Filters the image using a bilateral Gaussian filter kernel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

For this filter the anchor point is always the central element of the kernel. Coefficients of the bilateral filter kernel depend on their position in the kernel and on the value of some source image pixels overlayed by the filter kernel. Only source image pixels with both coordinates divisible by nDistanceBetweenSrcPixels are used in calculations.

The value of an output pixel $d$ is

\[d = \frac{\sum_{h=-nRadius}^{nRadius}\sum_{w=-nRadius}^{nRadius}W1(h,w)\cdot W2(h,w)\cdot S(h,w)}{\sum_{h=-nRadius}^{nRadius}\sum_{w=-nRadius}^{nRadius}W1(h,w)\cdot W2(h,w)}\]

where h and w are the corresponding kernel width and height indexes, S(h,w) is the value of the source image pixel overlayed by filter kernel position (h,w), W1(h,w) is func(nValSquareSigma, (S(h,w) - S(0,0))) where S(0,0) is the value of the source image pixel at the center of the kernel, W2(h,w) is func(nPosSquareSigma, sqrt(h*h+w*w)), and func is the following formula

\[func(S,I) = exp(-\frac{I^2}{2.0F\cdot S^2})\]

Currently only the NPP_BORDER_REPLICATE border type operations are supported.

Common parameters for nppiFilterBilateralGaussBorder functions include:

Parameters
pSrcSource-Image Pointer.
nSrcStepSource-Image Line Step.
oSrcSizeSource image width and height in pixels relative to pSrc.
oSrcOffsetThe pixel offset that pSrc points to relative to the origin of the source image.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
nRadiusThe radius of the round filter kernel to be used. A radius of 1 indicates a filter kernel size of 3 by 3, 2 indicates 5 by 5, etc. Radius values from 1 to 32 are supported.
nStepBetweenSrcPixelsThe step size between adjacent source image pixels processed by the filter kernel, most commonly 1.
nValSquareSigmaThe square of the sigma for the relative intensity distance between a source image pixel in the filter kernel and the source image pixel at the center of the filter kernel.
nPosSquareSigmaThe square of the sigma for the relative geometric distance between a source image pixel in the filter kernel and the source image pixel at the center of the filter kernel.
eBorderTypeThe border type operation to be applied at source image border boundaries.
nppStreamCtxApplication Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes

Function Documentation

NppStatus nppiFilterBilateralGaussBorder_16u_C1R ( const Npp16u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp16u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_16u_C1R_Ctx ( const Npp16u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp16u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

Single channel 16-bit unsigned bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.

NppStatus nppiFilterBilateralGaussBorder_16u_C3R ( const Npp16u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp16u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_16u_C3R_Ctx ( const Npp16u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp16u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

Three channel 16-bit unsigned bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.

NppStatus nppiFilterBilateralGaussBorder_32f_C1R ( const Npp32f pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_32f_C1R_Ctx ( const Npp32f pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

One channel 32-bit floating-point bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.

NppStatus nppiFilterBilateralGaussBorder_32f_C3R ( const Npp32f pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_32f_C3R_Ctx ( const Npp32f pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

Three channel 32-bit floating-point bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.

NppStatus nppiFilterBilateralGaussBorder_8u_C1R ( const Npp8u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp8u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_8u_C1R_Ctx ( const Npp8u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp8u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

Single channel 8-bit unsigned bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.

NppStatus nppiFilterBilateralGaussBorder_8u_C3R ( const Npp8u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp8u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType 
)
NppStatus nppiFilterBilateralGaussBorder_8u_C3R_Ctx ( const Npp8u pSrc,
Npp32s  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp8u pDst,
Npp32s  nDstStep,
NppiSize  oSizeROI,
const int  nRadius,
const int  nStepBetweenSrcPixels,
const Npp32f  nValSquareSigma,
const Npp32f  nPosSquareSigma,
NppiBorderType  eBorderType,
NppStreamContext  nppStreamCtx 
)

Three channel 8-bit unsigned bilateral Gauss filter with border control.

For common parameter descriptions, see Common parameters for nppiFilterBilateralGaussBorder functions.


Copyright © 2009-2020 NVIDIA Corporation