IPSDK 0.2
IPSDK : Image Processing Software Development Kit
imagekurtosis3dImg (inImg3d,inHalfKnlSizeX,inHalfKnlSizeY,inHalfKnlSizeZ)

Detailed Description

local 3d image kurtosis computation

This algorithm computes for each pixel of output image associated local kurtosis on a parallelepipedic neighbourhood of input image.

Given an input image $InImg$ and parallelepipedic kernel half sizes $N_x = InHalfKnlSizeX$, $N_y = InHalfKnlSizeY$ and $N_z = InHalfKnlSizeZ$, output image values are given by :

\[ OutImg[x, y, z] = \dfrac {\sum_{o_{z}=-N_z}^{N_z}{\sum_{o_{y}=-N_y}^{N_y}{\sum_{o_{x}=N_x}^{N_x}{(InImg[x, y, z]-\bar{M}[x, y, z])^4}}}-3(\sum_{o_{z}=-N_z}^{N_z}{\sum_{o_{y}=-N_y}^{N_y}{\sum_{o_{x}=N_x}^{N_x}{(InImg[x, y, z]-\bar{M}[x, y, z])^2}}})^2} {[\sum_{o_{z}=-N_z}^{N_z}{\sum_{o_{y}=-N_y}^{N_y}{\sum_{o_{x}=N_x}^{N_x}{(InImg[x, y, z]-\bar{M}[x, y, z])^2}}}]^2} \]

where

\[ \bar{M}[x, y, z] = \sum_{o_{z}=-N_z}^{N_z}{\sum_{o_{y}=-N_y}^{N_y}{\sum_{o_{x}=N_x}^{N_x}{InImg[x, y, z]}}} \]

See also
http://en.wikipedia.org/wiki/Kurtosis

Here is an example of a Kurtosis computation applied on a 8 bits grey level image with $InHalfKnlSizeX = InHalfKnlSizeY = InHalfKnlSizeZ = 7$:

kurtosis3dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLStats as stats

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# kurtosis 3d image computation
outImg = stats.kurtosis3dImg(inImg, 3, 3, 3)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLStats/Processor/Kurtosis3dImg/Kurtosis3dImg.h>

Code Example

// compute kurtosis on input image
ImagePtr pOutImg = kurtosis3dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY, inHalfKnlSizeZ);