BiomedImg Cat1 Merged
BiomedImg Cat1 Merged
J.B.Jeeva
Based on
Digital image processing by Gonzalez and Woods
J.B.JEEVA 1
Introduction
• Image enhancement : subjective process
• Image restoration : objective process
• Restoration: recover an image that has been
degraded by using a priori knowledge of the degradation
phenomenon
• Process: modelling the degradation and applying the
inverse process to recover the original image
e.g.: “de-blurring”
Some techniques are best formulated in the spatial
domain (e.g. additive noise only), others in the
frequency domain (e.g. de-blurring)
J.B.JEEVA 2
Image Restoration and Reconstruction
J.B.JEEVA 4
J.B.JEEVA 5
J.B.JEEVA 6
2.2 Some Important Noise Probability Density
Functions
J.B.JEEVA 7
J.B.JEEVA 8
J.B.JEEVA 9
J.B.JEEVA 10
J.B.JEEVA 11
J.B.JEEVA 12
J.B.JEEVA 13
J.B.JEEVA 14
J.B.JEEVA 15
J.B.JEEVA 16
J.B.JEEVA 17
J.B.JEEVA 18
J.B.JEEVA 19
J.B.JEEVA 20
J.B.JEEVA 21
J.B.JEEVA 22
Adaptive, local noise reduction filter
2
ˆf ( x, y ) g ( x, y ) g ( x, y ) m
L2 L
• Adaptive median filter
– zmin = minimum gray level value in S xy
–
zmax= maximum gray level value in
S xy
1
H (u, v) 2n
D(u, v)W
1 2 2
D (u, v) D0
– Gaussian bandreject filter
2
1 D 2 ( u ,v ) D02
2 D ( u ,v )W
H (u, v) 1 e
• Bandpass filters
H bp (u, v) 1 H br (u, v)
J.B.JEEVA 36
Notch filters
0 if D1 (u, v) D 0 or D 2 (u, v) D 0
H (u , v)
1 otherwise
D1 (u , v) (u M / 2 u0 ) (v N / 2 v0 )
2
2 1/ 2
D (u, v) (u M / 2 u )
2 0
2
(v N / 2 v )
0
2 1/ 2
• Butterworth notch reject filter of order n
1
H (u, v) n
D 2
1 0
D1 (u, v) D2 (u , v)
• Gaussian notch reject filter
1 D1 ( u ,v ) D2 ( u ,v )
2
2
H (u, v) 1 e
D0
J.B.JEEVA 41
J.B.JEEVA 42
• Notch pass filter
H np (u, v) 1 H nr (u, v)
• Optimum notch filtering
– Interference noise pattern
g ( x, y ) ( x, y ) g ( x, y ) ( x, y )
w( x, y )
2 ( x, y ) 2 ( x, y )
Image restoration
J.B.Jeeva
Based on
Digital image processing by Gonzalez and Woods
J.B.JEEVA 1
Introduction
• Image enhancement : subjective process
• Image restoration : objective process
• Restoration: recover an image that has been
degraded by using a priori knowledge of the degradation
phenomenon
• Process: modelling the degradation and applying the
inverse process to recover the original image
e.g.: “de-blurring”
Some techniques are best formulated in the spatial
domain (e.g. additive noise only), others in the
frequency domain (e.g. de-blurring)
J.B.JEEVA 2
Image Restoration and Reconstruction
J.B.JEEVA 4
J.B.JEEVA 5
J.B.JEEVA 6
J.B.JEEVA 7
n is an
J.B.JEEVA 8
integer
J.B.JEEVA 9
J.B.JEEVA 10
J.B.JEEVA 11
J.B.JEEVA 12
J.B.JEEVA 13
J.B.JEEVA 14
J.B.JEEVA 15
J.B.JEEVA 16
J.B.JEEVA 17
J.B.JEEVA 18
J.B.JEEVA 19
J.B.JEEVA 20
J.B.JEEVA 21
Digital Image Processing, 3rd ed.
Gonzalez & Woods
www.ImageProcessingPlace.com
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
Gamma rays:
Nuclear
medicine
(injection of
radioactive
tracer)
Astronomical
observations
(object generate
gamma rays)
Chapter 1
Introduction
Chapter 1
Introduction
-used in medicine/industry/astronomy
Chapter 1
Introduction
Ultraviolet band:
microscopy (fluorescence)
the excited electron jumps to another energy
level emitting light as a low-energy photon
in the red region
lasers
biological imaging
astronomical imaging
industrial inspections
A fluorescent tracer
is bind to a
molecular target
© 1992–2008 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 3rd ed.
Gonzalez & Woods
www.ImageProcessingPlace.com
Chapter 1
Introduction
light microscopy
Chapter 1
Introduction
Chapter 1
Introduction
Mount Everest
Nasa/Landsat
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
Visible range:
automated inspection
tasks
Chapter 1
Introduction
Chapter 1
Introduction
radio band:
MRI - imaging
(Nobel prizes: Bloch 1952,
… , 2003)
Chapter 1
Introduction
- acoustic waves
(seismic, marine/atmospheric,
sonar/radar, ultrasound)
- electron microscopy
- synthetic images
Chapter 1
Introduction
Chapter 1
Introduction
Chapter 1
Introduction
+ extra stuff
© 1992–2008 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 3rd ed.
Gonzalez & Woods
www.ImageProcessingPlace.com
Chapter 2
Digital Image Fundamentals
Chapter 2
Digital Image Fundamentals
Chapter 2
Digital Image Fundamentals
- under/overshoot boundary of
regions of different intensity
(Mach bands)
- A region’s perceived
brightness does depend on
the background intensity as
well (simultaneous contrast)
© 1992–2008 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 3rd ed.
Gonzalez & Woods
www.ImageProcessingPlace.com
Chapter 2
Digital Image Fundamentals
Histogram
h(rk ) = nk
⚫ where rk is the kth gray level and nkis
the number of pixels in the image
having gray level rk
⚫ Normalized histogram
p(rk ) = nk / n
Histogram equalization
s = T (r ), 0 r 1
r = T −1 ( s), 0 s 1
⚫ Probability density functions (PDF)
dr
p s ( s ) = pr ( r )
ds
r
s = T (r ) = ( L − 1) pr (w)dw
0
ds dT (r ) d r = ( L − 1) p (r )
dr
=
dr
= ( L − 1)
dr
0
pr ( w) dw
r
1
ps ( s ) =
L −1
k k nj
sk = T (rk ) = ( L − 1) pr (rj ) =( L − 1) , k = 0,1,2,..., L − 1
j =0 j =0 n
Local enhancement
⚫ Histogram using a local neighborhood,
for example 7*7 neighborhood
⚫ Histogram using a local 3*3
neighborhood
Fundamentals of Spatial Filtering
R = w(−1,−1) f ( x − 1, y − 1) +
w(−1,0) f ( x − 1, y ) + +
w(0,0) f ( x, y ) + +
w(1,0) f ( x + 1, y ) +
w(1,1) f ( x + 1, y + 1)
⚫ Image size: M N
⚫ Mask size: m n
a b
g ( x, y ) = w(s, t ) f ( x + s, y + t )
s = − at = − b
⚫ a = (m − 1) / 2 and b = (n − 1) / 2
⚫ x = 0,1,2,..., M − 1 and y = 0,1,2,..., N − 1
Spatial Correlation and Convolution
Vector Representation of Linear
Filtering
R = w1 z1 + w2 z 2 + ... + w9 z9
9
= wi zi
i =1
Smoothing Spatial Filters
w(s, t ) f ( x + s, y + t )
g ( x, y ) = s = − at = − b
a b
w(s, t )
s = − at = − b
Order-statistic filters
⚫ median filter: Replace the value of a
pixel by the median of the gray levels
in the neighborhood of that pixel
⚫ Noise-reduction
Sharpening Spatial Filters
Foundation
⚫ The first-order derivative
f
= f ( x + 1) − f ( x)
x
⚫ The second-order derivative
f
2
= f ( x + 1) + f ( x − 1) − 2 f ( x)
x 2
Use of second derivatives for
enhancement-The Laplacian
⚫ Development of the method
f f
2 2
f = 2 + 2
2
x y
f
2
= f ( x + 1, y) + f ( x − 1, y) − 2 f ( x, y)
x 2
2 f
= f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y)
y 2
2 f = [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) +
f ( x, y − 1)] − 4 f ( x, y )
if the center coefficien t
f ( x, y ) − 2 f ( x, y ) of the Laplacian mask
is negative
g ( x, y ) =
if the center coefficien t
f ( x, y ) + 2 f ( x, y ) of the Laplacian mask
is positive
⚫ Simplifications
g ( x, y ) = f ( x, y ) − [ f ( x + 1, y ) + f ( x − 1, y) + f ( x, y + 1) +
f ( x, y − 1)] + 4 f ( x, y)
= 5 f ( x, y) − [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) +
f ( x, y − 1)]
Unsharp masking and highboost
filtering
⚫ Unsharp masking
Substract a blurred version of an image
from the image itself
g mask ( x, y) = f ( x, y) − f ( x, y)
g ( x, y) = f ( x, y) + k * g mask ( x, y) ,k 1
Using first-order derivatives for
(nonlinear) image sharpening—The
gradient
f
Gx x
f = = f
G y
y
⚫ The magnitude is rotation invariant
(isotropic)
f = mag (f ) = G + G2
x
2
y
1
2
1
f 2 f 2 2
= +
x y
f G x + G y
⚫ Computing using cross differences,
Roberts cross-gradient operators
G x = ( z9 − z5 ) and Gy = ( z8 − z6 )
f = ( z9 − z5 ) + ( z8 − z6 )
2 2
1
2
f z9 − z5 + z8 − z6
⚫ Sobel operators
A weight value of 2 is to achieve some
smoothing by giving more importance to
the center point
f ( z7 + 2 z8 + z9 ) − ( z1 + 2 z2 + z3 )
+ ( z3 + 2 z6 + z9 ) − ( z1 + 2 z4 + z7 )
Combining Spatial Enhancement
Methods
An example
⚫ Laplacian to highlight fine detail
⚫ Gradient to enhance prominent edges
⚫ Smoothed version of the gradient
image used to mask the Laplacian
image
⚫ Increase the dynamic range of the gray
levels by using a gray-level
transformation
Image Enhancement in the
Frequency Domain
Dr. J.B.Jeeva
Associate Professor
Dept. of Sensor and Biomedical Technology
School of Electronics Engineering
VIT University, Vellore
real(g(x)) imag(g(x))
1D – DFT of length N
=0
=7
1-D DFT in as basis expansion
Forward
transform real(A) imag(A)
u=0
Inverse transform
basis
u=7
n n
1-D DFT in matrix notations
real(A) imag(A)
u=0
N=8
u=7
n n
1-D DFT of different lengths
real(A) imag(A)
N=32
un
N=8
N=16 N=64
Introduction to the Fourier Transform
and the Frequency Domain
M 1
1
F (u )
M
f ( x)[cos 2ux / M j sin 2ux / M ]
x 0
for u 0,1,2,..., M 1
1
where F (u ) R (u ) I (u )
2 2 2 (magnitude or spectrum)
I (u )
(u ) tan 1
(phase angle or phase spectrum)
R(u )
o R(u): the real part of F(u)
o I(u): the imaginary part of F(u)
• Power spectrum:
P(u ) F (u ) R 2 (u ) I 2 (u )
2
The One-Dimensional Fourier Transform
Example
The One-Dimensional Fourier Transform
Some Examples
1
F (u, v) R (u, v) I (u, v)
2 2 2 ( spectrum)
I (u, v)
(u, v) tan 1 (phase angle)
R(u, v)
P(u,v) F (u, v) R 2 (u, v) I 2 (u, v) (power spectrum)
2
shift
The Two-Dimensional DFT and Its Inverse
The Property of Two-Dimensional DFT
Rotation
DFT
DFT
The Property of Two-Dimensional DFT
Linear Combination
A
DFT
B
DFT
0.25 * A
+ 0.75 * B
DFT
The Property of Two-Dimensional DFT
Expansion
A
DFT
B DFT
Rectangle
Its DFT
Two-Dimensional DFT with Different Functions
Impulses
Its DFT
Summary of Some Important Properties
of the 2-D Fourier Transform
Summary of Some Important Properties
of the 2-D Fourier Transform