SlideShare a Scribd company logo
Image Enhancement in Digital Image Processing
Israr Hussain
2021/7/05
INSIGHT:
1. Introduction
2. Why Image Enhancement?
3. What is Image Enhancement?
4. Image Enhancement techniques
5. Examples of Image Enhancement techniques
6. Spatial Domain Enhancement
7. Enhancement methods
8. Conversion methods
9. Resources required
10. Experimental results
11. Applications of image enhancement techniques.
12. Conclusion
INTRODUCTION:
An image defined in the “real
world” is considered to be a function of
two real variables, for example, a(x,y)
with a as the amplitude (e.g. brightness) of
the image at the real coordinate position
(x,y)
Image processing is the study of
any algorithm that takes an image as input
and returns an image as output. It includes
the following:
1. Image display and printing
2. Image editing and
manipulation
3. Image enhancement
4. Feature detection
5. Image compression.
JPEG
Original
Compression
WHY IMAGE ENHANCEMENT?
The aim of image enhancement is to improve the visual appearance of an
image, or to provide a “better transform representation for future automated
image processing.
Many images like medical images, satellite images, aerial images and e
v
e
nreal life
photographs suffer from poor contrast and noise.
It is necessary to enhance the contrast and remove the noise to increase i
m
a
g
e
quality.
Enhancement techniques which improves the quality (clarity) of images for
human viewing, removing blurring and noise, increasing contrast, and
revealing details are examples of enhancement operations.
WHAT IS IMAGE ENHANCEMENT?
Image enhancement process consists of a collection of techniques t
h
a
t seek to
improve the visual appearance of an image or to convert the image to a
form better suited for analysis by a human or machine.
The principal objective of image enhancement is to modify attributes o
fan
image to make it more suitable for a given task and a specific observer.
Enhancement
Technique
Input Image “Better” Image
Application specific
IMAGE ENHANCEMENT
TECHNIQUES:
The existing techniques of image enhancement can be classified into
two categories:
• Spatial domain enhancement
• Frequency domain enhancement.
EXAMPLES OF IMAGE ENHANCEMENT
TECHNIQUES:
1. Noise removal
Noisy image De-noised image
2. Contrast adjustment
Low contrast Original contrast High contrast
SPATIAL DOMAIN ENHANCEMENT:
x
•Spatial domain techniques are performed to
the image plane itself and they are based on
direct manipulation of pixels in an image.
• The operation can be formulated as
g(x,y)=T[f(x,y)], where g is the output, f is the
input image and T is an operation on f defined
over some neighbourhood of (x,y).
•According to the operations on the image
pixels, it can be further divided into 2
categories:
oPoint operations and
oSpatial operations (including linear and non-
linear operations).
ENHANCEMENT METHODS:
1.Contrast stretching :
•Low-contrast images can result from poor illumination, lack of dynamic range in
the image sensor, or even wrong setting of a lens aperture.
•The idea behind contrast stretching is to increase the dynamic range of the gray
levels in the image being processed.
• The general form is:
s =
1+ (m / r) E
where, r are the input image values, s are the output image
values, m is the thresholding value and E the slope.
1
Figure shows the effect of the variable E:
• If E = 1 the stretching became a threshold transformation.
• If E > 1 the transformation is defined by the curve which is smoother and
• When E < 1 the transformation makes the negative and also stretching.
2. Noise reduction :
This is accomplished by averaging and median filtering. These
are as follows:
a. Median Filtering :
• The median filter is normally used to reduce noise in an image by
preserving useful detail in the image.
• The median filter considers each pixel in the image in turn and looks at its
nearby neighbors to decide whether or not it is representative of its
surroundings.
• The median is calculated by first sorting all the pixel values from the
surrounding neighborhood into numerical order and then replacing the
pixel being considered with the middle pixel value.
Figure below illustrates an example calculation.
b.Noise removal using Averaging:
• Image averaging works on the assumption that the noise in your image is
truly random.
• This way, random fluctuations above and below actual image data will
gradually even out as one averages more and more images.
Median filtering
This kind of the noise are called salt
and pepper noise
If we apply smooth filtering we cant
remove the noise.
Median filtering steps
Image enhancement lecture
Median filtering
Pixel
replication
Pixel Replicated images convol in Median
filtering
Ascending
order
Move the empty mask and note all the 9
pixels
3. Intensity Adjustment :
•
•
•
Intensity adjustment is a technique for mapping an image's intensity values to
a new range.
For example, rice.tif. is a low contrast image. The histogram of rice.tif, shown
in Figure below, indicates that there are no values below 40 or above 225. If
you remap the data values to fill the entire intensity range [0, 255], you can
increase the contrast of the image.
You can do this kind of adjustment with the imadjust function. The general
syntax of imadjust is
J = imadjust(I,[low_in high_in],[low_out high_out])
4. Histogram equalization:
•
•
Histogram Equalization is a technique that generates a gray map which
changes the histogram of an image and redistributing all pixels values to be as
close as possible to a user – specified desired histogram.
It allows for areas of lower local contrast to gain a higher contrast.
Figure above shows the original image and its histogram, and the equalized
versions. Both images are quantized to 64grey levels.
Use of Histogram Equalization
Manipulating Contrast
Brightness
Histogram can control the image Quality
Quality Normalizing Histogram Flat profile
To get a high quality image the histogram should be normalize to be a flat profile
Histogram Equalization
Example
Cumulative Distribution function
Probability distinction fucntion
Histogram Equalization
5. Image thresholding:
•
•
•
Thresholding is the simplest segmentation method.
The pixels are partitioned depending on their intensity value T.
Global thresholding, using an appropriate threshold T:
g(x, y) = 1, if f (x, y) > T
0, if f (x, y) <= T
• Imagine a poker playing robot that needs to visually interpret the cards in its
hand:
Original Image Thresholded Image
Image enhancement lecture
Image enhancement lecture
If you get the threshold wrong the results can be disastrous:
Threshold Too High Threshold Too Low
6. Grey level slicing
•
•
Grey level slicing is the spatial domain equivalent to band-pass
filtering.
A grey level slicing function can either emphasize a group of intensities
and diminish all others or it can emphasize a group of grey levels and
leave the rest alone.
The figure above shows An example of gray level slicing with and without
background
7. Image rotation:
• Image rotation in the digital domain is a form of re-sampling but is
performed on non-integer points.
•The equation below gives the coordinate transformation in terms of rotation
of the coordinate axis.
Sx = Dx cos(θ) + Dy sin(θ)
Sy = -Dx sin(θ) + Dy cos (θ)
Where, S and D represent source and destination coordinates.
0° rotation 90° rotation 180° rotation
CONVERSION METHODS:
1.Greyscale conversion:
•Conversion of a colour image into a greyscale image inclusive of salient features
is a complicated process.
•The converted greyscale image may lose contrasts, sharpness, shadow, and
structure of the colour image.
•To preserve these salient features, the colour image is converted into greyscale
image using three algorithms as stated:
a. The lightness method averages the most prominent and least prominent
colors: (max(R, G, B) + min(R, G, B)) / 2.
b. The average method simply averages the values: (R + G + B) / 3.
c. The luminosity method is a more sophisticated version of the average
method. The formula for luminosity is 0.21 R + 0.71 G + 0.07 B.
Conversion Method link
https://mmuratarat.github.io/2020-05-
13/rgb_to_grayscale_formulas
The example of sunflower images are as follows:
Original image Lightness
Average Luminosity
Weighted average
This is the grayscale conversion algorithm that OpenCV’s
Average method
Average method is the most simple one. You just have to
take the average of three colors. Since its an RGB image, so
it means that you have add R with G with B and then divide it
by 3 to get your desired grayscale image.
grayscale_average_img = np.mean(fix_img, axis=2)
The luminosity method
This method is a more sophisticated version of the average
method. It also averages the values, but it forms a weighted
average to account for human perception
According to this equation, Red has contribute 21%, Green has
contributed 72% which is greater in all three colors and Blue has
contributed 7%.
2. Image File Format:
•
•
The file format is critical to the preservation of an image.
The TIFF file (tagged image file format) is the current preservation format
because it holds all the preservation information required to create a digital
master of the original.
Some of the file formats are: TIFF Preferred Archival format, JPEG
Irreversible image compression, DNG Universal camera raw format etc.
Original JPEG Compression
RESOURCES REQUIRED:
Software requirements:
1. Windows Operating System XP and above.
2. MATLAB 7.10.0(R2010a)
Hardware requirements:
1. Hard disk: 16GB and above.
2. RAM: 1GB and above.
3. Processor: Dual-core and above.
EXPERIMENTAL RESULTS:
Image enhancement lecture
Image enhancement lecture
Image enhancement lecture
Image enhancement lecture
180° rotation
APPLICATIONS:
Biology Astronomy
Medicines Security, Biometrics
Satellite imagery Personal imagery
• The material presented is representative of spatial domain
technique commonly used in practice for image enhancement.
• This area of image processing is a dynamic field, and new
technique and applications are reported routinely in professional
literature and in new product announcement.
•In addition to enhancement, this serves the purpose of introducing a
number of concepts such as intensity adjustment, contrast stretching,
noise filtering, etc. that will be useful in various fields.
CONCLUSION:
Image enhancement lecture

