IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Normalization with a sigmoidSee full documentation
imagesigmoidNormalizeImg (inImg,alpha,beta,outputRange)

Detailed Description

normalizes the intensity of an image with a sigmoid

On output image, values are given by:

\[ OutImg[i] = outMin + (outMax-outMin) \times \frac{1}{1 + e^{- \frac{InImg[i]-\beta}{\alpha}}} \]

with

Here is an example of intensity normalization applied to Lena grey level image with $ \alpha $=20, $ \beta $=20 and $OutRange$ = [3, 247]:

sigmoidNormalizeImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLIntensityTransform as itrans

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# definition of targeted image output range
outputRange = PyIPSDK.createRange(3, 247)
# definition of alpha and beta input parameters
alpha = 20
beta = 128
# image normalization computation
autoOutImg = itrans.sigmoidNormalizeImg(inImg, alpha, beta, outputRange)

Example of C++ code :

Example informations

Header file

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

Code Example

ImagePtr pInImg = loadTiffImageFile(inputImgFilePath);
const ipsdk::ipReal64 alpha = 20.0;
const ipsdk::ipReal64 beta = 128.0;
ImagePtr pAutoOutImg = sigmoidNormalizeImg(pInImg, alpha, beta, attr::createRange(3, 247));