DIGITAL IMAGE PROCESSING
(Course Code: CSE 4007)
Module-2:Lecture-1
Image Enhancement
Image Enhancement
The objective of image enhancement is to improve the interpretability of the
information present in images for human viewers.
Enhancement methods are application specific and are often developed
empirically.
Image-enhancement techniques can be classified into two broad categories as
Spatial Domain Methods: manipulates the pixel of a given image for enhancement.
Frequency Domain Methods: manipulates the Fourier transform of a given image for
enhancement.
Image Enhancement in Spatial Domain 2
IMAGE ENHANCEMENT IN SPATIAL DOMAIN
The spatial domain technique deals with the manipulation of pixel values.
The spatial domain technique can be broadly classified into
Point operation: each pixel is modified by an equation that is not dependent on
other pixel values
Mask operation: each pixel is modified according to the values in a small
neighborhood
Global operation: all pixel values in the image are taken into consideration
Image Enhancement in Spatial Domain 3
MATHEMTICAL REPRESENTATION
f(m,n) : input g(m,n)=T[f(m,n)]
g(m,n) : output
T : transformation function
Image Enhancement in Spatial Domain 4
POINT OPERATIONS
The Some of the examples of point operation include
Brightness modification,
Contrast manipulation, and
Histogram manipulation.
Image Enhancement in Spatial Domain 5
BRIGHTNESS MODIFICATION
The brightness of an image depends on the value associated with the
pixel of the image.
increased by adding a constant value to each and every pixel
decreased by subtracting a constant value from each and every pixel
Image Enhancement in Spatial Domain 6
CONTRAST MANIPULATION
Contrast: is the difference in visual properties making an object/image
distinguishable from other objects and the background.
Contrast adjustment is done by scaling all the pixels of the image by a
constant k.
Image Enhancement in Spatial Domain 7
HISTOGRAM MANIPULATION
Histogram: The histogram of an image is a plot of the number of
occurrences of gray levels in the image against the gray-level values.
Histogram: is the discrete function h(rk)=nk , where rk is the kth gray level
in the range of [0, L-1] and nk is the number of pixels having gray level rk.
Normalized histogram: is p(rk)=nk/n, for k=0,1,…,L-1 and p(rk) can be
considered to give an estimate of the probability of occurrence of ray
level rk.
Image Enhancement in Spatial Domain 8
HISTOGRAM MANIPULATION
Types of Histograms x 10
4
16
14 Dark image
12
10
0 50 100 150 200 250
4
x 10
12
Bright image
10
0 50 100 150 200 250
Image Enhancement in Spatial Domain 9
HISTOGRAM MANIPULATION
Types of Histograms 5
x 10
2 Low contrast image
1.5
0.5
0 50 100 150 200 250
4
x 10
High contrast image
9
0 50 100 150 200 250
Image Enhancement in Spatial Domain 10
HISTOGRAM EQUALIZATION
Histogram equalization : is a method which increases the dynamic range
of the gray-levels in a low-contrast image to cover full range of gray-
levels.
How-to-Do: is achieved by having a transformation function which is the
Cumulative Distribution Function (CDF) of a given PDF of gray-levels in a
given image.
Find the running sum of the histogram values.
Normalize the values from Step (1) by dividing by the total number of pixels.
Multiply the values from Step (2) by the maximum gray-level value and round.
Map the gray level values to the results from Step (3) using a one-to-one
correspondence.
Image Enhancement in Spatial Domain 11
HISTOGRAM EQUALIZATION
The maximum value is found to be 5. We need a minimum of 3 bits to represent the number. There are eight possible
gray levels from 0 to 7. The histogram of the input image is given below:
Image Enhancement in Spatial Domain 12
HISTOGRAM EQUALIZATION
Image Enhancement in Spatial Domain 13
HISTOGRAM EQUALIZATION
Image Enhancement in Spatial Domain 14
HISTOGRAM EQUALIZATION
Image Enhancement in Spatial Domain 15
HISTOGRAM EQUALIZATION
Image Enhancement in Spatial Domain 16
Pixel Relationships 17