0% found this document useful (0 votes)
32 views40 pages

AIDP 05 DP HP Reconstruction

Uploaded by

Adika Stadevant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views40 pages

AIDP 05 DP HP Reconstruction

Uploaded by

Adika Stadevant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Image filtering in the space domain

2D convolution
• Sharpening - Highpass Filtering
• Smoothing - Lowpass Filtering
• mean filter (Gaussian)
• median filter
• separable median
Image filtering in space domain
2D convolution

*
4
=

=
Filtering in the space domain:

What is it the space filter?

• it is operator of the size MxN, with centre in (0,0)


• w(i,j) are weights (weighting coefficients)

MxN=3x3

• operators weighting coefficients represent impulse response of FIR filter

𝑔(𝑛1 , 𝑛2 ) = 𝑓(𝑛1 , 𝑛2 ) ∗ ℎ(𝑛1 , 𝑛2 ) = ෍ 𝑓(𝑛1 − 𝑘1 , 𝑛2 − 𝑘2 ) ∙ ℎ(𝑘1 , 𝑘2 )


(𝑘 1 ,𝑘2 )∈𝑀,𝑁
(𝑛1 −𝑘1 ,𝑛2 −𝑘2 )∈𝑓
2D convolution – in image processing– simplyfied:

ℎ 𝑛1 , 𝑛2

𝑦 𝑛1 , 𝑛2 𝑥 𝑛1 , 𝑛2
Sharpening – High-pass Filtering
• Image sharpening can be achieved by a high-
pass (HP) filtering process, which
– attenuates the low-frequency components
– without disturbing high-frequency information.
HP filtering in space domain ??

2D convolution of the image with


the filters impulse response!!
HP filtering –sharpening in space domain

4 =
HP filtering –sharpening in space domain

Impulse responses h(n1,n2) of selected HP filters


HP filtering –sharpening in space domain

Specific characteristic of impulse response od HP filter:


• Sum of all coefficients of HP filter equals to 1, i.e.

o frequency characteristic 𝐻(𝜔1 , 𝜔2 )


for 𝜔1 = 𝜔2 = 0 equals to one, too.
! DC coefficient of spectrum is preserved !
mean illumination value of processed image = mean
illumination value of original
HP filtering –sharpening in space domain

filtered image;
DC coefficient removed

original

filtered image with


preserved mean value
(DC coefficient)
HP filtering –sharpening in space domain

Disadvantage: HP filter amplifies also unwanted high-frequency noise !!


Smoothing - Lowpass Filtering
• Image smoothing can be achieved by a lowpass
filtering process, which
– attenuates the high-frequency components
– without disturbing low-frequency information.
Lowpass Filtering

H(u,v) -frequency characteristic


LP filtering –smoothing in space domain

Impulse responses h(n1,n2) of low-pass filters – positive coefficients!


- mean value / weigthed mean value in selected window
LP filtering –smoothing in space domain

Impulse responses h(n1,n2) can by of different sizes:

h(5,5) Gaussian

– most often used LP filter

Sum of coefficients= 1!!!


LP filtering –smoothing in space domain

Median filter
- medián – mean value estimation

nonlinear process – reduces impulse or „salt-and-pepper“ noise


LP filtering –smoothing in space domain

Median
Advantage: preserve the edges in the image
at the same time reduces random noise

Application:
• window of selected size moves along the
image

• median of image intensity in the window is (n1-1,n2-1) (n1, n2-1) (n1+1 n2-1)
assigned to the cental position
y

(n1-1, n2) (n1, n2) (n1+1, n2)

(n1-1, n2+1) (n1, n2+1) (n1+1, n2+1)


LP filtering –smoothing in space domain

Median – calculation:

5 6 10 5 6 10

15 55 8 15 10 8

25 4 11 25 4 11

(a) (b)

- we arange intensity values according to size => the middle value is medián:
4, 5, 6, 8, 10, 11, 15, 55
LP filtering –smoothing in space domain

Comparison: mean - median

2 different signals
f(n)

filtrered signals:

mean
h(n) size 5

median
h(n) size 5
LP filtering –smoothing in space domain

Separable median filtering:

– separate application of horizontal and vertical 1D median filter


to 2D image

Result of separable 1D median filtering to image rows and columns


separately depends on the order, in which the 1D median filters are
applied!

Result of this so called separable median filtering is not equivalent to


2D median filtrering!
LP filtering –smoothing in space domain

Separable median filtering:

original

(a) (b)
LP filtering –smoothing in space domain
Separable median filtering?

original

(c) (d)
LP filtering –smoothing in space domain

Gaussian – median – comparison

original Gaussian Median (5 x 5)

Gaussian (5x5) and median of the same size (5x5)


Dolno-priepustná filtrácia a potlačenie šumu

Lena+noise Lena -median filter gradient image


Summary
• filtering in the frequence domain – Discrete Fourier Transform – spectrum of the signal
• filtering in the space domain – 2D convolution with impulse response of the filter
Degradation reduction in space domain
High-pass filtering – image sharpening
• reduces low-frequency components without disturbing high-frequency information
• blur reduction, contrast enhancement
• homomorfic filtering – HP filter
HP filter amplifies also unwanted high-frequency noise !!

Low-pass filtering –image smoothing


• attenuates the high-frequency components without disturbing low-frequency information
• mean:
• blurs image
• median:
• reduces impulse or „salt-and-pepper“ noise
• preserve edges (abruptchanges of greylevel)
LP filter reduces aditive noise, but blurs image
Image reconstruction in frequency domain
DFT - IDFT

x(n) y(n)
system
X(k) Y(k)
Image reconstruction
Reduction of image blurring

