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

Detailed Description

local 3d image skewness computation

This algorithm computes for each pixel of output image associated local skewness 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_{y}=-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])^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}}]^{\frac{3}{2}}}} \]

where

\[ \bar{M}[x, y, z] = \dfrac{1}{(2 N_z + 1)(2 N_y + 1)(2 N_x + 1)}\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/Skewness

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

skewness3dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLStats as stats

Code Example

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

Example of C++ code :

Example informations

Header file

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

Code Example

// opening input image
// compute skewness on input image
ImagePtr pOutImg = skewness3dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY, inHalfKnlSizeZ);