IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

adjust image dynamic range from a reference using histograms matching More...

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const image::ImageConstPtr &pRefImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pInHistoMsrParams, const image::ImageConstPtr &pRefImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr &pInPIHistoMsrParams, const image::ImageConstPtr &pRefImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistogramDataConstPtr &pRefHistogram)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pInHistoMsrParams, const ipsdk::imaproc::attr::HistogramDataConstPtr &pRefHistogram)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pPIRefHistogram)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr &pInHistoMsrParams, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pPIRefHistogram)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const image::ImageConstPtr &pRefImg, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pInHistoMsrParams, const image::ImageConstPtr &pRefImg, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr &pInHistoMsrParams, const image::ImageConstPtr &pRefImg, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistogramDataConstPtr &pRefHistogram, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pInHistoMsrParams, const ipsdk::imaproc::attr::HistogramDataConstPtr &pRefHistogram, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pPIRefHistogram, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr &pInHistoMsrParams, const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr &pPIRefHistogram, const image::ImagePtr &pOutImg)
 wrapper function for adjust image dynamic range from a reference using histograms matching More...
 

Detailed Description

adjust image dynamic range from a reference using histograms matching

This algorithm applies a LUT to the input image so that the histogram of the resulting image matches with the histogram of the reference image.

Input and output images must have same size.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InOptRefImg [Input Optional] reference image X
ipsdk::imaproc::attr::InOptPIRefHistogram [Input] Plan indexed collection of reference histograms X
ipsdk::imaproc::attr::InOptPIHistoMsrParams [Input] Plan indexed collection of histogram measure parameters 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::processor::If (
 ipsdk::processor::isSet (_pInOptRefImg),
 ipsdk::processor::Not (
  ipsdk::processor::isSet (_pInOptPIRefHistogram)) && 
 ((ipsdk::imaproc::is2d (_pInOptRefImg) && 
   ipsdk::imaproc::isGrey (_pInOptRefImg) && 
   ipsdk::imaproc::isSingle (_pInOptRefImg)) || 
  ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_ZCT,_pInImg,_pInOptRefImg)),
 ipsdk::processor::isSet (_pInOptPIRefHistogram) && 
 ((ipsdk::imaproc::is2d (_pInOptPIRefHistogram) && 
   ipsdk::imaproc::isGrey (_pInOptPIRefHistogram) && 
   ipsdk::imaproc::isSingle (_pInOptPIRefHistogram)) || 
  ipsdk::imaproc::matchImagePlans (_pInOptPIRefHistogram,_pInImg,eImagePlansMatchPolicy::eIPMP_ZCT))) && 
ipsdk::processor::ifIsSet (
 _pInOptPIHistoMsrParams, (
  (ipsdk::imaproc::is2d (_pInOptPIHistoMsrParams) && 
   ipsdk::imaproc::isGrey (_pInOptPIHistoMsrParams) && 
   ipsdk::imaproc::isSingle (_pInOptPIHistoMsrParams)) || 
  ipsdk::imaproc::matchImagePlans (_pInOptPIHistoMsrParams,_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)
inRefImg = PyIPSDK.loadTiffImageFile(inputRefImgPath)
# image histogram matching computation
outImg = itrans.matchHistograms2dImg(inImg, inRefImg)

Example of C++ code :

Example informations

Associated library

IPSDKIPLIntensityTransform

Header file

Code Example

boost::filesystem::path inPath, refPath;
// initialization of paths
// ...
ImagePtr pInImg = loadTiffImageFile(inPath);
ImagePtr pRefImg = loadTiffImageFile(refPath);
ImagePtr pOutImg = matchHistograms2dImg(pInImg, pRefImg);
See also
MatchHistograms2dImgLvl1

Function Documentation

◆ matchHistograms2dImg() [1/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const image::ImageConstPtr pRefImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [2/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pInHistoMsrParams,
const image::ImageConstPtr pRefImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [3/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr pInPIHistoMsrParams,
const image::ImageConstPtr pRefImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [4/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistogramDataConstPtr pRefHistogram 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [5/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pInHistoMsrParams,
const ipsdk::imaproc::attr::HistogramDataConstPtr pRefHistogram 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [6/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pPIRefHistogram 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [7/14]

IPSDKIPLINTENSITYTRANSFORM_API image::ImagePtr ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr pInHistoMsrParams,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pPIRefHistogram 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [8/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const image::ImageConstPtr pRefImg,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [9/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pInHistoMsrParams,
const image::ImageConstPtr pRefImg,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [10/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr pInHistoMsrParams,
const image::ImageConstPtr pRefImg,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [11/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistogramDataConstPtr pRefHistogram,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [12/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pInHistoMsrParams,
const ipsdk::imaproc::attr::HistogramDataConstPtr pRefHistogram,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [13/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pPIRefHistogram,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ matchHistograms2dImg() [14/14]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::matchHistograms2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::PlanIndexedHistoMsrParamsConstPtr pInHistoMsrParams,
const ipsdk::imaproc::attr::PlanIndexedHistogramDataConstPtr pPIRefHistogram,
const image::ImagePtr pOutImg 
)

wrapper function for adjust image dynamic range from a reference using histograms matching

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure