Lecture 5: Image Restoration Enhancement vs. Restoration
Lecture 5: Image Restoration Enhancement vs. Restoration
Restoration
Lecture 5: Image Restoration
o Same goal:
improve image in some predefined sense
o Image enhancement
• Subjective process
• Heuristic procedures
BE 244: Biomedical Image Analysis • Example: contrast stretching
o Image restoration
• Objective process
• Criterion for image goodness
• Example: removal of image blur
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 2
o g(x,y) = H[f(x,y)] + (x,y) o Given g(x,y) and some a priori information about H and
(x,y), obtain an estimate f’(x,y) of the original image
• f(x,y): original input image
• H(): degradation function o We want the estimate f’(x,y) to be as close as possible
to the original input image f(x,y)
• (x,y): additive noise
• g(x,y): degraded output image o The more we know about H and the closer f’(x,y) will
(x,y) be to f(x,y)
(x,y)
f(x,y) H + g(x,y)
f(x,y) H + g(x,y) ? f’(x,y)
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 3 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 4
1
Noise PDFs Noise PDFs
oUniform Noise
1
for a z b
p( z ) b a
0 otherwise
o Impulse Noise
Pa for z a
p( z ) Pb for z b a b
0 otherwise 2
2
• “Bipolar” , “Salt-and-Pepper”, 2 b a
“Shot”, or “Spike” noise 12
• Impulses can be negative or
positive and are typically at
saturation levels
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 7 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 8
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 9 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 10
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 11 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 12
2
Image Degradation, example Image Restoration
= * • Mathematical modeling
g(x,y) = h(x,y)
* f(x,y) o Direct inverse filtering
F’(u,v) = G(u,v) / H(u,v)
f’(x,y) = F-1 [F’(u,v)] = F--1 [G(u,v) / H(u,v)]
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 13 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 14
100
F(u,v) = F’(u,v) - N(u,v) / H(u,v)
150
N(u,v) = ?
o H(u,v) small -> N(u,v) / H(u,v) large
f’(x,y)
200
f(x,y) g(x,y)
f(x,y) blurred with a 7x7 mean f(x,y) restored with the inverse
may dominate the estimate F’(u,v)
250
50 100 150 200 250 filter filter
we need to limit the analysis to frequencies near the
origin H(0,0)
Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 15 Original slides by Tracy McKnight, modified by Piotr Habas, UCSF, 2009 16
Wiener Filter
Wiener Filter
o For g = Hf + n
1 | H (u, v) |2
F ' (u, v) G (u, v)
H (u, v) H (u, v) 2 S n (u, v) / S f (u, v)
S n (u, v) | N (u, v) |2 noise power spectrum
S f (u, v) | F (u, v) |2 original image power spectrum
f g = Hf gn = Hf + n