Class NPPNativeMethods.NPPi.FilterBilateralGaussBorder
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 \f$d\f$ is
\f[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)}\f] 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(hh+ww)), and func is the following formula \f[func(S,I) = exp(-\frac{I^2}{2.0F\cdot S^2})\f]
Currently only the NPP_BORDER_REPLICATE border type operations are supported.
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class FilterBilateralGaussBorder
Methods
nppiFilterBilateralGaussBorder_16u_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
Single channel 16-bit unsigned bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_16u_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterBilateralGaussBorder_16u_C3R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
Three channel 16-bit unsigned bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_16u_C3R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterBilateralGaussBorder_32f_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
One channel 32-bit floating-point bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterBilateralGaussBorder_32f_C3R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
Three channel 32-bit floating-point bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_32f_C3R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterBilateralGaussBorder_8u_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
Single channel 8-bit unsigned bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_8u_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterBilateralGaussBorder_8u_C3R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, Int32, Int32, Single, Single, NppiBorderType)
Three channel 8-bit unsigned bilateral Gauss filter with border control.
Declaration
public static NppStatus nppiFilterBilateralGaussBorder_8u_C3R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, int nRadius, int nStepBetweenSrcPixels, float nValSquareSigma, float nPosSquareSigma, NppiBorderType eBorderType)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiSize | oSrcSize | Source image width and height in pixels relative to pSrc. |
NppiPoint | oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image. |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | nRadius | The 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. |
System.Int32 | nStepBetweenSrcPixels | The step size between adjacent source image pixels processed by the filter kernel, most commonly 1. |
System.Single | nValSquareSigma | The 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. |
System.Single | nPosSquareSigma | The 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. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |