0% found this document useful (0 votes)
19 views33 pages

Image Enhancement Report

This document provides an in-depth overview of image enhancement techniques, including their definitions, importance, and various methods such as histogram equalization, contrast stretching, and spatial filtering. It emphasizes the applications of these techniques in fields like medical imaging, surveillance, and photography, while discussing both spatial and frequency domain methods. The report concludes by highlighting the ongoing evolution of image enhancement technologies and the need to balance visual appeal with authenticity.

Uploaded by

Shad Abdulsamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views33 pages

Image Enhancement Report

This document provides an in-depth overview of image enhancement techniques, including their definitions, importance, and various methods such as histogram equalization, contrast stretching, and spatial filtering. It emphasizes the applications of these techniques in fields like medical imaging, surveillance, and photography, while discussing both spatial and frequency domain methods. The report concludes by highlighting the ongoing evolution of image enhancement technologies and the need to balance visual appeal with authenticity.

Uploaded by

Shad Abdulsamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Salahaddin University-Erbil

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.

Importance of Image Enhancement


In the realm of medical imaging, image enhancement plays a
crucial role in accurately diagnosing and treating patients. By
enhancing images, doctors are able to detect subtle
abnormalities and make informed decisions regarding medical
interventions. Additionally, image enhancement techniques are
extensively used in fields such as surveillance, remote sensing,
and astronomy, where high-quality images are imperative for
accurate observations and analysis. Moreover, image
enhancement is also pivotal in forensic investigation, as it aids
investigators in extracting important details from surveillance
footage or crime scene photographs. and Image Enhancement

3|Page
is also used in many other different fields, such as Photography,
Graphic Design, and many more.

Image Enhancement Techniques


Image enhancement encompasses a diverse array of techniques
that cater to specific requirements and characteristics of
different images. The choice of technique often depends on the
nature of the image, the specific enhancement goals, and the
domain of application.

There are many methods and algorithms for image


enhancement and they can be classified into two main
categories:

- Spatial Domain Techniques


- Frequency Domain Techniques

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

Point Operations: Point operations refer to operations that are


applied independently to each pixel in an image based on the
pixel's own intensity value. These operations involve simple
mathematical transformations or adjustments to the pixel
values without considering the values of neighboring pixels.
Point operations are typically used for basic image
enhancement tasks such as contrast adjustment, brightness
correction, and intensity mapping. The result of a point
operation is a new image where each pixel's intensity has been
modified according to a specific rule or function.

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.

- Contrast Stretching: This technique increases the contrast


of an image by mapping the pixel values to a wider range.

- Thresholding: converts a grayscale image to a binary image


by assigning a pixel value of either 0 or 255 based on the
threshold value.

- Gamma Correction: This technique adjusts the brightness


of an image by applying power-law function to the pixel
values.

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.

1) Simple Thresholding: This is the most basic form of


thresholding, where a fixed threshold value is applied to
all pixels in an image, if the pixel intensity is below the
threshold, it is set to zero (black), if it is above the
threshold value then it is set to maximum value (white).

Simple Thresholding Example:

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.

Otsu’s thresholding method example:

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.

Adaptive Threshold method example:

There are many more methods and techniques for thresholding,


but we have only talked about the most common and important
ones.

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.

Spatial Filter has many methods such as:


1) Smoothing
2) Median Filtering
3) Sharpening
And many more methods, but these are the most common and
important ones.

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:

Average Filtering: This filter replaces the value of each pixel


with the average of the values in its neighborhood. The filter
can have different sizes and shapes, such as 3x3, 5x5, or circular.
The average filter is simple and effective, but it may cause some
loss of edge information and contrast.

16 | P a g e
Average Filtering Example:

An Image after applying average filtering:

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:

After applying the median filtering on an image:

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.

Sharpening has many techniques, in this report we will talk


about two important techniques, they are:

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.

To understand frequency domain methods, it's essential to


grasp the concept of the Fourier transform. The Fourier
transform decomposes an image into its constituent frequency
components, where each component represents the
contribution of a particular spatial frequency to the overall
image. Low-frequency components represent smooth variations
in the image, while high-frequency components represent
sharp edges and details.

23 | P a g e
Frequency domain methods utilize various techniques to
manipulate the frequency components of an image, such as:

• Filtering: By selectively attenuating or amplifying specific


frequency components, filters can achieve various effects,
such as smoothing, sharpening, and edge detection.

• Homomorphic filtering: This technique separates the


illumination and reflectance components of an image,
allowing for improved contrast enhancement and noise
reduction.

• Frequency domain equalization: This technique


redistributes the energy across different frequency bands,
effectively reducing noise and enhancing contrast.

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.

the illumination and reflectance components, and are


denoted i(x,y) and r(x,y) respectively. The
functions i and r combine multiplicatively to give the image
function F:
F(x,y) = i(x,y)r(x,y),

where and 0 < r(x,y) < 1. We cannot easily use the


above product to operate separately on the frequency
components of illumination and reflection because the Fourier
transform of the product of two functions is not separable; that
is

26 | P a g e
Suppose, however, that we define

Then

or

where Z, I and R are the Fourier transforms of and


respectively. The function Z represents the Fourier transform of
the sum of two images: a low frequency illumination image and
a high frequency reflectance image.

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

where S is the Fourier transform of the result. In the spatial


domain

By letting

and

we get

s(x,y) = i'(x,y) + r'(x,y).

Finally, as z was obtained by taking the logarithm of the original


image F, the inverse yields the desired enhanced image : that
is

28 | P a g e
Thus, the process of homomorphic filtering can be summarized
by the following diagram:

Frequency Domain Equalization


Frequency domain equalization is a technique used in image
processing to enhance the contrast and improve the overall
quality of images. It involves modifying the amplitude or phase
characteristics of specific frequency components in the
frequency domain to achieve desired enhancements. The goal
is often to compensate for irregularities or deficiencies in the
frequency spectrum of an image.

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.

- Scott E Umbaugh. 'Digital Image Processing and Analysis.'


Applications with MATLAB and CVIPtools, CRC Press,
11/30/2017.

- 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

You might also like