SlideShare a Scribd company logo
1 of 70
Download to read offline
INTENSITY
TRANSFORMATIONS
AND
SPATIAL FILTERING
Chapter 3
1
Agenda
This lecture will cover:
 What Is Image Enhancement?
 Intensity Transformation Functions
 Piecewise-Linear Transformation Functions
 Histogram Processing
 Histogram Equalization.
 Histogram Matching (Specification).
 Local Histogram Processing.
 Using Histogram Statistics for Image Enhancement.
 Fundamentals of Spatial Filtering
 The Mechanics of Spatial Filtering.
 Spatial Correlation and Convolution.
 Vector Representation of Linear Filtering.
 Smoothing Spatial Filters
 Smoothing Linear Filters.
 Order-Statistic (Nonlinear) Filters.
2
AGENDA (Cont...)
 Sharpening Spatial Filters
 Using the Second Derivative for Image Sharpening.
 Unsharp Masking and Highboost Filtering.
 Using First-Order Derivatives for (Nonlinear) Image
Sharpening.
 Combining Spatial Enhancement Methods
3
What Is Image Enhancement?
 Image enhancement is the process of making images
more useful.
 The reasons for doing this include:
 Highlighting interesting detail in images.
 Removing noise from images.
 Making images more visually appealing.
4
Piecewise-Linear Transformation Functions
 Contrast stretching
 Intensity-level slicing
 Bit-plane slicing
5
Piecewise-Linear Transformation
Functions (Cont...)
 Contrast stretching
One of the simplest piecewise linear functions Low-
contrast images can result from poor illumination,
lack of dynamic range in the imaging sensor or even
wrong setting of lens aperture during image
acquisition.
Idea: increase the dynamic range of the gray levels in
the image being processed.
The locations of points (r1,s1) and (r2,s2)
control the shape of the transformation fun.
If r1 = s1 and r2 = s2: The transformation is a linear
function that produces no changes in gray levels.
If r1 = r2, s1=0 and s2=L-1: Transformation becomes
a thresholding function that create a binary image.
6
7
Piecewise-Linear Transformation Functions
(Cont...)
 Intensity-level slicing
 Highlighting a specific range of intensities in an image often is
desired.
 One approach is to highlight the range of intensities (say
white) and reduce all other intensities to lower level.
 Second approach is to highlight range (brightens) and
preserves the other intensity levels.
8
Piecewise-Linear Transformation
Functions (Cont...)
 Bit-plane slicing
 Often by isolating particular bits of the pixel values in an image
we can highlight interesting aspects of that image.
 Higher-order bits usually contain most of the significant visual
information.
 Lower-order bits contain subtle details.
 .
9
Piecewise-Linear Transformation
Functions (Cont...)
10
10110011
1
1
0
0
1
1
0
1
Bit-plane 0
(least significant)
Bit-plane 7
(most significant)
Piecewise-Linear Transformation
Functions (Cont...)
 Bit-plane slicing
11
Bit-plane 7 Bit-plane 6 Bit-plane 4 Bit-plane 1
Piecewise-Linear Transformation
Functions (Cont...)
Histogram Processing
 Histogram: A graph indicating the number of times
each gray level occurs in the image and shows us the
distribution of grey levels in the image.
 Grey level:0~L-1
 L is the number of possible intensity values
 Histogram function: h(rk)=nk
 rk : the kth grey level
 nk: the # of pixel with grey level k
 Normalized Histogram: P(rk)=nk/mn
 mn: the # of total pixel
 Information inherent in histograms is quite useful in
other image processing applications, such as image
compression and segmentation.
12
Grey Levels
Frequencies
Histogram Processing (Cont...)
13
Histogram Processing (Cont...)
 The role of histogram processing in image
enhancement example:
 Dark image
 Light image
 Low contrast
 High contrast
14
Histogram Processing (Cont...)
15
histogram are concentrated on
the low (dark) side of the gray
scale.
histogram is biased toward the
high side of the gray scale.
histogram will be narrow and
will
be centered toward the middle of
the gray scale.
cover a broad range of the gray
scale, with very few vertical lines
being much higher than the
others
Histogram Processing (Cont...)
 Histogram Equalization
 Histogram Matching(Specification)
 Local Enhancement
16
Histogram Equalization
 Histogram equalization is a technique for adjusting
image intensities to enhance contrast.
 Pr(rk): The probability of occurrence of gray level rk
,where:
 This equation is histogram
equalization or linearization.
 Thus, a processed (output) image is obtained by mapping
each pixel with level rk in the input image into a
corresponding pixel with level sk in the output image.
 nk : number of pixels that have gray level k ,
 mn :total number of pixels in the image,
17
Histogram Equalization (Cont...)
18
Histogram Equalization (Cont...)
19
Histogram Equalization (Cont...)
20
Histogram (Specification)Matching
 Histogram equalization automatically determines a
transformation function that seeks to produce an
output image that has a uniform histogram.
 Histogram matching is the method used to generate
a processed image that has a specified histogram.
 In this notation, r and z denote the gray levels of the
input and output (processed) images, respectively.
21
Histogram (Specification)Matching
(Cont...)
 We can estimate pr(r) from the given image while
pz(z) is the specified probability density function that
we wish the output image to have.
 Lets be a random variable with the property
 Suppose that we define a random variable z with
property
 Then two equations imply G(z)=T(r)
22
)
1
(
)
(
)
(
0




r
r dw
w
p
r
T
s
)
2
(
)
(
)
(
0

s
dt
t
p
z
G
z
z 
 
)
3
(
)]
(
[
)
( 1
1

r
T
G
s
G
z 



Histogram (Specification)Matching
(Cont...)
 Discrete formulation of Eq.(1) :
 Discrete formulation of Eq.(2) :
 Discrete formulation of Eq.(3)
23
Histogram (Specification)Matching
(Cont...)
Procedures:
 Obtain the histogram of the given image.
 Use Eq.(1) to obtain the transformation function
T(r).
 Use Eq.(2) to obtain the transformation function
G(z).
 Obtain the inverse transformation function G-1.
 Obtain the output image by applying Eq.(3) to all the
pixels in the input image.
24
Histogram (Specification)Matching
(Cont...)
25
Histogram (Specification)Matching
(Cont...)
26
Histogram (Specification)Matching
(Cont...)
27
Histogram (Specification)Matching
(Cont...)
28
gray levels are biased toward the upper
one-half of the gray scale.
Histogram (Specification)Matching
(Cont...)
29
Specified function that
preserves the general
shape of the original
histogram, but has a
smoother transition of
levels in the dark region
of the gray scale.
From Eq(2) using
histogram in (a)
Histogram of above
Local Histogram Processing
 There are cases in which it is necessary to enhance
details over small areas in the image.
 The numbers of areas may have negligible influence
on the computation of global transformation.
 The solution is to advise transformation function
based on the intensity distribution in a
neighborhood of every pixel in the image.
 The procedure is to define a neighborhood and move
its center from pixel to pixel.
30
Local Histogram Processing (Cont...)
31
Using Histogram Statistics for Image
Enhancement
 The mean (Average intensity) of r:
 The intensity variance:
 The mean is a measure of average intensity and
the variance is a measure of contrast in the
image once the image histogram has been
obtained.
 The sample mean and sample variance:
32
Using Histogram Statistics for Image
Enhancement (Cont...)
 Let f(x, y) represent the value of an image pixel at
any image coordinates (x, y).
 let g(x, y) represent the corresponding enhanced
pixel at those coordinates. Then:
 Where:
 E, k0 , k1 , and k2 are specified parameters.
 MG is the global mean of the input image; and
 DG is its global standard deviation.
33
The Mechanics of Spatial Filtering
 The spatial filter consists of:
 Neighborhood, (typically a small rectangle).
 Predefined operation that is performed on the image pixels by
the neighborhood.
 Filtering creates a new pixel with coordinates equal to the coordinates
of the center of the neighborhood , and whose value is the result of
filtering operation.
 Spatial Filtering:
 Linear spatial filtering.
 Nonlinear spatial filtering.
34
The Mechanics of Spatial Filtering
(Cont...)
 The linear spatial filter for image of M x N:
 Where x and y are varied so that each pixel in w visits
every pixels in f, a = (m-1)/2 and b = (n-1)/2.
 The spatial filter should be odd size and the smallest
being of size 3 x 3.
35
The Mechanics of Spatial Filtering
(Cont...)
36
What Happens at the Borders?
 The mask falls outside the edge!
 Solutions?
 Ignore the edges
 The resultant image is smaller than the original
 Pad with zeros
 Introducing unwanted artifacts
37
Spatial Correlation and Convolution
 Correlation is the process of moving a filter mask
over the image and computing the sum of products
at each location.
 The mechanics of convolution are the same except
the filter first rotate by 180o
 Where the minus signs on the right flip f(i.e. rotate it
by 180)
38
Spatial Correlation and Convolution
(Cont...)
39
Vector Representation of Linear Filtering
 When interest lies in the characteristics response R
of a mask either for correlation or convolution
 Where the ws are the coefficients of m x n filter and
zs are the corresponding image intensities
encompassed by the filter.
40
Generating Spatial Filter Masks
 Generating an m x n linear spatial filter requires that
we specify m x n mask coefficients.
 In turn, these coefficients are select based on what
the filter supposed to do, keeping in your mind that
all we can do with linear filtering is to implement a
sum of products.
41
Smoothing Spatial Filters
 Smoothing filters are used for blurring and for noise
reduction.
 Blurring is used in preprocessing tasks such as
removal of small details from an image.
 Smoothing (i.e., low-pass filters)
 Reduce noise and small details.
 The elements of the mask must be positive.
 Sum of mask elements is 1
 Noise reduction can be accomplished by:
 Smoothing linear filter.
 Smoothing nonlinear filter.
42
Smoothing Linear Filters (Cont...)
• A Low - Pass filter allows low spatial frequencies to pass
unchanged , but suppress high frequencies. The low lass filet
smoothes or blurs the image.
• This tends to reduce noise, but also obscures fine detail.
 A spatial averaging filters in which all coefficients are
equal sometimes is called a box filter.
 A spatial averaging filters in which the coefficients are
different sometimes is called a Weighted Average.
 The following shows a 3 x 3 kernel for performing a low-pass
filter operation. Each element in the kernel has a value of 1.
The output pixel is just the simple average of the input
neighborhood pixels.
43











1
1
1
1
1
1
1
1
1
9
/
1
h 


N
k
j
k
j
f
M
y
x
g
,
)
,
(
1
)
,
(
Smoothing Linear Filters (Cont...)
44
Order-Statistic (Nonlinear)Filters
 Order-statistic filters are nonlinear spatial filters
whose response is based on ranking the pixels
contained in the image area encompassed by the
filter and then replacing the value of center pixel
with the value determined by the ranking result.
 The best-known filter in this category is the median,
min and max filters.
 Median filters are effective in the presence of
impulse(salt and pepper) noise because of its
appearance as white and black dots superimposed on
an image.
45
Order-Statistic (Nonlinear)Filters
(Cont...)
 Very effective for removing “salt and pepper” noise
(i.e., random occurrences of black and white pixels).
46
averaging
median
filtering
Sharpening Spatial Filters
 The principal objective of sharpening is to highlight
transitions in intensity.
 Sharpening (i.e., high-pass filters)
 Highlight fine detail or enhance detail that has been blurred.
 The elements of the mask contain both positive and negative
weights.
 Sum of the mask weights is 0
 Uses of image sharpening vary and include
applications ranging from electronic printing and
medical imaging for industrial inspection.
47
1st derivative
of Gaussian
2nd derivative
of Gaussian
Sharpening Spatial Filters (Cont...)
 Useful for emphasizing transitions in image intensity
(e.g., edges).
 Sharpening filters are based on spatial
differentiation.
48
Spatial Differentiation
 Differentiation measures the rate of change of a
function.
 Let’s consider a simple 1 dimensional example:
49
A B
1st Derivative
 The formula for the 1st derivative of a function is as
follows:
 It’s just the difference between subsequent values
and measures the rate of change of the function.
50
)
(
)
1
( x
f
x
f
x
f





1st Derivative (Cont...)
51
Image Strip
0
1
2
3
4
5
6
7
8
1st Derivative
-8
-6
-4
-2
0
2
4
6
8
2nd Derivative
 The formula for the 2nd derivative of a function is as
follows:
 Simply takes into account the values both before and
after the current value.
52
)
(
2
)
1
(
)
1
(
2
2
x
f
x
f
x
f
x
f







2nd Derivative (Cont...)
53
Image Strip
0
1
2
3
4
5
6
7
8
2nd Derivative
-15
-10
-5
0
5
10
Using Second Derivatives For Image
Enhancement
 The 2nd derivative is more useful for image
enhancement than the 1st derivative
 Stronger response to fine detail
 Simpler implementation
 The first sharpening filter we will look at is the
Laplacian
 One of the simplest sharpening filters
 We will look at a digital implementation
54
The Laplacian
 The Laplacian is defined as follows:
 Where the partial 2nd order derivative in the x
direction is defined as follows:
and in the y direction as follows:
55
y
f
x
f
f 2
2
2
2
2







)
,
(
2
)
,
1
(
)
,
1
(
2
2
y
x
f
y
x
f
y
x
f
x
f







)
,
(
2
)
1
,
(
)
1
,
(
2
2
y
x
f
y
x
f
y
x
f
y
f







The Laplacian (Cont...)
 So, the Laplacian can be given as follows:
 We can easily build a filter based on this:
56
)
,
1
(
)
,
1
(
[
2
y
x
f
y
x
f
f 




)]
1
,
(
)
1
,
( 


 y
x
f
y
x
f
)
,
(
4 y
x
f

0 1 0
1 -4 1
0 1 0
The Laplacian (Cont...)
 Applying the Laplacian to an image we get a new
image that highlights edges and other discontinuities
57
Original
Image
Laplacian
Filtered Image
Laplacian
Filtered Image
Scaled for Display
The Laplacian (Cont...)
 The result of a Laplacian filtering is not an enhanced
image so the final enhanced image:
58
f
y
x
f
y
x
g 2
)
,
(
)
,
( 


- =
Original
Image
Laplacian
Filtered Image
Sharpened
Image
Variants On The Simple Laplacian
 There are lots of slightly different versions of the
Laplacian that can be used:
59
0 1 0
1 -4 1
0 1 0
1 1 1
1 -8 1
1 1 1
-1 -1 -1
-1 9 -1
-1 -1 -1
Simple
Laplacian
Variant of
Laplacian
Sobel Operators
 To filter an image it is filtered using both operators
the results of which are added together
 Sobel filters are typically used for edge detection.
60
-1 -2 -1
0 0 0
1 2 1
-1 0 1
-2 0 2
-1 0 1
An image of a
contact lens which is
enhanced in order to
make defects (at four
and five o’clock in
the image) more
obvious
Unsharp Masking
 A process used many years in the publishing industry
to sharpen images
 Sharpened image: Subtracting a blurred version of
an image from the image itself
61
Unsharp Masking (Cont...)
62
Sharpening Filters: High Boost
 Image sharpening emphasizes edges but details (i.e.,
low frequency components) might be lost.
 High boost filter: amplify input image, then
subtract a lowpass image.
63
Sharpening Filters: High Boost (Cont...)
 If A=1, we get a high pass filter.
 If A>1, part of the original image is added back to
the high pass filtered image.
64
Sharpening Filters: High Boost (Cont...)
65
A=1.9
A=1.4
Combining Spatial Enhancement Methods
 Successful image
enhancement is typically not
achieved using a single
operation.
 Rather we combine a range of
techniques in order to
achieve a final result.
 This example will focus on
enhancing the bone scan to
the right.
66
Combining Spatial Enhancement
Methods (Cont...)
67
Laplacian filter of
bone scan (a)
Sharpened version of
bone scan achieved
by subtracting (a)
and (b) Sobel filter of bone
scan (a)
(a)
(b)
(c)
(d)
Image (d) smoothed
with a 5*5
averaging filter
Combining Spatial Enhancement
Methods (Cont...)
68
The product of (c)
and (e) which will be
used as a mask
Sharpened image
which is sum of (a)
and (f)
Result of applying a
power-law trans. to
(g)
(e)
(f)
(g)
(h)
Combining Spatial Enhancement
Methods (Cont...)
 Compare the original and final images:
69
THANK
YOU
70

More Related Content

Similar to Lec_3_Image Enhancement_spatial Domain.pdf

2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf
2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf
2024-master dityv5y65v56u4b6u64u46p 0318-25.pdfnatnaeltamirat6212
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement Vivek V
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancementliba manopriya.J
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringShajun Nisha
 
CSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureCSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureFatmaNewagy1
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxMayuri Narkhede
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...IJSRD
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...Shahbaz Alam
 

Similar to Lec_3_Image Enhancement_spatial Domain.pdf (20)

2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf
2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf
2024-master dityv5y65v56u4b6u64u46p 0318-25.pdf
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
A0280105
A0280105A0280105
A0280105
 
mini prjt
mini prjtmini prjt
mini prjt
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
Dip3
Dip3Dip3
Dip3
 
Image Processing
Image ProcessingImage Processing
Image Processing
 
CSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lectureCSE367 Lecture- image sinal processing lecture
CSE367 Lecture- image sinal processing lecture
 
Image_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptxImage_processing_unit2_SPPU_Syllabus.pptx
Image_processing_unit2_SPPU_Syllabus.pptx
 
Module 2
Module 2Module 2
Module 2
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Lect02.ppt
Lect02.pptLect02.ppt
Lect02.ppt
 
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
Study on Contrast Enhancement with the help of Associate Regions Histogram Eq...
 
N018219199
N018219199N018219199
N018219199
 
IJET-V2I6P17
IJET-V2I6P17IJET-V2I6P17
IJET-V2I6P17
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
 
B070306010
B070306010B070306010
B070306010
 

More from nagwaAboElenein

Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxnagwaAboElenein
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxnagwaAboElenein
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.nagwaAboElenein
 
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).pptnagwaAboElenein
 
security introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptxsecurity introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptxnagwaAboElenein
 
Lec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdfLec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdfnagwaAboElenein
 
Lec_8_Image Compression.pdf
Lec_8_Image Compression.pdfLec_8_Image Compression.pdf
Lec_8_Image Compression.pdfnagwaAboElenein
 
Semantic Segmentation.pdf
Semantic Segmentation.pdfSemantic Segmentation.pdf
Semantic Segmentation.pdfnagwaAboElenein
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfnagwaAboElenein
 
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdfImage Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdfnagwaAboElenein
 
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdfFundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdfnagwaAboElenein
 

More from nagwaAboElenein (16)

Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
 
Chapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptxChapter 1: Computer Vision Introduction.pptx
Chapter 1: Computer Vision Introduction.pptx
 
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
security Symmetric Key Cryptography Substitution Cipher, Transposition Cipher.
 
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
研究生学位论文在线提交Electronic thesis online submission(20210527).ppt
 
security introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptxsecurity introduction and overview lecture1 .pptx
security introduction and overview lecture1 .pptx
 
brain tumor.pptx
brain tumor.pptxbrain tumor.pptx
brain tumor.pptx
 
Lec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdfLec_9_ Morphological ImageProcessing .pdf
Lec_9_ Morphological ImageProcessing .pdf
 
Lec_8_Image Compression.pdf
Lec_8_Image Compression.pdfLec_8_Image Compression.pdf
Lec_8_Image Compression.pdf
 
Semantic Segmentation.pdf
Semantic Segmentation.pdfSemantic Segmentation.pdf
Semantic Segmentation.pdf
 
lecture1.pptx
lecture1.pptxlecture1.pptx
lecture1.pptx
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdf
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 
Lecture3.pptx
Lecture3.pptxLecture3.pptx
Lecture3.pptx
 
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdfImage Segmentation Techniques for Remote Sensing Satellite Images.pdf
Image Segmentation Techniques for Remote Sensing Satellite Images.pdf
 
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdfFundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
Fundamentals_of_Digital image processing_A practicle approach with MatLab.pdf
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

Lec_3_Image Enhancement_spatial Domain.pdf

  • 2. Agenda This lecture will cover:  What Is Image Enhancement?  Intensity Transformation Functions  Piecewise-Linear Transformation Functions  Histogram Processing  Histogram Equalization.  Histogram Matching (Specification).  Local Histogram Processing.  Using Histogram Statistics for Image Enhancement.  Fundamentals of Spatial Filtering  The Mechanics of Spatial Filtering.  Spatial Correlation and Convolution.  Vector Representation of Linear Filtering.  Smoothing Spatial Filters  Smoothing Linear Filters.  Order-Statistic (Nonlinear) Filters. 2
  • 3. AGENDA (Cont...)  Sharpening Spatial Filters  Using the Second Derivative for Image Sharpening.  Unsharp Masking and Highboost Filtering.  Using First-Order Derivatives for (Nonlinear) Image Sharpening.  Combining Spatial Enhancement Methods 3
  • 4. What Is Image Enhancement?  Image enhancement is the process of making images more useful.  The reasons for doing this include:  Highlighting interesting detail in images.  Removing noise from images.  Making images more visually appealing. 4
  • 5. Piecewise-Linear Transformation Functions  Contrast stretching  Intensity-level slicing  Bit-plane slicing 5
  • 6. Piecewise-Linear Transformation Functions (Cont...)  Contrast stretching One of the simplest piecewise linear functions Low- contrast images can result from poor illumination, lack of dynamic range in the imaging sensor or even wrong setting of lens aperture during image acquisition. Idea: increase the dynamic range of the gray levels in the image being processed. The locations of points (r1,s1) and (r2,s2) control the shape of the transformation fun. If r1 = s1 and r2 = s2: The transformation is a linear function that produces no changes in gray levels. If r1 = r2, s1=0 and s2=L-1: Transformation becomes a thresholding function that create a binary image. 6
  • 8.  Intensity-level slicing  Highlighting a specific range of intensities in an image often is desired.  One approach is to highlight the range of intensities (say white) and reduce all other intensities to lower level.  Second approach is to highlight range (brightens) and preserves the other intensity levels. 8 Piecewise-Linear Transformation Functions (Cont...)
  • 9.  Bit-plane slicing  Often by isolating particular bits of the pixel values in an image we can highlight interesting aspects of that image.  Higher-order bits usually contain most of the significant visual information.  Lower-order bits contain subtle details.  . 9 Piecewise-Linear Transformation Functions (Cont...)
  • 10. 10 10110011 1 1 0 0 1 1 0 1 Bit-plane 0 (least significant) Bit-plane 7 (most significant) Piecewise-Linear Transformation Functions (Cont...)
  • 11.  Bit-plane slicing 11 Bit-plane 7 Bit-plane 6 Bit-plane 4 Bit-plane 1 Piecewise-Linear Transformation Functions (Cont...)
  • 12. Histogram Processing  Histogram: A graph indicating the number of times each gray level occurs in the image and shows us the distribution of grey levels in the image.  Grey level:0~L-1  L is the number of possible intensity values  Histogram function: h(rk)=nk  rk : the kth grey level  nk: the # of pixel with grey level k  Normalized Histogram: P(rk)=nk/mn  mn: the # of total pixel  Information inherent in histograms is quite useful in other image processing applications, such as image compression and segmentation. 12 Grey Levels Frequencies
  • 14. Histogram Processing (Cont...)  The role of histogram processing in image enhancement example:  Dark image  Light image  Low contrast  High contrast 14
  • 15. Histogram Processing (Cont...) 15 histogram are concentrated on the low (dark) side of the gray scale. histogram is biased toward the high side of the gray scale. histogram will be narrow and will be centered toward the middle of the gray scale. cover a broad range of the gray scale, with very few vertical lines being much higher than the others
  • 16. Histogram Processing (Cont...)  Histogram Equalization  Histogram Matching(Specification)  Local Enhancement 16
  • 17. Histogram Equalization  Histogram equalization is a technique for adjusting image intensities to enhance contrast.  Pr(rk): The probability of occurrence of gray level rk ,where:  This equation is histogram equalization or linearization.  Thus, a processed (output) image is obtained by mapping each pixel with level rk in the input image into a corresponding pixel with level sk in the output image.  nk : number of pixels that have gray level k ,  mn :total number of pixels in the image, 17
  • 21. Histogram (Specification)Matching  Histogram equalization automatically determines a transformation function that seeks to produce an output image that has a uniform histogram.  Histogram matching is the method used to generate a processed image that has a specified histogram.  In this notation, r and z denote the gray levels of the input and output (processed) images, respectively. 21
  • 22. Histogram (Specification)Matching (Cont...)  We can estimate pr(r) from the given image while pz(z) is the specified probability density function that we wish the output image to have.  Lets be a random variable with the property  Suppose that we define a random variable z with property  Then two equations imply G(z)=T(r) 22 ) 1 ( ) ( ) ( 0     r r dw w p r T s ) 2 ( ) ( ) ( 0  s dt t p z G z z    ) 3 ( )] ( [ ) ( 1 1  r T G s G z    
  • 23. Histogram (Specification)Matching (Cont...)  Discrete formulation of Eq.(1) :  Discrete formulation of Eq.(2) :  Discrete formulation of Eq.(3) 23
  • 24. Histogram (Specification)Matching (Cont...) Procedures:  Obtain the histogram of the given image.  Use Eq.(1) to obtain the transformation function T(r).  Use Eq.(2) to obtain the transformation function G(z).  Obtain the inverse transformation function G-1.  Obtain the output image by applying Eq.(3) to all the pixels in the input image. 24
  • 28. Histogram (Specification)Matching (Cont...) 28 gray levels are biased toward the upper one-half of the gray scale.
  • 29. Histogram (Specification)Matching (Cont...) 29 Specified function that preserves the general shape of the original histogram, but has a smoother transition of levels in the dark region of the gray scale. From Eq(2) using histogram in (a) Histogram of above
  • 30. Local Histogram Processing  There are cases in which it is necessary to enhance details over small areas in the image.  The numbers of areas may have negligible influence on the computation of global transformation.  The solution is to advise transformation function based on the intensity distribution in a neighborhood of every pixel in the image.  The procedure is to define a neighborhood and move its center from pixel to pixel. 30
  • 32. Using Histogram Statistics for Image Enhancement  The mean (Average intensity) of r:  The intensity variance:  The mean is a measure of average intensity and the variance is a measure of contrast in the image once the image histogram has been obtained.  The sample mean and sample variance: 32
  • 33. Using Histogram Statistics for Image Enhancement (Cont...)  Let f(x, y) represent the value of an image pixel at any image coordinates (x, y).  let g(x, y) represent the corresponding enhanced pixel at those coordinates. Then:  Where:  E, k0 , k1 , and k2 are specified parameters.  MG is the global mean of the input image; and  DG is its global standard deviation. 33
  • 34. The Mechanics of Spatial Filtering  The spatial filter consists of:  Neighborhood, (typically a small rectangle).  Predefined operation that is performed on the image pixels by the neighborhood.  Filtering creates a new pixel with coordinates equal to the coordinates of the center of the neighborhood , and whose value is the result of filtering operation.  Spatial Filtering:  Linear spatial filtering.  Nonlinear spatial filtering. 34
  • 35. The Mechanics of Spatial Filtering (Cont...)  The linear spatial filter for image of M x N:  Where x and y are varied so that each pixel in w visits every pixels in f, a = (m-1)/2 and b = (n-1)/2.  The spatial filter should be odd size and the smallest being of size 3 x 3. 35
  • 36. The Mechanics of Spatial Filtering (Cont...) 36
  • 37. What Happens at the Borders?  The mask falls outside the edge!  Solutions?  Ignore the edges  The resultant image is smaller than the original  Pad with zeros  Introducing unwanted artifacts 37
  • 38. Spatial Correlation and Convolution  Correlation is the process of moving a filter mask over the image and computing the sum of products at each location.  The mechanics of convolution are the same except the filter first rotate by 180o  Where the minus signs on the right flip f(i.e. rotate it by 180) 38
  • 39. Spatial Correlation and Convolution (Cont...) 39
  • 40. Vector Representation of Linear Filtering  When interest lies in the characteristics response R of a mask either for correlation or convolution  Where the ws are the coefficients of m x n filter and zs are the corresponding image intensities encompassed by the filter. 40
  • 41. Generating Spatial Filter Masks  Generating an m x n linear spatial filter requires that we specify m x n mask coefficients.  In turn, these coefficients are select based on what the filter supposed to do, keeping in your mind that all we can do with linear filtering is to implement a sum of products. 41
  • 42. Smoothing Spatial Filters  Smoothing filters are used for blurring and for noise reduction.  Blurring is used in preprocessing tasks such as removal of small details from an image.  Smoothing (i.e., low-pass filters)  Reduce noise and small details.  The elements of the mask must be positive.  Sum of mask elements is 1  Noise reduction can be accomplished by:  Smoothing linear filter.  Smoothing nonlinear filter. 42
  • 43. Smoothing Linear Filters (Cont...) • A Low - Pass filter allows low spatial frequencies to pass unchanged , but suppress high frequencies. The low lass filet smoothes or blurs the image. • This tends to reduce noise, but also obscures fine detail.  A spatial averaging filters in which all coefficients are equal sometimes is called a box filter.  A spatial averaging filters in which the coefficients are different sometimes is called a Weighted Average.  The following shows a 3 x 3 kernel for performing a low-pass filter operation. Each element in the kernel has a value of 1. The output pixel is just the simple average of the input neighborhood pixels. 43            1 1 1 1 1 1 1 1 1 9 / 1 h    N k j k j f M y x g , ) , ( 1 ) , (
  • 44. Smoothing Linear Filters (Cont...) 44
  • 45. Order-Statistic (Nonlinear)Filters  Order-statistic filters are nonlinear spatial filters whose response is based on ranking the pixels contained in the image area encompassed by the filter and then replacing the value of center pixel with the value determined by the ranking result.  The best-known filter in this category is the median, min and max filters.  Median filters are effective in the presence of impulse(salt and pepper) noise because of its appearance as white and black dots superimposed on an image. 45
  • 46. Order-Statistic (Nonlinear)Filters (Cont...)  Very effective for removing “salt and pepper” noise (i.e., random occurrences of black and white pixels). 46 averaging median filtering
  • 47. Sharpening Spatial Filters  The principal objective of sharpening is to highlight transitions in intensity.  Sharpening (i.e., high-pass filters)  Highlight fine detail or enhance detail that has been blurred.  The elements of the mask contain both positive and negative weights.  Sum of the mask weights is 0  Uses of image sharpening vary and include applications ranging from electronic printing and medical imaging for industrial inspection. 47 1st derivative of Gaussian 2nd derivative of Gaussian
  • 48. Sharpening Spatial Filters (Cont...)  Useful for emphasizing transitions in image intensity (e.g., edges).  Sharpening filters are based on spatial differentiation. 48
  • 49. Spatial Differentiation  Differentiation measures the rate of change of a function.  Let’s consider a simple 1 dimensional example: 49 A B
  • 50. 1st Derivative  The formula for the 1st derivative of a function is as follows:  It’s just the difference between subsequent values and measures the rate of change of the function. 50 ) ( ) 1 ( x f x f x f     
  • 51. 1st Derivative (Cont...) 51 Image Strip 0 1 2 3 4 5 6 7 8 1st Derivative -8 -6 -4 -2 0 2 4 6 8
  • 52. 2nd Derivative  The formula for the 2nd derivative of a function is as follows:  Simply takes into account the values both before and after the current value. 52 ) ( 2 ) 1 ( ) 1 ( 2 2 x f x f x f x f       
  • 53. 2nd Derivative (Cont...) 53 Image Strip 0 1 2 3 4 5 6 7 8 2nd Derivative -15 -10 -5 0 5 10
  • 54. Using Second Derivatives For Image Enhancement  The 2nd derivative is more useful for image enhancement than the 1st derivative  Stronger response to fine detail  Simpler implementation  The first sharpening filter we will look at is the Laplacian  One of the simplest sharpening filters  We will look at a digital implementation 54
  • 55. The Laplacian  The Laplacian is defined as follows:  Where the partial 2nd order derivative in the x direction is defined as follows: and in the y direction as follows: 55 y f x f f 2 2 2 2 2        ) , ( 2 ) , 1 ( ) , 1 ( 2 2 y x f y x f y x f x f        ) , ( 2 ) 1 , ( ) 1 , ( 2 2 y x f y x f y x f y f       
  • 56. The Laplacian (Cont...)  So, the Laplacian can be given as follows:  We can easily build a filter based on this: 56 ) , 1 ( ) , 1 ( [ 2 y x f y x f f      )] 1 , ( ) 1 , (     y x f y x f ) , ( 4 y x f  0 1 0 1 -4 1 0 1 0
  • 57. The Laplacian (Cont...)  Applying the Laplacian to an image we get a new image that highlights edges and other discontinuities 57 Original Image Laplacian Filtered Image Laplacian Filtered Image Scaled for Display
  • 58. The Laplacian (Cont...)  The result of a Laplacian filtering is not an enhanced image so the final enhanced image: 58 f y x f y x g 2 ) , ( ) , (    - = Original Image Laplacian Filtered Image Sharpened Image
  • 59. Variants On The Simple Laplacian  There are lots of slightly different versions of the Laplacian that can be used: 59 0 1 0 1 -4 1 0 1 0 1 1 1 1 -8 1 1 1 1 -1 -1 -1 -1 9 -1 -1 -1 -1 Simple Laplacian Variant of Laplacian
  • 60. Sobel Operators  To filter an image it is filtered using both operators the results of which are added together  Sobel filters are typically used for edge detection. 60 -1 -2 -1 0 0 0 1 2 1 -1 0 1 -2 0 2 -1 0 1 An image of a contact lens which is enhanced in order to make defects (at four and five o’clock in the image) more obvious
  • 61. Unsharp Masking  A process used many years in the publishing industry to sharpen images  Sharpened image: Subtracting a blurred version of an image from the image itself 61
  • 63. Sharpening Filters: High Boost  Image sharpening emphasizes edges but details (i.e., low frequency components) might be lost.  High boost filter: amplify input image, then subtract a lowpass image. 63
  • 64. Sharpening Filters: High Boost (Cont...)  If A=1, we get a high pass filter.  If A>1, part of the original image is added back to the high pass filtered image. 64
  • 65. Sharpening Filters: High Boost (Cont...) 65 A=1.9 A=1.4
  • 66. Combining Spatial Enhancement Methods  Successful image enhancement is typically not achieved using a single operation.  Rather we combine a range of techniques in order to achieve a final result.  This example will focus on enhancing the bone scan to the right. 66
  • 67. Combining Spatial Enhancement Methods (Cont...) 67 Laplacian filter of bone scan (a) Sharpened version of bone scan achieved by subtracting (a) and (b) Sobel filter of bone scan (a) (a) (b) (c) (d) Image (d) smoothed with a 5*5 averaging filter
  • 68. Combining Spatial Enhancement Methods (Cont...) 68 The product of (c) and (e) which will be used as a mask Sharpened image which is sum of (a) and (f) Result of applying a power-law trans. to (g) (e) (f) (g) (h)
  • 69. Combining Spatial Enhancement Methods (Cont...)  Compare the original and final images: 69