Input Arguments

I — Input Image2-D array

Input intensity image, specified as a numeric 2-D array.

Data Types: single | double | int16 | uint8 | uint16

Name-Value Pair Arguments

Specify optional
comma-separated pairs of Name,Value arguments. Name is
the argument name and Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN.

Number of rectangular contextual regions (tiles) into which adapthisteq
divides the image, specified as a 2-element vector of positive integers.
With the original image divided into M rows and
N columns of tiles, the value of
'NumTiles' is [M N]. Both
M and N must be at least
2. The total number of tiles is equal to
M*N. The optimal number of tiles depends on the
type of the input image, and it is best determined through
experimentation.

Data Types: double

'ClipLimit' — Contrast enhancement limit0.01 (default) | real scalar

Contrast enhancement limit, specified as a real scalar in the range [0, 1]. Higher limits
result in more contrast.

'ClipLimit' is a contrast factor that prevents
oversaturation of the image specifically in homogeneous areas. These
areas are characterized by a high peak in the histogram of the
particular image tile due to many pixels falling inside the same gray
level range. Without the clip limit, the adaptive histogram equalization
technique could produce results that, in some cases, are worse than the
original image.

Number of histogram bins used to build a contrast enhancing
transformation, specified as a positive integer scalar. Higher values
result in greater dynamic range at the cost of slower processing speed.

Data Types: double

'Range' — Range of output data'full' (default) | 'original'

Range of the output image data, specified as one of the following
values:

'Distribution' specifies the distribution that
adapthisteq uses as the basis for creating the
contrast transform function. The distribution you select should depend
on the type of the input image. For example, underwater imagery appears
to look more natural when the Rayleigh distribution is used.

Output Arguments

J — Output intensity image2-D array

Output intensity image, returned as a 2-D array of the same
class as the input image I.

Algorithms

CLAHE operates on small regions in the image, called tiles,
rather than the entire image. adapthisteq calculates the contrast
transform function for each tile individually. Each tile's contrast is enhanced, so
that the histogram of the output region approximately matches the histogram specified by
the 'Distribution' value. The
neighboring tiles are then combined using bilinear interpolation to eliminate
artificially induced boundaries. The contrast, especially in homogeneous areas, can be
limited to avoid amplifying any noise that might be present in the image.