| image = | variance3dImg (inImg3d,inHalfKnlSizeX,inHalfKnlSizeY,inHalfKnlSizeZ) |
local 3d image variance computation
This algorithm computes for each pixel of output image associated local variance on a parallelepipedic neighbourhood of input image.
Given an input image
and parallelepipedic kernel half sizes
,
and
, output image values are given by :
where
- See also
- http://en.wikipedia.org/wiki/Variance
Here is an example of a Variance computation applied on a 8 bits grey level image with
:
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLStats as stats
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outImg = stats.variance3dImg(inImg, 3, 3, 3)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLStats/Processor/Variance3dImg/Variance3dImg.h>
Code Example
ImagePtr pOutImg = variance3dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY, inHalfKnlSizeZ);