More Related Content

PPT
Image enhancement
PDF
Image Restoration (Digital Image Processing)
PPTX
Image enhancement
PPTX
WSN-IEEE 802.15.4 -MAC Protocol
PPTX
Introduction to Computer Graphics
PPTX
Unit3 dip
PPT
AI Lecture 7 (uncertainty)
PPTX
Surveying
Image enhancement
Image Restoration (Digital Image Processing)
Image enhancement
WSN-IEEE 802.15.4 -MAC Protocol
Introduction to Computer Graphics
Unit3 dip
AI Lecture 7 (uncertainty)
Surveying

What's hot (20)

PPTX
Image restoration and degradation model
PPSX
Image Enhancement in Spatial Domain
PPTX
Image Enhancement in Spatial Domain
PDF
Digital Image Processing: Image Segmentation
PPTX
Digital Image restoration
PPTX
Digital Image Processing
PPTX
Region based segmentation
PPTX
SPATIAL FILTERING IN IMAGE PROCESSING
PPTX
Fundamentals steps in Digital Image processing
PPTX
Digital image processing
PPTX
Chapter 1 and 2 gonzalez and woods
ODP
image compression ppt
PPTX
Color image processing Presentation
PPT
Image segmentation
PPT
Chapter10 image segmentation
PPT
Image pre processing
PPT
Digital Image Processing
PDF
Image compression
PPT
image enhancement
Image restoration and degradation model
Image Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
Digital Image Processing: Image Segmentation
Digital Image restoration
Digital Image Processing
Region based segmentation
SPATIAL FILTERING IN IMAGE PROCESSING
Fundamentals steps in Digital Image processing
Digital image processing
Chapter 1 and 2 gonzalez and woods
image compression ppt
Color image processing Presentation
Image segmentation
Chapter10 image segmentation
Image pre processing
Digital Image Processing
Image compression
image enhancement
Ad

