EEE 52/4 Advnced Digital Signal and Image Processing Tuesday, 00-300 hrs, Data Com. Lab. Friday, 0800-000 hrs, Data Com. Lab Prof. Mohd Zaid Abdullah Room No: 5 Email: mza@usm.my www.eng.usm.my
Electromagnetic Wave Wavelength () = C: speed of light 8 c 2.9980 m/s Speed (C) Frequency (f) Energy (E) = hf h: Planck s constant h 6.26076 Js
Electromagnetic Spectrum
Biological Image Acuisition the human eye
Electronic Image Acuisition Camera Scanner Video camera Photocopying machine
Image Acquisition System Video signal Programma ble acquisition gain A/D converter Look-up table Image buffer Host 32- bit PCI bus PCI bus interface Image buffer control
Charge Couple Devices Select Column bus FET transistor Light Active mode Capacitor Photodiode Select Reset FET transistors Column bus V DD Light Passive mode Capacitor Photodiode
CCD Architectures CCD elements CCD cells Shift register Linear Integratio n area Sh ift re gis te r Sh ift re gis te r Sh ift re gis te r Sh ift re gis te r Storage area Frame transfer Shift register Interline Shift register
Digital Image Formation i (x,y) r (x,y) f (x,y) i (x,y): incident component r (x,y): reflected component f (x,y): image component
Sampling f t f 2 t 2 f2 f
Frequency Response f s f Nyquist Undersampled f s f Nyquist Nyquist rate f s f Nyquist Oversampled
Time domain Fourier Transform Spectrum Cosine Gaussian Impulse Impulses
Sampling and Quantization Continuous Scan line A-B Sampling Quantization
Sampling and Quantization Continuous Sampled
Igital Image Processing
Coordinate Convention System
Spatial and Gray Level Resolution l 0,255 Down sampling
28 x 28 64 x 64 32 x 32 Spatial and Gray Level Resolution Fixed gray level resolution - 8 bit Varying spatial resolution l 0,255 024 x 024 52 x 52 256 x 256
4 bits l = [0,5] 3 bits l = [0,7] 2 bits l = [0,3] bit l = [0,] Spatial and Gray Level Resolution Varying gray level resolution Fixed spatial resolution 8 bits l = [0,255] 7 bits l = [0,27] 6 bits l = [0,65] 5 bits l = [0,3]
Image Enhancement in the Spatial Domain
Gray Level Transformation
Histogram Processing
Transformation Function
Histogram Equalization
Transformation Functions
Histogram Matching
Histogram Equalization vs Histogram matching
Histogram Equalization
Histogram Matching
Spatial Filtering
3 x 3 Spatial Mask
Smoothing or averaging masks
Results of smoothing by filter mask of different sizes
Results of smoothing by filter
First and second order derivatives f (x) noise ramp thin line x
Isotropic filters 90 0 45 0 90 0 45 0
original Laplacian Laplacian scaled Enhanced using (5)
Gradient filters
Sobel filters original filtered
Image Enhancement in the Frequency Domain the Fourier discovery f f 2 f 3 f 4 f > f 2 > f 3 > f 4 f + f 2 + f 3 + f 4
Inverse relation
Fourier spectrum representations low high high low frequencies low high high high frequencies high high standard low low frequencies high high low high low low high high frequencies low low low frequencies low low optical high high frequencies low low high
Fourier spectrum of 20x40 white block (52 x 52 image)
SEM image of damaged IC
Notch filtering
Low pass filtering (LPF) and high pass filtering (HPF) LPF HPF
pass Ideal Low pass filter (ILPF) pass H(u,v) - D(u,v) - D o +D o + D(u,v)
Ideal Low pass filtering with different cut-off frequencies R=80, =98% R=5, =94.6% R=5, =92% R=230, =99.5% R=30, =96.4%
Ideal Low pass filtering, is total power removed R=30 =3.6% R=80, =2% R=230, =0.5% original R=5, =8% R=5, = 5.4%
H(u,v), R=5 Ideal Low pass filtering h(x,y) H(u,v) (x,y) g(x,y) (x,y) h(x,y)
Mini project groupings Group Group 2 Group 3 PROJECT 4 PROJECT 2 PROJECT 6 Group 4 Group 5 Group 6 PROJECT 5 PROJECT 3 PROJECT
Butterworth Low pass filter (BLPF)
2 nd order BLP filtering original R=5 R=5 R=30 R=80 R=230
BLPFs of different orders st 2 nd 3 rd 4 th
Gaussian Low pass filter (GLPF)
GLP filtering original R=5 R=5 R=30 R=80 R=230
High pass filters (HPFs) Ideal Butterworth Gaussian
Spatial representations Ideal Butterworth Gausssian
Ideal high pass filtering original D 0 =5 D 0 =30 D 0 =80
Butterworth high pass filtering, n=2 original D 0 =5 D 0 =30 D 0 =80
Gaussian high pass filtering, n=2 original D 0 =5 D 0 =30 D 0 =80
Homomorphic filtering original filtered L = 0.5 H = 2.0
Noise models Gaussian Rayleigh Gamma Exponential Uniform Impulse
Noise free test pattern black near white gray
Noisy images and histograms Gaussian Rayleigh Gamma
Noisy images and histograms Exponential Uniform Salt & pepper
Experimentation Impulse Degraded Impulse
Turbulence model H 2 2 k u v u, v e 5/ 6 Original Severe k = 0.0025 Mild k = 0.00 Low k = 0.00025
Inverse filtering Original (M=N=480) Full Cut-off 40 Cut-off 70 Cut-off 85 Radially limited)
Wiener filtering Original Full inverse Radially limited inverse Weiner Iteratively chosen
Motion blurring N - g(x,y) = H(u,v) F(u,v) N M M Original, f(x,y) M = N = 400 H u, v i t = 40 i t u sin i M u sin M t e ju M i t
Inverse filtering Original Blurred Filtered F F for G( u, v) H ( u, v) u, v for u 0,20,30,..., 39 u v G u, v and F u, v G u, v, 2 2 u 0,20,30,...,39
Wiener filtering Original Blurred Filtered = 0.00
Inverse Inverse vs Wiener filtering Wiener Original Blurred
Inverse Noisy restoration Weiner Original Original + gaussian noise Blurred = 0.00
M = N = 8 First one First two 0 Fourier basis images (real) 0 2 3 4 5 6 7 First three 2 First four 3 4 5 All 6 7
M = N = 8 Fourier basis images (imaginary) 0 2 3 4 5 6 7 First one First two 0 First three 2 First four 3 4 5 All 6 7
Test image M = N = 8 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 255 255 0 255 255 255 255 0 255 255 0 255 50 50 255 0 255 255 0 255 50 50 255 0 255 255 0 255 255 255 255 0 255 255 0 0 0 0 0 0 255 255 255 255 255 255 255 255 255
Fourier reconstruction First five, E=539.5 First six, E=370.9 First seven, E=248.6 All, E=0 Original First one, E=895.7 First two, E=885.0 First three, E=785.2 First four, E=539.5
M = N = 8 First one 0 Harr basis images 0 2 3 4 5 6 7 First two First three 2 First four 3 4 5 All 6 7
Harr reconstruction First five, E=65.0 First six, E=603.7 First seven, E=587.5 All, E=0 Original First one, E=895.7 First two, E=895.7 First three, E=879.0 First four, E=832.7
Hadamard matrices Core 2 H 2 nd order 2 H H H 2 = - - - - - - + 2 2 2 2 4 H 2
Hadamard matrices 3 rd order 2 3 H H H 2 4 8 H 3
Hadamard matrix, H 3 8 H 3 Sequency 0 7 3 4 6 2 5 Not sequency order
Walsh- Hadamard matrix, H 3 8 H 3 Sequency 0 2 3 4 5 6 7 Sequency order
M = N = 8 First one 0 Walsh-Hadamard basis images 0 2 3 4 5 6 7 First two First three 2 First four 3 4 5 All 6 7
W-H reconstruction First five, E=674. First six, E=674. First seven, E=0 Original First one, E=895.7 First two, E=895.7 First three, E=832.7 First four, E=832.7
E (%) Error in reconstruction 000 900 800 700 600 500 400 300 Fourier Harr W-H 200 00 0 First First 2First 3First 4First 5First 6First 7First 8 No. of basis images
Harr scaling functions 0,0 x x 2 2 x x 0, x 2 2x,0 x 2 2x,
Expansion x 0.5 x x 0. x f,0, 25, 4
Decomposition 0,0 x,0 2, 2
Harr wavelett functions 0, x x 0 Mother wavelett 2 x x 2 0,2 Child 2 x 2 2x,0 Child
Wavelett expansion 2 2 2 2 4 f x = f x 3 2 4 2 8 fa 0,0 0,2 f d 0,0 0, 2 2 4 2 8
Wavelett Series Expansion f x c j x j, k x d j k j, k x k 0 0 j j 0 k d j c j 0 : arbitrary starting scale j 0 k x x : approximation or scaling coefficients : detail or wavelet coefficients : scaling function : wavelet function c x f x, x f x x j j k j, k d 0 0, 0 x f x, x f x x j j, k j, k dx dx
Wavelett series expansion 2 y x
Given f Discrete Wavelet Transform x f x xx for x 0,,2,, M 0 j, k f x j k x W 0 0, M x j, k f x j k x W, M x Inverse DWT let j0 0 and M 2 j 0,,2,, J j k 0,,2,,2 J f M x W j0, k j k x W j k j k x 0,,, k M j j 0 k
Fast Wavelet Transform (D) HPF h n 2 W j, n W j, n h n LPF 2 W j, n
Fast Wavelet Transform (D) 2-stage/2-scale FWT h n 2 W J, n f n J,n h n 2 W J 2, n h n 2 W J, n h n 2 W J 2, n
Fast Wavelet Transform (D) Single stage synthesis W j, n 2 h n W j, n W j, n 2 h n
Fast Wavelet Transform (D) 2-stage synthesis W J, n J 2,n 2 2 h n h n 2 h n n J f W, n J 2,n 2 h n
Filter bank analysis h m 2 W D j, m, n h n 2 row, m j, m, n column, n h m h m 2 W V j, m, n row, m 2 W H j, m, n h n 2 row, m column, n h m 2 W j, m, n row, m
Decomposition W j, m, n j, m n W H j, m, n W, j, m nw D j, m, n W V,
Synthesis filter bank D j, m, n 2 h m V H j, m, n j, m, n row, m 2 row, m 2 h h m m 2 column, n h n W j, m, n j, m, n row, m 2 h m 2 column, n h n row, m
Sample image 52 x 52
Filter bank analysis first scale W j, m, n 256 x 256 W H j, m, n 256 x 256 W V j, m, n 256 x 256 W D j, m, n 256 x 256
Synthesis filter bank using (first-scale) W H D V j m, n, W j, m, n andw j, m, n, Original Reconstructed
Filter bank analysis Second-scale W H j, m, n 256 x 256 W V j, m, n 256 x 256 W D j, m, n 256 x 256
Synthesis filter bank using (two-scale) W j, m, n Original Reconstructed