image = | adaptiveContrastEnhancement3dImg (inImg,inHalfKnlSizeX,inHalfKnlSizeY,inHalfKnlSizeZ,inArithmeticVal,inBlendMultiplier) |
Localy adjust the contrast of an image.
This algorithm computes a new intensity according to its neighbour in order to locally enhance the image contrast.
Each voxel intensity is calculated according to a relative percentage of its neighbourhood intensities. The calculation is comparable to the Contrast Limited Adaptive Histogram Equalization (CLAHE) [1], although it remains much less heavy. Contrary to the CLAHE, it is possible to compute the contrast to each voxel in a reasonable amount of time.
In order to reduce the impact of the noise, a tolerance threshold is used to make the algorithm consider that a neighbour has the same intensity than the current voxel if
, where
is the coordinate of the current voxel,
is the coordinate of its neighbour.
The output intensities may differ a lot from the original images. For this reason, the input image is mixed with the adaptive contrast enhancement result to generate an output looking like the input image. It is possible to tune this effect thanks to the inBlendMultiplier parameter. A blend coefficient of 0 means that the output is the direct result of the enhancement and a blend value of 1 will yield the input image.
Please, see Adaptive Contrast Enhancement 2d for an illustration in 2D.
[1] Zuiderveld, Karel. "Contrast Limited Adaptive Histograph Equalization." Graphic Gems IV. San Diego: Academic Press Professional, 1994. 474-485.