Image Enhancement Report
Image Enhancement Report
College of Engineering
Software and Informatics Dept.
Image Enhancement
Prepared By:
Shad Abdulsamad Asaad
2023-2024
Table of Contents
Introduction ……………………………………………………………….... 2
What is Image Enhancement? ………………………………………. 3
Importance of Image Enhancement ……………………………… 3
Image Enhancement Techniques …………………………………. 4
Histogram Equalization ………………………………………………… 7
Contrast Stretching ……………………………………………………… 10
Thresholding ………………………………………………………………. 11
Gamma Correction ……………………………………………………... 14
Spatial Filters ……………………………………………………………… 15
Smoothing …………………………………………………………………. 16
Order-Statistic Filters …………………………………………………. 18
Sharpening …………………………………………………………….... 20
High-Pass Filtering ……………………………………………………. 21
Unsharp Masking ……………………………………………………. 22
Frequency Domain Methods ………………………………….. 23
Conclusion …………………………………………………………….. 30
References ……………………………………………………………. 31
1|Page
Introduction
Image enhancement is a widely used technique in various fields
such as medical imaging, computer vision, and remote sensing.
The objective of image enhancement is to improve the quality
and visual appearance of an image by reducing noise, increasing
contrast, or enhancing sharpness. In recent years, with the
advancement of image processing algorithms and
computational power, image enhancement has become easier
to achieve and has found substantial applications in different
domains. This report aims to discuss the different techniques
and approaches used in image enhancement and their practical
implications.
2|Page
What is Image Enhancement?
Image enhancement is the process of improving the visual
quality of an image through various techniques and algorithms.
It involves manipulating the characteristics of an image such as
brightness, contrast, sharpness, and color balance to enhance
its details and make it more visually appealing or suitable for
specific applications. The goal of image enhancement is to
improve the overall visual perception of the image and make it
more informative, while maintaining its authenticity and
preserving important features.
3|Page
is also used in many other different fields, such as Photography,
Graphic Design, and many more.
4|Page
Spatial Domain Techniques:
Spatial Domain Techniques operate directly on the pixels of an
image, and they can be further divided into two subcategories:
- Point Operations
- Spatial Filters
5|Page
Point Operation Techniques:
- Histogram Equalization: This technique adjusts the
contrast of an image by making its histogram more
uniform, it redistributes the pixel values so that they are
equally probable, and thus enhancing the dynamic range
of the image.
6|Page
Histogram Equalization
An image Histogram is a graphical representation between
number of pixels and intensity values, it plots the number of
pixels for each intensity value.
7|Page
The histogram of a digital image with gray levels from 0 to L-1 is
a discrete function
h(rx) = nk where:
• rx is the kth gray level
• nk is the number of in the image with that gray level
• n is the total number of pixels in the image
• k = 0, 1, 2, …etc
8|Page
Example:
9|Page
Contrast Stretching
Contrast basically means the difference between intensity
values of darker and brighter pixels, Contrast Stretching is a
technique that increases the contrast of an image by mapping
the original pixel values to a wider range. This process involves
defining a lower and upper threshold intensity and linearly
scaling the pixel values within that range to span the full
intensity range (e.g., from 0 to 255). This helps in maximizing
the use of the available dynamic range and makes the image
visually more appealing.
Example:
10 | P a g e
Thresholding
Thresholding is a technique that can be used to segment images
into foreground and background regions based on a threshold
value, there are different types of thresholding methods, we
will discuss some of it in this report.
11 | P a g e
2) Otsu’s method: This is an automatic thresholding method
that tries to find the optimal threshold value that
minimizes the within-class variance of the pixel intensities,
it assumes that the image histogram has two peaks,
corresponding to the foreground and background classes,
and searches for the valley between them.
Thresholded Image
Original Image
12 | P a g e
3) Adaptive Threshold: This method adjusts the threshold
value according to the local image characteristics, unlike
simple thresholding, which uses a global threshold for the
whole image, adaptive thresholding uses a different
threshold for each pixel based on a small region around it,
this makes it more suitable for images with varying
illumination for contrast.
13 | P a g e
Gamma Correction
Gamma Correction is a technique that adjusts the brightness
and contrast of the image or videos to make them more realistic
and appealing to the human eye, it is based on the fact that our
eyes perceive light in a nonlinear way, meaning that we are
more sensitive to changes in dark tones than in bright tones.
Example:
14 | P a g e
Spatial Filters
The main difference between spatial filters and point operation
is that Spatial filters operate on the spatial domain of an image,
considering the relationships between pixels in a local
neighborhood. They typically involve convolving a kernel or
mask with the image to achieve various effects, but Point
operations, on the other hand, operate on individual pixels
independently, modifying the intensity value of each pixel
without considering its neighboring pixels. They are often used
for contrast adjustments, histogram equalization, and color
transformations.
15 | P a g e
Smoothing
Smoothing spatial filtering is a technique that reduces noise and
blurs details in an image by using a filter that averages the pixel
values in a neighborhood. There are different types of
smoothing filters, such as linear, nonlinear, and adaptive filters.
Some examples of smoothing filters are:
16 | P a g e
Average Filtering Example:
17 | P a g e
Order-statistics filters
are nonlinear spatial filters whose response is based on
ordering (ranking) the pixels contained in the neighborhood,
and then replacing the value of the center pixel with the value
determined by the ranking result. Examples include Max, Min,
and Median filters.
Median Filters
Median filters are a type of spatial filter that can reduce noise
and preserve edges in an image. They work by replacing each
pixel value with the median of the neighboring pixel values.
Median filters are especially effective for removing salt-and-
pepper noise, which is caused by random white and black pixels
in the image. Median filters are also nonlinear, meaning that
they do not depend on the linear combination of the pixel
values
18 | P a g e
Median Filter Example:
19 | P a g e
Sharpening
Image sharpening is a crucial technique in image processing
that aims to enhance the clarity and crispness of an image. It
involves amplifying the high-frequency components in the
image's frequency domain, effectively highlighting edges and
details. Sharpening techniques play a significant role in various
applications, including photography, medical imaging, and
satellite imagery.
1) High-Pass Filtering
2) Unsharp Masking
20 | P a g e
High-Pass Filtering
High-pass filtering is a technique that enhances the edges and
details of an image by applying a filter that subtracts the low-
frequency components from the original image. High-pass
filtering can be used to sharpen an image and make it appear
more crisp and clear. However, high-pass filtering can also
introduce noise and artifacts if applied too strongly or to the
wrong type of image.
Example:
21 | P a g e
Unsharp Masking
This technique involves creating a blurred version of the
original image and subtracting it from the original image.
The resulting difference image highlights edges and details,
enhancing the overall sharpness.
Example:
22 | P a g e
Frequency Domain Methods
In image processing, frequency domain methods are a class of
techniques that operate on the frequency representation of an
image to achieve various image enhancement tasks. Unlike
spatial domain methods, which directly manipulate the pixel
values of an image, frequency domain methods focus on
modifying the image's frequency components, which represent
the distribution of intensities across different spatial
frequencies.
23 | P a g e
Frequency domain methods utilize various techniques to
manipulate the frequency components of an image, such as:
24 | P a g e
Filtering
Low pass filtering involves the elimination of the high frequency
components in the image. It results in blurring of the image
(and thus a reduction in sharp transitions associated with
noise). An ideal low pass filter would retain all the low
frequency components, and eliminate all the high frequency
components. However, ideal filters suffer from two
problems: blurring and ringing. These problems are caused by
the shape of the associated spatial domain filter, which has a
large number of undulations. Smoother transitions in the
frequency domain filter, such as the Butterworth filter, achieve
much better results.
25 | P a g e
Homomorphic Filtering
Homomorphic filtering is a method for enhancing images by
separating the illumination and reflectance components in the
frequency domain. It takes advantage of the fact that the
product of the reflectance (underlying scene information) and
the illumination (lighting conditions) is multiplicative in nature.
By transforming the image into the frequency domain,
adjusting the amplitude values, and then applying an inverse
transform, homomorphic filtering aims to improve the visibility
of details in both dark and bright areas of an image.
26 | P a g e
Suppose, however, that we define
Then
or
27 | P a g e
If we now apply a filter with a transfer function that suppresses
low frequency components and enhances high frequency
components, then we can suppress the illumination component
and enhance the reflectance component. Thus
By letting
and
we get
28 | P a g e
Thus, the process of homomorphic filtering can be summarized
by the following diagram:
29 | P a g e
Conclusion
In conclusion, image enhancement techniques play a crucial
role in various fields, including photography, medical imaging,
and surveillance systems. These techniques enable the
adjustment of image attributes to improve clarity, contrast, and
overall visual quality. Although there are multiple algorithms
and methods available, each with its own advantages and
limitations, image enhancement continues to evolve, promising
more sophisticated tools and applications in the future. As
technology advances, it is essential to strike a balance between
enhancing the visual appeal of images and maintaining their
authenticity for ethical and legal purposes. Overall, image
enhancement serves as an invaluable tool in modern society,
enhancing our ability to interpret and analyze visual
information accurately.
30 | P a g e
References
- Freek D. van der Meer. 'Remote Sensing Image Analysis:
Including the Spatial Domain.' Steven M.de Jong, Springer Science
& Business Media, 7/26/2007.
- https://homepages.inf.ed.ac.uk/rbf/HIPR2/stretch.htm
- https://staff.fnwi.uva.nl/r.vandenboomgaard/IPCV20172018/_imag
es/contraststretch.png
- https://www.nzfaruqui.com/contrast-stretching-in-image-
processing-using-matlab/
- https://www.analyticsvidhya.com/blog/2021/08/image-processing-
in-python-the-computer-vision-techniques/
- https://en.wikipedia.org/wiki/Otsu%27s_method
- https://stackoverflow.com/questions/13391073/adaptive-threshold-
of-blurry-image
- https://doc.stride3d.net/4.0/en/manual/graphics/post-effects/color-
transforms/gamma-correction.html
- https://www.slideshare.net/shaletks/spatial-filter-47299769
- https://homepages.inf.ed.ac.uk/rbf/HIPR2/median.htm
31 | P a g e
- https://medium.com/@florestony5454/median-filtering-with-
python-and-opencv-2bce390be0d1
- https://medium.com/computational-photography/lowpass-
highpass-bandreject-and-bandpass-filters-in-image-processing-
cf4341bfe61b
32 | P a g e