IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

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

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange)
 wrapper function for equalization of 2d plans of input image In this version of the function, the histogram of the image is automatically computed, with a bin width of 1.0 More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for equalization of 2d plans of input image In this version of the function, the histogram of the image is automatically computed, with a bin width of 1.0 More...
 
IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistogramDataConstPtr &pInHistogram, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange)
 wrapper function for equalization of 2d plans of input image histogram used perform the equalization is provided as argument of the function More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistogramDataConstPtr &pInHistogram, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for equalization of 2d plans of input image histogram used perform the equalization is provided as argument of the function More...
 
IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pInPIHistogram, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange)
 wrapper function for equalization of 2d plans of input image histograms used perform the equalization are provided as argument of the function More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pInPIHistogram, const ipsdk::imaproc::attr::RangeConstPtr &pInOutputRange, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for equalization of 2d plans of input image histograms used perform the equalization are provided as argument of the function More...
 

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

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InOptPIHistogram [Input Optional] Plan indexed collection of histogram properties X
ipsdk::imaproc::attr::OutPIHistogram [Output] Plan indexed collection of histogram properties ipsdk::imaproc::fromImage (_pOutPIHistogram, _pInImg)
ipsdk::imaproc::attr::InOutputRange [Input] output image intensity range for algorithm X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg,_pOutImg) && (ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::Range::Min>(_pOutImg,_pInOutputRange) && ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::Range::Max>(_pOutImg,_pInOutputRange)) && 
ipsdk::imaproc::matchImagePlans (_pOutPIHistogram,_pInImg,eImagePlansMatchPolicy::eIPMP_ZCT) && 
ipsdk::processor::ifIsSet (
 _pInOptPIHistogram, (
  (ipsdk::imaproc::is2d (_pInOptPIHistogram) && 
   ipsdk::imaproc::isGrey (_pInOptPIHistogram) && 
   ipsdk::imaproc::isSingle (_pInOptPIHistogram)) || 
  ipsdk::imaproc::matchImagePlans (_pInOptPIHistogram,_pInImg,eImagePlansMatchPolicy::eIPMP_ZCT)))

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

Associated library

IPSDKIPLIntensityTransform

Header file

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);
See also
Equalize2dImgLvl1

Function Documentation

◆ equalize2dImg() [1/6]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange 
)

wrapper function for equalization of 2d plans of input image In this version of the function, the histogram of the image is automatically computed, with a bin width of 1.0

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ equalize2dImg() [2/6]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistogramDataConstPtr pInHistogram,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange 
)

wrapper function for equalization of 2d plans of input image histogram used perform the equalization is provided as argument of the function

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ equalize2dImg() [3/6]

IPSDKIPLINTENSITYTRANSFORM_API ipsdk::image::ImagePtr ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pInPIHistogram,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange 
)

wrapper function for equalization of 2d plans of input image histograms used perform the equalization are provided as argument of the function

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ equalize2dImg() [4/6]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for equalization of 2d plans of input image In this version of the function, the histogram of the image is automatically computed, with a bin width of 1.0

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ equalize2dImg() [5/6]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistogramDataConstPtr pInHistogram,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for equalization of 2d plans of input image histogram used perform the equalization is provided as argument of the function

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ equalize2dImg() [6/6]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::equalize2dImg ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pInPIHistogram,
const ipsdk::imaproc::attr::RangeConstPtr pInOutputRange,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for equalization of 2d plans of input image histograms used perform the equalization are provided as argument of the function

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure