SlideShare a Scribd company logo
1
UNIT-2
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN
Introduction to Image enhancement:
 Image enhancement is to process a given image so that the result is more
suitable than the original image for a specific application.
 Objective of Image enhancement
Principle objective of Image enhancement is to process an image so that result
is more suitable than original image for specific application
 Image enhancement approaches fall into two broad categories:
1. Spatial domain methods
2. Frequency domain methods
 Spatial domain refers to the image plane itself, and approaches in this category
are based on direct manipulation of pixels in an image.
 Frequency domain processing techniques are based on modifying the Fourier
transform of an image.
2
1. Spatial domain:-
Spatial domain refers to the image plane itself, and approaches in this category are
based on direct manipulation of pixels in an image.
Spatial domain processes will be denoted by the expression
g (x, y) = T [f (x, y)]
Where,
f(x, y) - input image,
g(x, y) - processed image
T - Operator on f, defined over some neighborhood of (x, y).
The neighborhood about a point (x, y) is to use a square or rectangular sub image area
centered at (x, y)
Figure 1: 3*3 neighborhood about a point (x, y) in an image.
The center of sub image is moved from pixel to pixel starting at the top left
corner. The operator T is applied to each location (x,y) to find the output g at
that location . The process utilizes only the pixel in the area of the image
spanned by the neighborhood.
Basic Gray Level Transformation Functions
Here, T is a gray-level transformation function of the form:
s = T(r)
Where, r and s - denote the gray level of f(x, y) and g(x, y) at any point (x, y).
3
(a) (b)
Figure 2 a, b: Gray level transformation functions for contrast enhancement.
Image enhancement can be done through gray level transformations which are
discussed below.
Intensity/ Gray Level Transformations:
These are the simplest image enhancement techniques.
1. Linear (negative & Identity) transformation
2. Logarithmic (log & inverse) transformations
3. Power law(nth
& nth
root) transformations
4. Piecewise-Linear transformation functions
1. Linear transformation
1. Image Negative:-
The negative of an image with gray levels in the range [0, L-1] is obtained by using the
negative transformation.
Where r= gray level value at pixel (x,y)
L is the largest gray level consists in the image
S = L – 1 - r
4
i. If r=0, S = L – 1
ii. If r=L – 1, S = 0
Fig. Negative transformations
This type of processing is particularly suited for enhancing white or gray detail embedded in dark
regions of an image, especially when the black areas are dominant in size.
2. Logarithmic transformations
Logarithmic transformation further contains two type of transformation. Log
transformation and inverse log transformation.
a) Log Transformations:
The log transformations can be defined by this formula
s = c log (1 + r)
Where S and r are the pixel values of the output and the input image and c is a
constant and it is assumed that r ≥ 0
During log transformation, the dark pixels in an image are expanded as compare to the
higher pixel values. The higher pixel values are kind of compressed in log
transformation. This result in following image enhancement
The inverse log transformation is opposite to log transformation so will reduce
low contrast image.
5
3. Power-Law Transformations
Power-law transformations have the basic form
s = c ry
Where c and γ are positive constants. Also can be represented as
s = c (r+ε) y
This symbol γ is called gamma
We use gamma transformation where we need to expand or compress darker region
i. If γ = 1, No change
ii. If γ > 1, compresses dark values and expands bright values
iii. If γ < 1, expands dark values Compresses bright values
6
Power law curves with fractional values of y map a narrow range of dark input values
into a wider range of output values, with the opposite being true for higher values of
input gray levels. We may get various curves by varying values of y.
Piecewise-Linear Transformations
1. Contrast Stretching
 It is the simplest piecewise linear transformation function
 The idea behind contrast stretching is to increase the dynamic range of
gray levels in the image being processed.
a) If r1=s1 and r2=s2, linear transformation
b) If r1=r2 & s1=0, s2=L-1, thresholding
c) Intermediate values of (r1, s1) and (r2, s2) produce various degrees of spread
in the gray value
7
2. Gray-level Slicing
Gray level slicing is used to Highlighting a specific range of gray levels in an image.
For example when enhancing features such as masses of water in satellite
image and enhancing flaws in x- ray images.
There are two methods of doing this-
(1) One method is to display a high value for all gray level in the range of interest and
a low value for all other gray level
(2) Second method is to brighten the desired ranges of gray levels but preserve the
background and gray level tonalities in the image.
8
3. Bit-plane Slicing
 Highlighting the contribution made to total image appearance by specific bits
might be desired.
 It is useful in image compression.
Suppose that each pixel in an image is represented by 8 bits. Imagine that the image is
composed of eight 1-bit planes, ranging from bit-plane 0 for the least significant bit to
bit plane 7 for the most significant bit. In terms of 8-bit bytes, plane 0 contains all the
lowest order bits in the bytes comprising the pixels in the image and plane 7 contains
all the high-order bits.
Example 1:- find the bit planes of given 3x3 image
Solution:
9
Example 2: find the bit planes of given 3x3 image
Solution: binary representation of given image
Histogram Processing
The histogram of a digital image with gray levels in the range [0, L-1] is a discrete
function
h(rk)=nk
Where rk is the kth
gray level and nk is the number of pixels in the image having gray
level rk.
p(rk) is an estimate of the probability of occurrence of intensity level rk in an image.
10
Histogram Equalization
Histogram equalization is a technique for enhancing the appearance of images.
Let us consider the transformations as,
s=T(r), where 0 ≤ r ≤ 1
We assume that the transformation function T(r) satisfies the following conditions:
a. T(r) is a monotonically increasing function in the interval 0 ≤ r ≤ L-1:
b. 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1:
Equalization automatically determines a transformation function that seeks to produce
an output image that has a uniform histogram. It is a good approach when automatic
enhancement is needed
Histogram Equalization (Example)
11
Solution: based on above table histogram of input image
12
13
Figure: Processed histogram
So, that
Input image output image
Example:
14
Processed Histogram
15
Question:
Is histogram equalization always good?
Ans: No
16
17
Normalized hitogram
18
Basics of Spatial Filtering
 Filter term in “image processing” is referred to the subimage
 This sub image is called a filter, mask, kernel, template or window;
 The values in the filter sub image are referred to as coefficients rather than
pixel. Spatial filtering operations are performed directly on the pixels values
of the image
 The process consists of moving the filter mask from point to point in the image.
 The filter mask may be 3x3 mask or 5x5 mask or to be 7x7 mask.
1. Smoothing Spatial Filters:
Smoothing filters are used for blurring and noise reduction in the image.
 Blurring is pre-processing steps for removal of small details and Noise
Reduction is accomplished by blurring.
 Noise reduction can be accomplished blurring with a linear filter and also by
non-linear filtering.
Types of Smoothing Spatial Filter:
There are two way of smoothing special filters
1. Smoothing Linear Filters:
2. Order Statistics Filters:-
1. Smoothing Linear Filter:-
 The output of a smoothing liner spatial filter is simply the average of the pixel
contained in the neighborhood of the filter mask.
 These filters are also called averaging filters or low pass filters.
 A major application of smoothing is noise reduction.
19
a) Averaging filter:
A spatial averaging filter in which all coefficients are equal is sometimes
referred to as a “box filter”
Example:
b) Weighted averaging filter:
A weighted average filter is the one in which pixel are multiplied by different
coefficients.
Example:
.
2. Order Statistics Filter:-
Median filter
 In this filter the values of the center pixel is replaced by median of gray levels in the
neighborhood of that pixel.
 Median filters are popular because, provide excellent noise-reduction capabilities,
with less blurring than linear smoothing filters.
20
 These filters are particularly effective in the case of impulse or salt and pepper noise.
Example
Max filters
This filter is useful for finding the brightest points in an image.
Min filters
This filter is useful for finding the darkest points in an image.
Sharpening Filters:
The principal objective of sharpening is to highlight fine details in an image
21

More Related Content

Similar to UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU

Module 2
Module 2Module 2
Module 2
UllasSS1
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
Malik obeisat
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Dr INBAMALAR T M
 
image enhancement
 image enhancement image enhancement
image enhancement
Rajendra Prasad
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
ssuser0bf6a8
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
Surabhi Ks
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
ShardaSalunkhe1
 
h.pdf
h.pdfh.pdf
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
Mayuri Narkhede
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
alobaidimki
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
Moe Moe Myint
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
SAhsanShahBukhari
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
ISRAR HUSSAIN
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
BHAGYAPRASADBUGGE
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
Prof. Dr. Subhasis Bose
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
nagwaAboElenein
 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
ijsrd.com
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
shabanam tamboli
 

Similar to UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU (20)

Module 2
Module 2Module 2
Module 2
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
image enhancement
 image enhancement image enhancement
image enhancement
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Chap5 imange enhancemet
Chap5 imange enhancemetChap5 imange enhancemet
Chap5 imange enhancemet
 
h.pdf
h.pdfh.pdf
h.pdf
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
4 image enhancement in spatial domain
4 image enhancement in spatial domain4 image enhancement in spatial domain
4 image enhancement in spatial domain
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 

Recently uploaded

Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
Paris Salesforce Developer Group
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
FULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back EndFULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back End
PreethaV16
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
AI in customer support Use cases solutions development and implementation.pdf
AI in customer support Use cases solutions development and implementation.pdfAI in customer support Use cases solutions development and implementation.pdf
AI in customer support Use cases solutions development and implementation.pdf
mahaffeycheryld
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
q30122000
 
Presentation on Food Delivery Systems
Presentation on Food Delivery SystemsPresentation on Food Delivery Systems
Presentation on Food Delivery Systems
Abdullah Al Noman
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
snaprevwdev
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
Indrajeet sahu
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptxEV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
nikshimanasa
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
OKORIE1
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Balvir Singh
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
DharmaBanothu
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
Assistant Engineer (Chemical) Interview Questions.pdf
Assistant Engineer (Chemical) Interview Questions.pdfAssistant Engineer (Chemical) Interview Questions.pdf
Assistant Engineer (Chemical) Interview Questions.pdf
Seetal Daas
 

Recently uploaded (20)

Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
FULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back EndFULL STACK PROGRAMMING - Both Front End and Back End
FULL STACK PROGRAMMING - Both Front End and Back End
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
AI in customer support Use cases solutions development and implementation.pdf
AI in customer support Use cases solutions development and implementation.pdfAI in customer support Use cases solutions development and implementation.pdf
AI in customer support Use cases solutions development and implementation.pdf
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
 
Presentation on Food Delivery Systems
Presentation on Food Delivery SystemsPresentation on Food Delivery Systems
Presentation on Food Delivery Systems
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptxEV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
EV BMS WITH CHARGE MONITOR AND FIRE DETECTION.pptx
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Assistant Engineer (Chemical) Interview Questions.pdf
Assistant Engineer (Chemical) Interview Questions.pdfAssistant Engineer (Chemical) Interview Questions.pdf
Assistant Engineer (Chemical) Interview Questions.pdf
 

UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU

  • 1. 1 UNIT-2 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN Introduction to Image enhancement:  Image enhancement is to process a given image so that the result is more suitable than the original image for a specific application.  Objective of Image enhancement Principle objective of Image enhancement is to process an image so that result is more suitable than original image for specific application  Image enhancement approaches fall into two broad categories: 1. Spatial domain methods 2. Frequency domain methods  Spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image.  Frequency domain processing techniques are based on modifying the Fourier transform of an image.
  • 2. 2 1. Spatial domain:- Spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image. Spatial domain processes will be denoted by the expression g (x, y) = T [f (x, y)] Where, f(x, y) - input image, g(x, y) - processed image T - Operator on f, defined over some neighborhood of (x, y). The neighborhood about a point (x, y) is to use a square or rectangular sub image area centered at (x, y) Figure 1: 3*3 neighborhood about a point (x, y) in an image. The center of sub image is moved from pixel to pixel starting at the top left corner. The operator T is applied to each location (x,y) to find the output g at that location . The process utilizes only the pixel in the area of the image spanned by the neighborhood. Basic Gray Level Transformation Functions Here, T is a gray-level transformation function of the form: s = T(r) Where, r and s - denote the gray level of f(x, y) and g(x, y) at any point (x, y).
  • 3. 3 (a) (b) Figure 2 a, b: Gray level transformation functions for contrast enhancement. Image enhancement can be done through gray level transformations which are discussed below. Intensity/ Gray Level Transformations: These are the simplest image enhancement techniques. 1. Linear (negative & Identity) transformation 2. Logarithmic (log & inverse) transformations 3. Power law(nth & nth root) transformations 4. Piecewise-Linear transformation functions 1. Linear transformation 1. Image Negative:- The negative of an image with gray levels in the range [0, L-1] is obtained by using the negative transformation. Where r= gray level value at pixel (x,y) L is the largest gray level consists in the image S = L – 1 - r
  • 4. 4 i. If r=0, S = L – 1 ii. If r=L – 1, S = 0 Fig. Negative transformations This type of processing is particularly suited for enhancing white or gray detail embedded in dark regions of an image, especially when the black areas are dominant in size. 2. Logarithmic transformations Logarithmic transformation further contains two type of transformation. Log transformation and inverse log transformation. a) Log Transformations: The log transformations can be defined by this formula s = c log (1 + r) Where S and r are the pixel values of the output and the input image and c is a constant and it is assumed that r ≥ 0 During log transformation, the dark pixels in an image are expanded as compare to the higher pixel values. The higher pixel values are kind of compressed in log transformation. This result in following image enhancement The inverse log transformation is opposite to log transformation so will reduce low contrast image.
  • 5. 5 3. Power-Law Transformations Power-law transformations have the basic form s = c ry Where c and γ are positive constants. Also can be represented as s = c (r+ε) y This symbol γ is called gamma We use gamma transformation where we need to expand or compress darker region i. If γ = 1, No change ii. If γ > 1, compresses dark values and expands bright values iii. If γ < 1, expands dark values Compresses bright values
  • 6. 6 Power law curves with fractional values of y map a narrow range of dark input values into a wider range of output values, with the opposite being true for higher values of input gray levels. We may get various curves by varying values of y. Piecewise-Linear Transformations 1. Contrast Stretching  It is the simplest piecewise linear transformation function  The idea behind contrast stretching is to increase the dynamic range of gray levels in the image being processed. a) If r1=s1 and r2=s2, linear transformation b) If r1=r2 & s1=0, s2=L-1, thresholding c) Intermediate values of (r1, s1) and (r2, s2) produce various degrees of spread in the gray value
  • 7. 7 2. Gray-level Slicing Gray level slicing is used to Highlighting a specific range of gray levels in an image. For example when enhancing features such as masses of water in satellite image and enhancing flaws in x- ray images. There are two methods of doing this- (1) One method is to display a high value for all gray level in the range of interest and a low value for all other gray level (2) Second method is to brighten the desired ranges of gray levels but preserve the background and gray level tonalities in the image.
  • 8. 8 3. Bit-plane Slicing  Highlighting the contribution made to total image appearance by specific bits might be desired.  It is useful in image compression. Suppose that each pixel in an image is represented by 8 bits. Imagine that the image is composed of eight 1-bit planes, ranging from bit-plane 0 for the least significant bit to bit plane 7 for the most significant bit. In terms of 8-bit bytes, plane 0 contains all the lowest order bits in the bytes comprising the pixels in the image and plane 7 contains all the high-order bits. Example 1:- find the bit planes of given 3x3 image Solution:
  • 9. 9 Example 2: find the bit planes of given 3x3 image Solution: binary representation of given image Histogram Processing The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function h(rk)=nk Where rk is the kth gray level and nk is the number of pixels in the image having gray level rk. p(rk) is an estimate of the probability of occurrence of intensity level rk in an image.
  • 10. 10 Histogram Equalization Histogram equalization is a technique for enhancing the appearance of images. Let us consider the transformations as, s=T(r), where 0 ≤ r ≤ 1 We assume that the transformation function T(r) satisfies the following conditions: a. T(r) is a monotonically increasing function in the interval 0 ≤ r ≤ L-1: b. 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1: Equalization automatically determines a transformation function that seeks to produce an output image that has a uniform histogram. It is a good approach when automatic enhancement is needed Histogram Equalization (Example)
  • 11. 11 Solution: based on above table histogram of input image
  • 12. 12
  • 13. 13 Figure: Processed histogram So, that Input image output image Example:
  • 16. 16
  • 18. 18 Basics of Spatial Filtering  Filter term in “image processing” is referred to the subimage  This sub image is called a filter, mask, kernel, template or window;  The values in the filter sub image are referred to as coefficients rather than pixel. Spatial filtering operations are performed directly on the pixels values of the image  The process consists of moving the filter mask from point to point in the image.  The filter mask may be 3x3 mask or 5x5 mask or to be 7x7 mask. 1. Smoothing Spatial Filters: Smoothing filters are used for blurring and noise reduction in the image.  Blurring is pre-processing steps for removal of small details and Noise Reduction is accomplished by blurring.  Noise reduction can be accomplished blurring with a linear filter and also by non-linear filtering. Types of Smoothing Spatial Filter: There are two way of smoothing special filters 1. Smoothing Linear Filters: 2. Order Statistics Filters:- 1. Smoothing Linear Filter:-  The output of a smoothing liner spatial filter is simply the average of the pixel contained in the neighborhood of the filter mask.  These filters are also called averaging filters or low pass filters.  A major application of smoothing is noise reduction.
  • 19. 19 a) Averaging filter: A spatial averaging filter in which all coefficients are equal is sometimes referred to as a “box filter” Example: b) Weighted averaging filter: A weighted average filter is the one in which pixel are multiplied by different coefficients. Example: . 2. Order Statistics Filter:- Median filter  In this filter the values of the center pixel is replaced by median of gray levels in the neighborhood of that pixel.  Median filters are popular because, provide excellent noise-reduction capabilities, with less blurring than linear smoothing filters.
  • 20. 20  These filters are particularly effective in the case of impulse or salt and pepper noise. Example Max filters This filter is useful for finding the brightest points in an image. Min filters This filter is useful for finding the darkest points in an image. Sharpening Filters: The principal objective of sharpening is to highlight fine details in an image
  • 21. 21