IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Separated bilateral smoothing 3dSee full documentation
imageseparatedBilateral3dImg (inImg,inSpaceSigma,inRangeSigma)
imageseparatedBilateral3dImg (inImg,inHalfKnlSize,inSpaceSigma,inRangeSigma)

Detailed Description

separated version of bilateral filter on 3d image

The separated bilateral filter is an approximation of the Bilateral smoothing 3d that gives resulting images that may be close to what is obtained with the original bilateral filter with dramatically better time performance. The separated bilateral filter is executed in 3 passes: first along x-axis, then along y-axis and finally along z-axis.

Output image pixel values are given by:

\[ OutImg[x, y, z] = \dfrac { \sum_{o_z=-n}^{n}{W_z(x, y, z, o_z)*OutImg_y[x, y, z+o_z]} } { \sum_{o_z=-n}^{n}{W_z(x, y, z, o_z)} } \]

where:

Input and output images must have same size.

See Separated bilateral smoothing 2d for an illustration of separated bilateral filter applied to a 2d image.

See also
M. Moreaud, F. Cokelaer, Flowing Bilateral Filter : definition and GPU implementation, Image Analysis and Stereology (revision in progress)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# separable bilateral filter 3d computation
outImg = filter.separatedBilateral3dImg(inImg, 5, 3)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLFiltering/Processor/SeparatedBilateral3dImg/SeparatedBilateral3dImg.h>

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// definition of a custom output geometry
ImageGeometryPtr pOutImageGeometry = geometry3d(
outImageBufferType,
pInImg->getSizeX(),
pInImg->getSizeY(),
pInImg->getSizeZ());
// creation of output image
boost::shared_ptr<MemoryImage> pOutImg = boost::make_shared<MemoryImage>();
pOutImg->init(*pOutImageGeometry);
// compute bilateral filter on input image
separatedBilateral3dImg(pInImg, inHalfKnlSize, inSpaceSigma, inRangeSigma, pOutImg);