Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

Automatic contrast adjustment is a common technique in image processing to enhance

the visual quality of images. Here are some widely used methods to achieve
automatic contrast adjustment:

1. Histogram Equalization
Histogram Equalization (HE) is a method that enhances contrast by redistributing
the intensity values of the image. It aims to create an image with a uniform
histogram.

Steps:
Compute the histogram of the image.
Calculate the cumulative distribution function (CDF) of the histogram.
Use the CDF to remap the intensity values of the image, spreading them across the
entire range.
2. Adaptive Histogram Equalization (AHE)
Adaptive Histogram Equalization is an extension of Histogram Equalization that
improves local contrast.

Steps:
Divide the image into small blocks or tiles.
Apply Histogram Equalization to each tile.
Interpolate between the tiles to reduce boundaries.
3. Contrast Limited Adaptive Histogram Equalization (CLAHE)
CLAHE is a variation of AHE that prevents over-amplification of noise by limiting
the contrast enhancement.

Steps:
Divide the image into small blocks or tiles.
Clip the histogram at a predefined value to limit contrast enhancement.
Apply Histogram Equalization to the clipped histogram of each tile.
Interpolate between the tiles.
4. Gamma Correction
Gamma Correction adjusts the brightness of an image based on a nonlinear
transformation.

Formula:
𝐼
output
=
𝐼
input
𝛾
I
output

=I
input
γ

where
𝛾
γ is the gamma value (typically between 0.5 and 2.5).
5. Automatic Brightness and Contrast Adjustment (Auto-Contrast)
Auto-Contrast adjusts the image contrast by stretching the intensity range to the
full available range.

Steps:
Find the minimum and maximum intensity values in the image.
Linearly map the intensity values to the full range (0-255 for 8-bit images).
6. Normalization
Normalization rescales the pixel intensity values to a specific range, often [0, 1]
or [0, 255].

Formula:
𝐼
normalized
=
𝐼
input

𝐼
min
𝐼
max

𝐼
min
×
(
𝑛
𝑒
𝑤
max

𝑛
𝑒
𝑤
min
)
+
𝑛
𝑒
𝑤
min
I
normalized

=
I
max

−I
min

I
input

−I
min

×(new
max

−new
min

)+new
min

where
𝐼
min
I
min

and
𝐼
max
I
max

are the minimum and maximum intensity values of the input image.
7. Retinex Algorithm
The Retinex theory is based on human visual perception, aiming to improve the
perception of brightness and contrast.

Steps:
Decompose the image into illumination and reflectance components.
Enhance the reflectance component to improve contrast.
Reconstruct the image with the enhanced reflectance.
8. Log Transformation
Log Transformation enhances contrast in darker regions of the image.

Formula:
𝐼
output
=
𝑐

log

(
1
+
𝐼
input
)
I
output

=c⋅log(1+I
input

)
where
𝑐
c is a scaling constant.
9. Sigmoid Contrast Adjustment
Sigmoid functions can be used to enhance contrast by adjusting the image's
intensity values.

Formula:
𝐼
output
=
1
1
+
𝑒

𝑘
(
𝐼
input

𝑚
)
I
output

=
1+e
−k(I
input

−m)

where
𝑘
k controls the contrast and
𝑚
m is the midpoint value.
Each of these methods has its advantages and is suited to different types of images
and applications. Combining these methods can also yield better results in certain
cases.

You might also like