image = | meanSmoothing3dImg (inImg3d,inHalfKnlSizeX,inHalfKnlSizeY,inHalfKnlSizeZ) |
Smooth an input 3d image computing local mean of pixels.
This low-pass 3d filter, also none as "box blur filter" or "box linear filter", computes for each pixel the average value of its neighboring pixels.
On output image values are given by:
where :
is defined by InHalfKnlSizeX attribute
is defined by InHalfKnlSizeY attribute
is defined by InHalfKnlSizeZ attribute
Input and output images must have same size.
Here is an example of a Mean smoothing operation applied to an 8-bits grey levels input image (with
) :
- See also
- http://en.wikipedia.org/wiki/Box_blur
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = filter.meanSmoothing3dImg(inImg, 3, 3, 3)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLFiltering/Processor/MeanSmoothing3dImg/MeanSmoothing3dImg.h>
Code Example
boost::shared_ptr<MemoryImage> pInImg(boost::make_shared<MemoryImage>());
pInImg->init(*pImageGeometry);
ImagePtr pOutImg = meanSmoothing3dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY, inHalfKnlSizeZ);