an image blurred by planar motion


g (n1 , n2 ) = f (n1 , n2 )  b(n1 , n2 )
b(n1,n2) - blurring function
-typicaly is of low-pass character – blurs the image
Image reconstruction
Reduction of image blurring

PSF – point spread function


- image out of focus
- atmospheric turbulence
- image blurred by planar motion

g (n1 , n2 ) = f (n1 , n2 )  b(n1 , n2 )


b(n1,n2) - blurring function
-typically is of low-pass character – blurs the image
Reduction of image blurring

PSF – point
spread function
𝑏 𝑛1 , 𝑛2
- image out of focus
-image blurred by
planar motion
-atmospheric
turbulence

𝑔 𝑛1 , 𝑛2 = 𝑓 𝑛1 , 𝑛2 ∗ 𝑏 𝑛1 , 𝑛2
Reduction of image blurring

an image blurred by planar motion


g (n1 , n2 ) = f (n1 , n2 )  b(n1 , n2 )

an image blur caused by optic system –


an image blur by planar motion
out of focus
reduction of an image blurred by planar motion
1 T /2
g ( x, y ) =  f (x − x 0 (t ), y − y 0 (t ))dt
T t =−T / 2
where 𝑥0 (𝑡) and 𝑦0 (𝑡) represent horizontal and vertical translation
of an analog image f(x,y) at time t relative to the imaging system, where T is the
duration of exposure
 
(
G x,y = )   g ( x , y )e − j x x
e
− j y y
dxdy
x = − y = −
  1 T /2 
=   T  f (x − x 0 (t ), y − y 0 (t ))dt  e − j x x − j y y
e dxdy
x = − y = − 
 t = −T / 2 

simplifying: ( ) (
G x , y = F x , y B x , y )( )
where
(
B x ,  y ) =
1 T / 2 − j x x0 (t ) − j y y0 (t )
 e
T t = −T / 2
e dt
DFT

( ) (
G x , y = F x , y B x , y )( )
g (n1 , n2 ) = f (n1 , n2 )  b(n1 , n2 )

B(1 ,  2 ) is a blurring function– DFT b(n1 , n 2 )


Image restoration - deconvolution

𝑔 𝑛1 , 𝑛2 = 𝑓 𝑛1 , 𝑛2 ∗ 𝑏 𝑛1 , 𝑛2

where:
𝑓 𝑛1 , 𝑛2 - original image
𝑏 𝑛1 , 𝑛2 - blur function
𝑔 𝑛1 , 𝑛2 - degraded image

𝐺 𝜔1 , 𝜔2
𝐹 𝜔1 , 𝜔2 =
𝐵 𝜔1 , 𝜔2

𝐹෠ 𝜔1 , 𝜔2 𝐵 𝜔1 , 𝜔2 𝐺 𝜔1 , 𝜔2
𝐹 𝜔1 , 𝜔2 - spectrum of original image
𝐺 𝜔1 , 𝜔2 = 𝐹 𝜔1 , 𝜔2 ∙ 𝐵 𝜔1 , 𝜔2 𝐵 𝜔1 , 𝜔2 - spectrum of blur function
𝐺 𝜔1 , 𝜔2 - spectrum of degraded image
𝐹෠ 𝜔1 , 𝜔2 - spectrum of reconstructed image
Image restoration - deconvolution
𝑔 𝑛1 , 𝑛2 = 𝑓 𝑛1 , 𝑛2 ∗ 𝑏 𝑛1 , 𝑛2

𝐷𝐹𝑇
𝐺 𝜔1 , 𝜔2 = 𝐹 𝜔1 , 𝜔2 ∙ 𝐵 𝜔1 , 𝜔2

𝐺 𝜔1 , 𝜔2
𝐹 𝜔1 , 𝜔2 =
𝐵 𝜔1 , 𝜔2

Inverse filter:
1
𝐻 𝜔1 , 𝜔2 =
𝐵 𝜔1 , 𝜔2

𝐹෠ 𝜔1 , 𝜔2 𝐵 𝜔1 , 𝜔2 𝐺 𝜔1 , 𝜔2
𝐺 𝜔1 , 𝜔2
𝑓መ 𝑛1 , 𝑛2 = 𝐼𝐷𝐹𝑇
DECONVOLUTION – Inverse filtering 𝐵 𝜔1 , 𝜔2

if the blur function b(n1 , n 2 ) is known !!


Image restoration - deconvolution

𝐺 𝜔1 , 𝜔2
𝐹 𝜔1 , 𝜔2 =
𝐵 𝜔1 , 𝜔2

Inverse filter – tends to be very sensitive to noise!!

1
if 𝐵 𝜔1 , 𝜔2 is very small -> is large -> small noise in frequency regions,
𝐵 𝜔1 ,𝜔2
1
where is very large, may be significantly emphasised
𝐵 𝜔1 ,𝜔2
solution / lessening the noise sensitivity:
1
- to limit the frequency response to some threshold 𝛾 ∶
𝐵 𝜔1 ,𝜔2

 1 1
 B( ,  ) , 
 B(1 ,  2 )
H (1 ,  2 ) =  1 2
( )
 B 1 ,  2 , inde
 B(1 ,  2 )

Image restoration - deconvolution

if the blur function b(n1 , n 2 ) is unknown !!

BLIND DECONVOLUTION
Summary

Image restoration/ reconstruction in frequency domain


DFT - IDFT
Image restoration – deconvolution
Inverse filtering
PSF – point spread function
• image out of focus
• atmospheric turbulence
• image blurred by planar motion
blind deconvolution
if the blur function is unknown

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy