IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

local 3d image skewness computation More...

IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::skewness3dImg (const image::ImageConstPtr &pInImg3d, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY, const ipUInt32 inHalfKnlSizeZ)
 wrapper function for Local 3d image skewness computation More...
 
IPSDKIPLSTATS_API void ipsdk::imaproc::stats::skewness3dImg (const image::ImageConstPtr &pInImg3d, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY, const ipUInt32 inHalfKnlSizeZ, const image::ImagePtr &pOutImg)
 wrapper function for Local 3d image skewness computation More...
 

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

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InHalfKnlSizeX [Input] half kernel size along X axis for operation X
ipsdk::imaproc::attr::InHalfKnlSizeY [Input] half kernel size along Y axis for operation X
ipsdk::imaproc::attr::InHalfKnlSizeZ [Input] half kernel size along Z axis for operation X
ipsdk::imaproc::attr::OutRealImg [Output] image for processing operation (data contained in image buffer are reals) ipsdk::imaproc::duplicateInOut (_pOutRealImg, _pInImg3d, image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg3d,_pOutRealImg)

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

Associated library

IPSDKIPLStats

Header file

Code Example

// opening input image
// compute skewness on input image
ImagePtr pOutImg = skewness3dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY, inHalfKnlSizeZ);
See also
Skewness3dImgLvl1
Skewness3dImgLvl2
Skewness3dImgLvl3

Function Documentation

◆ skewness3dImg() [1/2]

IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::skewness3dImg ( const image::ImageConstPtr pInImg3d,
const ipUInt32  inHalfKnlSizeX,
const ipUInt32  inHalfKnlSizeY,
const ipUInt32  inHalfKnlSizeZ 
)

wrapper function for Local 3d image skewness computation

Exceptions
ipsdk::imaproc::util::IPSDKIPLUtilityExceptionon failure

◆ skewness3dImg() [2/2]

IPSDKIPLSTATS_API void ipsdk::imaproc::stats::skewness3dImg ( const image::ImageConstPtr pInImg3d,
const ipUInt32  inHalfKnlSizeX,
const ipUInt32  inHalfKnlSizeY,
const ipUInt32  inHalfKnlSizeZ,
const image::ImagePtr pOutImg 
)

wrapper function for Local 3d image skewness computation

Exceptions
ipsdk::imaproc::util::IPSDKIPLUtilityExceptionon failure