Midterm Review Image Processing CSE 166 Lecture 10
Topics covered Image acquisition, geometric transformations, and image interpolation Intensity transformations Spatial filtering Fourier transform and filtering in the frequency domain Image restoration Color image processing CSE 166, Fall 2017 2
Image acquisition CSE 166, Fall 2017 3
Geometric transformations CSE 166, Fall 2017 4
Intensity transformations Contrast stretching function Thresholding function CSE 166, Fall 2017 5
Intensity transformations Some basic transformation functions CSE 166, Fall 2017 6
Gamma transformation CSE 166, Fall 2017 7
Gamma transformation Dark image γ < 1 CSE 166, Fall 2017 8
Gamma transformation Light image γ > 1 CSE 166, Fall 2017 9
Piecewise linear transformations Contrast stretching Intensity level slicing Bit plane slicing CSE 166, Fall 2017 10
Contrast stretching CSE 166, Fall 2017 11
Intensity level slicing CSE 166, Fall 2017 12
Bit plane slicing CSE 166, Fall 2017 13
Histogram Similar to probability density function (pdf) CSE 166, Fall 2017 14
Histogram equalization CSE 166, Fall 2017 15
Histogram equalization CSE 166, Fall 2017 16
Histogram equalization CSE 166, Fall 2017 17
Spatial filtering (2D) CSE 166, Fall 2017 18
Correlation and convolution (2D) CSE 166, Fall 2017 19
Smoothing kernels Average (box kernel) Weighted average (Gaussian kernel) CSE 166, Fall 2017 20
Smoothing with box kernel Input image 3x3 11x11 21x21 CSE 166, Fall 2017 21
Smoothing with Gaussian kernel Standard deviation σ Percent of total volume under surface 1 39.35 2 86.47 3 98.89 Volume under surface greater than 3σ is negligible CSE 166, Fall 2017 22
Smoothing with Gaussian kernel Input image σ = 3.5 σ = 7 21x21 43x43 CSE 166, Fall 2017 23
Derivatives CSE 166, Fall 2017 24
Sharpening filters CSE 166, Fall 2017 25
Review Complex numbers CSE 166, Fall 2017 26
Overview: Image processing in the frequency domain Image in spatial domain f(x,y) Fourier transform Image in frequency domain F(u,v) Image in spatial domain g(x,y) Jean Baptiste Joseph Fourier 1768 1830 Inverse Fourier transform Frequency domain processing Image in frequency domain G(u,v) CSE 166, Fall 2017 27
1D Fourier series Sines and cosines Period T Weighted by magnitude Shifted by phase Periodic function CSE 166, Fall 2017 28
Sampling CSE 166, Fall 2017 29
Sampling Fourier transform of function Fourier transforms of sampled function Over sampled Critically sampled 1/ΔT Under sampled CSE 166, Fall 2017 30
The sampling theorem Fourier transform of function Fourier transform of sampled function Critically sampled CSE 166, Fall 2017 31
Recovering F(μ) from ~ F(μ) Fourier transform of sampled function Over sampled Ideal lowpass filter Product of above Recovered CSE 166, Fall 2017 32
Aliasing Continuous Discrete Under sampled Alias: a false identity Different Identical Over sampled Sampled at same rate CSE 166, Fall 2017 33
Aliasing 1D Original 2D Aliasing CSE 166, Fall 2017 34
Fourier transform of sampled function and extracting one period Over sampled Under sampled 1D 2D Recovered m max Footprint of a 2-D ideal lowpass (box) filter v max v ass Imperfect recovery v due to interference m CSE 166, Fall 2017 35 m
Centering the DFT 1D 2D In MATLAB, use fftshift and ifftshift CSE 166, Fall 2017 36
Centering the DFT Original DFT (look at corners) Shifted DFT Log of shifted DFT CSE 166, Fall 2017 37
Contributions of magnitude and phase to image formation Phase IDFT: Phase only (zero magnitude) IDFT: Magnitude only (zero phase) IDFT: Boy magnitude and rectangle phase IDFT: Rectangle magnitude CSE 166, Fall 2017 and boy phase 38
Filtering using convolution theorem Filtering in spatial domain using convolution expected result Filtering in frequency domain using product without zero padding wraparound error CSE 166, Fall 2017 39
Filtering using convolution theorem Zero padding Filtering in frequency domain using product with zero padding Fourier transform Product no wraparound error Inverse Fourier transform CSE 166, Fall 2017 Gaussian lowpass filter in frequency domain 40
Filtering in the frequency domain Ideal lowpass filter (LPF) Frequency domain CSE 166, Fall 2017 41
Filtering in the frequency domain Ideal lowpass filter (LPF) Spatial domain H(u,v) h(x,y) CSE 166, Fall 2017 42
Filtering in the frequency domain Gaussian lowpass filter (LPF) CSE 166, Fall 2017 43
Filtering in the frequency domain Butterworth lowpass filter (LPF) CSE 166, Fall 2017 44
Filtering in the frequency domain Ideal LPF Gaussian LPF Butterworth LPF CSE 166, Fall 2017 45
Highpass filter (HPF) Frequency domain Ideal HPF Gaussian HPF Butterworth HPF CSE 166, Fall 2017 46
Highpass filter (HPF) Spatial domain Ideal HPF Gaussian HPF Butterworth HPF CSE 166, Fall 2017 47
Filtering in the frequency domain Ideal HPF Gaussian HPF Butterworth HPF CSE 166, Fall 2017 48
Filtering in the frequency domain H (u) H (u) Frequency domain 1D h(x) u h(x) u 1 3 9 1 1 1 1 1 1 1 1 1 1 3 16 1 2 1 2 4 2 1 2 1 212121 21 8 21 212121 0 21 0 21 4 21 0 21 0 Spatial domain x x Lowpass filter Sharpening filter CSE 166, Fall 2017 49
Filtering in the frequency domain Lowpass filter Highpass filter Offset highpass filter 2D CSE 166, Fall 2017 50
Bandreject filters Ideal Gaussian Butterworth CSE 166, Fall 2017 51
Model of image degradation, then restoration CSE 166, Fall 2017 52
Histograms of sample patches Sample flat patches from images with noise Identify closest probability density function (pdf) match: Gaussian Rayleigh Uniform CSE 166, Fall 2017 53
Mean filters X ray image Additive Gaussian noise Arithmetic mean filtered Geometric mean filtered CSE 166, Fall 2017 54
Order statistic filters Additive salt and pepper noise 1x median filtered 2x median filtered 3x median filtered CSE 166, Fall 2017 55
Comparing filters Additive uniform + salt and pepper noise Arithmetric mean filtered Geometric mean filtered Median filtered Alpha trimmed mean filtered CSE 166, Fall 2017 56
Adaptive filters Additive Gaussian noise Arithmetric mean filtered Geometric mean filtered Adaptive noise reduction filtered CSE 166, Fall 2017 57
Periodic noise DFT magnitude Additive sinusoidal noise Conjugate impulses CSE 166, Fall 2017 58
Notch reject filters CSE 166, Fall 2017 59
Notch reject filter Degraded image Conjugate impulses DFT magnitude Filter in frequency domain Conjugate impulses Estimate of original image CSE 166, Fall 2017 60
Estimation of degradation function by experimentation Impulse of light Imaged (degraded) impulse CSE 166, Fall 2017 61
Estimation of degradation function by mathematical modeling Atmospheric turbulence model CSE 166, Fall 2017 62
Image restoration Inverse filtering CSE 166, Fall 2017 63
RGB color model RGB color cube RGB coordinates CSE 166, Fall 2017 64
HSI color model: Relationship to RGB color model RGB color cube rotated such that line joining black and white (intensity axis) is vertical CSE 166, Fall 2017 All colors with cyan hue 65
RGB color cube HSI color model HSI intensity axis RGB color cube rotated such that observer is on intensity axis, beyond white looking towards black Shape does not matter, only angle from red CSE 166, Fall 2017 66
Color models CMYK CMY RGB HSI CSE 166, Fall 2017 67
Intensity slicing Grayscale to 2 colors CSE 166, Fall 2017 68
Intensity slicing Grayscale to 2 colors CSE 166, Fall 2017 69
Intensity slicing Colorbar Grayscale to 256 colors CSE 166, Fall 2017 70
Intensity to color transformations Grayscale input image RGB output image CSE 166, Fall 2017 71
Intensity to color transformations X ray grayscale input image Without explosive With explosive RGB output images CSE 166, Fall 2017 Misses explosive 72
Intensity to color transformations Multiple grayscale input images Single RGB output image CSE 166, Fall 2017 73
Intensity to color transformations Red (R) Green (G) Blue (B) Multiple satellite grayscale input images Near infrared (NIR) NIR,G,B as RGB Output RGB images R,NIR,B as RGB 74
Full color image processing Spatial filtering: process each channel independently CSE 166, Fall 2017 75
Full color image processing Spatial filtering: image smoothing All RGB channels HSI intensity channel only CSE 166, Fall 2017 Difference 76
Full color image processing Spatial filtering: image sharpening All RGB channels HSI intensity channel only Difference CSE 166, Fall 2017 77
Full color image processing Histogram equalization: do not process each channel independently 1. RGB to HSI 2. Histogram equalize HSI intensity 3. HSI to RGB 4. HSI saturation adjustment CSE 166, Fall 2017 78