IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Image Equalization 2d
imageequalize2dImg (inImg,inOutputRange)
imageequalize2dImg (inImg,inHistogram,inOutputRange)
imageequalize2dImg (inImg,inPIHistogram,inOutputRange)

Detailed Description

computes an output image associated to histogram equalization of each 2d plan of an input image

This algorithm applies, for each 2D plan of the input image, the intensities look-up table resulting from a histogram equalization computed using:

See also
Equalization LUT computation for details on histograms equalization.

Here is an example of histogram equalization applied to a 8-bits grey level image with $InOutputRange = [0, 255]$ :

equalizeImg.png
See also
http://en.wikipedia.org/wiki/Equalization
http://en.wikipedia.org/wiki/Histogram_equalization

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 equalization range
equalizeRange = PyIPSDK.createRange(0, 255)
# equalization image computation (output image allocated by the algorithm)
autoOutImg = itrans.equalize2dImg(inImg, equalizeRange)

Example of C++ code :

Example informations

Header file

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

Code Example

// create a target range for operation
RangePtr pInOutputRange(boost::make_shared<Range>());
pInOutputRange->setValue<Range::Min>(fOutMin);
pInOutputRange->setValue<Range::Max>(fOutMax);
// Sample with a generated output image
// ------------------------------------
ImagePtr pAutoOutImg = equalize2dImg(pInImg, pInOutputRange);
// Sample with a provided output image
// -----------------------------------
equalize2dImg(pInImg, pInOutputRange, pOutImg);