IPSDK 4.2
IPSDK : Image Processing Software Development Kit
Smart Shading Correction 3d
imagesmartShadingCorrection3dImg (inImg3d,whiteImg,outputRange)
imagesmartShadingCorrection3dImg (inImg3d,blackImg,whiteImg,outputRange)

Detailed Description

applies a shading correction to a 3D image, so that output image intensity fits an expected range

The Smart shading correction algorithm computes the factor and offset parameters for the whole image. However, shading variation may differ between frames or the intensity range for each channel must be the same.

In such cases, the Smart shading correction is not adapted and must be applied explicitly slice by slice.

This Smart Shading Correction 3d algorithm computes the factor and offset parameters indendantly on each slice in order to apply the Smart shading correction in a single call.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLIntensityTransform as itrans

Code Example

# definition of targeted image output range
outputRange = PyIPSDK.createRange(0, 255)
# image shading correction computation
outImg = itrans.smartShadingCorrection3dImg(inImg, whiteImg, outputRange)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLIntensityTransform/Processor/SmartShadingCorrection3dImg/SmartShadingCorrection3dImg.h>

Code Example

// Sample with a generated output image
// -----------------------------------
if(!pBlackImg)
pOutImg = smartShadingCorrection3dImg(pInImg, pWhiteImg, pRange);
else
pOutImg = smartShadingCorrection3dImg(pInImg, pBlackImg, pWhiteImg, pRange);