Similar to Image enhancement lecture (20)

PPT
Image enhancement ppt nal2
PPTX
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
PDF
PPTX
Chapter 3 Image Enhanvement_ComputerVision.pptx
PPT
Digital Image Processing_ ch2 enhancement spatial-domain
PPTX
AI Unit-5 Image Processing for all ML problems
PDF
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
PPT
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
PDF
Digital Image Processing - Image Enhancement
PDF
Digital image processing - Image Enhancement (MATERIAL)
PPTX
Image processing second unit Notes
PDF
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
PPTX
Digital Image Processing - Image Enhancement.pptx
PDF
A review on image enhancement techniques
PPTX
image enhancement image enhancement imag
PPTX
Image enhancement techniques
PPTX
Basic Spatial domain image enhancements.pptx
PPT
Image Enhancement in the Spatial Domain1.ppt
PPT
Image enhancement in the spatial domain1
PPTX
Imagee.pptx
Image enhancement ppt nal2
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
Chapter 3 Image Enhanvement_ComputerVision.pptx
Digital Image Processing_ ch2 enhancement spatial-domain
AI Unit-5 Image Processing for all ML problems
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
Digital Image Processing - Image Enhancement
Digital image processing - Image Enhancement (MATERIAL)
Image processing second unit Notes
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
Digital Image Processing - Image Enhancement.pptx
A review on image enhancement techniques
image enhancement image enhancement imag
Image enhancement techniques
Basic Spatial domain image enhancements.pptx
Image Enhancement in the Spatial Domain1.ppt
Image enhancement in the spatial domain1
Imagee.pptx
Ad

Recently uploaded (20)

PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Well-logging-methods_new................
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Construction Project Organization Group 2.pptx
PDF
PPT on Performance Review to get promotions
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Project quality management in manufacturing
PPTX
Welding lecture in detail for understanding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Well-logging-methods_new................
Arduino robotics embedded978-1-4302-3184-4.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Lesson 3_Tessellation.pptx finite Mathematics
Model Code of Practice - Construction Work - 21102022 .pdf
UNIT 4 Total Quality Management .pptx
OOP with Java - Java Introduction (Basics)
Structs to JSON How Go Powers REST APIs.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
bas. eng. economics group 4 presentation 1.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Construction Project Organization Group 2.pptx
PPT on Performance Review to get promotions
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Project quality management in manufacturing
Welding lecture in detail for understanding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Image enhancement lecture

  • 1. Image Enhancement in Digital Image Processing Israr Hussain 2021/7/05
  • 2. INSIGHT: 1. Introduction 2. Why Image Enhancement? 3. What is Image Enhancement? 4. Image Enhancement techniques 5. Examples of Image Enhancement techniques 6. Spatial Domain Enhancement 7. Enhancement methods 8. Conversion methods 9. Resources required 10. Experimental results 11. Applications of image enhancement techniques. 12. Conclusion
  • 3. INTRODUCTION: An image defined in the “real world” is considered to be a function of two real variables, for example, a(x,y) with a as the amplitude (e.g. brightness) of the image at the real coordinate position (x,y) Image processing is the study of any algorithm that takes an image as input and returns an image as output. It includes the following: 1. Image display and printing 2. Image editing and manipulation 3. Image enhancement 4. Feature detection 5. Image compression. JPEG Original Compression
  • 4. WHY IMAGE ENHANCEMENT? The aim of image enhancement is to improve the visual appearance of an image, or to provide a “better transform representation for future automated image processing. Many images like medical images, satellite images, aerial images and e v e nreal life photographs suffer from poor contrast and noise. It is necessary to enhance the contrast and remove the noise to increase i m a g e quality. Enhancement techniques which improves the quality (clarity) of images for human viewing, removing blurring and noise, increasing contrast, and revealing details are examples of enhancement operations.
  • 5. WHAT IS IMAGE ENHANCEMENT? Image enhancement process consists of a collection of techniques t h a t seek to improve the visual appearance of an image or to convert the image to a form better suited for analysis by a human or machine. The principal objective of image enhancement is to modify attributes o fan image to make it more suitable for a given task and a specific observer. Enhancement Technique Input Image “Better” Image Application specific
  • 6. IMAGE ENHANCEMENT TECHNIQUES: The existing techniques of image enhancement can be classified into two categories: • Spatial domain enhancement • Frequency domain enhancement.
  • 7. EXAMPLES OF IMAGE ENHANCEMENT TECHNIQUES: 1. Noise removal Noisy image De-noised image 2. Contrast adjustment Low contrast Original contrast High contrast
  • 8. SPATIAL DOMAIN ENHANCEMENT: x •Spatial domain techniques are performed to the image plane itself and they are based on direct manipulation of pixels in an image. • The operation can be formulated as g(x,y)=T[f(x,y)], where g is the output, f is the input image and T is an operation on f defined over some neighbourhood of (x,y). •According to the operations on the image pixels, it can be further divided into 2 categories: oPoint operations and oSpatial operations (including linear and non- linear operations).
  • 9. ENHANCEMENT METHODS: 1.Contrast stretching : •Low-contrast images can result from poor illumination, lack of dynamic range in the image sensor, or even wrong setting of a lens aperture. •The idea behind contrast stretching is to increase the dynamic range of the gray levels in the image being processed. • The general form is: s = 1+ (m / r) E where, r are the input image values, s are the output image values, m is the thresholding value and E the slope. 1
  • 10. Figure shows the effect of the variable E: • If E = 1 the stretching became a threshold transformation. • If E > 1 the transformation is defined by the curve which is smoother and • When E < 1 the transformation makes the negative and also stretching.
  • 11. 2. Noise reduction : This is accomplished by averaging and median filtering. These are as follows: a. Median Filtering : • The median filter is normally used to reduce noise in an image by preserving useful detail in the image. • The median filter considers each pixel in the image in turn and looks at its nearby neighbors to decide whether or not it is representative of its surroundings. • The median is calculated by first sorting all the pixel values from the surrounding neighborhood into numerical order and then replacing the pixel being considered with the middle pixel value.
  • 12. Figure below illustrates an example calculation. b.Noise removal using Averaging: • Image averaging works on the assumption that the noise in your image is truly random. • This way, random fluctuations above and below actual image data will gradually even out as one averages more and more images.
  • 13. Median filtering This kind of the noise are called salt and pepper noise If we apply smooth filtering we cant remove the noise. Median filtering steps
  • 16. Pixel Replicated images convol in Median filtering Ascending order
  • 17. Move the empty mask and note all the 9 pixels
  • 18. 3. Intensity Adjustment : • • • Intensity adjustment is a technique for mapping an image's intensity values to a new range. For example, rice.tif. is a low contrast image. The histogram of rice.tif, shown in Figure below, indicates that there are no values below 40 or above 225. If you remap the data values to fill the entire intensity range [0, 255], you can increase the contrast of the image. You can do this kind of adjustment with the imadjust function. The general syntax of imadjust is J = imadjust(I,[low_in high_in],[low_out high_out])
  • 19. 4. Histogram equalization: • • Histogram Equalization is a technique that generates a gray map which changes the histogram of an image and redistributing all pixels values to be as close as possible to a user – specified desired histogram. It allows for areas of lower local contrast to gain a higher contrast. Figure above shows the original image and its histogram, and the equalized versions. Both images are quantized to 64grey levels.
  • 20. Use of Histogram Equalization Manipulating Contrast Brightness Histogram can control the image Quality Quality Normalizing Histogram Flat profile To get a high quality image the histogram should be normalize to be a flat profile
  • 24. 5. Image thresholding: • • • Thresholding is the simplest segmentation method. The pixels are partitioned depending on their intensity value T. Global thresholding, using an appropriate threshold T: g(x, y) = 1, if f (x, y) > T 0, if f (x, y) <= T • Imagine a poker playing robot that needs to visually interpret the cards in its hand: Original Image Thresholded Image
  • 27. If you get the threshold wrong the results can be disastrous: Threshold Too High Threshold Too Low
  • 28. 6. Grey level slicing • • Grey level slicing is the spatial domain equivalent to band-pass filtering. A grey level slicing function can either emphasize a group of intensities and diminish all others or it can emphasize a group of grey levels and leave the rest alone. The figure above shows An example of gray level slicing with and without background
  • 29. 7. Image rotation: • Image rotation in the digital domain is a form of re-sampling but is performed on non-integer points. •The equation below gives the coordinate transformation in terms of rotation of the coordinate axis. Sx = Dx cos(θ) + Dy sin(θ) Sy = -Dx sin(θ) + Dy cos (θ) Where, S and D represent source and destination coordinates. 0° rotation 90° rotation 180° rotation
  • 30. CONVERSION METHODS: 1.Greyscale conversion: •Conversion of a colour image into a greyscale image inclusive of salient features is a complicated process. •The converted greyscale image may lose contrasts, sharpness, shadow, and structure of the colour image. •To preserve these salient features, the colour image is converted into greyscale image using three algorithms as stated: a. The lightness method averages the most prominent and least prominent colors: (max(R, G, B) + min(R, G, B)) / 2. b. The average method simply averages the values: (R + G + B) / 3. c. The luminosity method is a more sophisticated version of the average method. The formula for luminosity is 0.21 R + 0.71 G + 0.07 B.
  • 32. The example of sunflower images are as follows: Original image Lightness Average Luminosity
  • 33. Weighted average This is the grayscale conversion algorithm that OpenCV’s
  • 34. Average method Average method is the most simple one. You just have to take the average of three colors. Since its an RGB image, so it means that you have add R with G with B and then divide it by 3 to get your desired grayscale image. grayscale_average_img = np.mean(fix_img, axis=2)
  • 35. The luminosity method This method is a more sophisticated version of the average method. It also averages the values, but it forms a weighted average to account for human perception According to this equation, Red has contribute 21%, Green has contributed 72% which is greater in all three colors and Blue has contributed 7%.
  • 36. 2. Image File Format: • • The file format is critical to the preservation of an image. The TIFF file (tagged image file format) is the current preservation format because it holds all the preservation information required to create a digital master of the original. Some of the file formats are: TIFF Preferred Archival format, JPEG Irreversible image compression, DNG Universal camera raw format etc. Original JPEG Compression
  • 37. RESOURCES REQUIRED: Software requirements: 1. Windows Operating System XP and above. 2. MATLAB 7.10.0(R2010a) Hardware requirements: 1. Hard disk: 16GB and above. 2. RAM: 1GB and above. 3. Processor: Dual-core and above.
  • 46. • The material presented is representative of spatial domain technique commonly used in practice for image enhancement. • This area of image processing is a dynamic field, and new technique and applications are reported routinely in professional literature and in new product announcement. •In addition to enhancement, this serves the purpose of introducing a number of concepts such as intensity adjustment, contrast stretching, noise filtering, etc. that will be useful in various fields. CONCLUSION: