IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

local 2d image kurtosis computation More...

IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::kurtosis2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY)
 wrapper function for local kurtosis on a 2d image More...
 
IPSDKIPLSTATS_API void ipsdk::imaproc::stats::kurtosis2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY, const image::ImagePtr &pOutRealImg)
 wrapper function for local kurtosis on a 2d image More...
 

Detailed Description

local 2d image kurtosis computation

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

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

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

where

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

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 = 2$:

kurtosis2dImg.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing 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::OutRealImg [Output] image for processing operation (data contained in image buffer are reals) ipsdk::imaproc::duplicateInOut (_pOutRealImg, _pInImg, image::eImageBufferType::eIBT_Real32)

Global Rule description

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

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLStats as stats

Code Example

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

Example of C++ code :

Example informations

Associated library

IPSDKIPLStats

Header file

Code Example

// opening input image
ImageGeometryPtr pInImageGeometry = geometry2d(imageBufferType, sizeX, sizeY);
ImagePtr pInImg = loadRawImageFile(inputImgPath, *pInImageGeometry);
// compute kurtosis on input image
ImagePtr pOutImg = kurtosis2dImg(pInImg, inHalfKnlSizeX, inHalfKnlSizeY);
See also
Kurtosis2dImgLvl1
Kurtosis2dImgLvl2
Kurtosis2dImgLvl3

Function Documentation

◆ kurtosis2dImg() [1/2]

IPSDKIPLSTATS_API image::ImagePtr ipsdk::imaproc::stats::kurtosis2dImg ( const image::ImageConstPtr pInImg,
const ipUInt32  inHalfKnlSizeX,
const ipUInt32  inHalfKnlSizeY 
)

wrapper function for local kurtosis on a 2d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ kurtosis2dImg() [2/2]

IPSDKIPLSTATS_API void ipsdk::imaproc::stats::kurtosis2dImg ( const image::ImageConstPtr pInImg,
const ipUInt32  inHalfKnlSizeX,
const ipUInt32  inHalfKnlSizeY,
const image::ImagePtr pOutRealImg 
)

wrapper function for local kurtosis on a 2d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure