SPATIAL FILTERING SPATIAL FILTERING Linear Filters Lowpass Filters
- Slides: 46
SPATIAL FILTERING
SPATIAL FILTERING Linear Filters Lowpass Filters Highpass Filters Bandpass Filters Nonlinear Filters Median Filter
LINEAR SPATIAL FILTERING Given a filter F and an image I, we can compute ^ ^ a filtered image, I , such that I(x, y) is a linear combination of I(x, y) and its neighbors.
LINEAR SPATIAL FILTERING f f f 1 4 7 f f 2 3 f 5 6 f 8 i 1 i 2 i 3 i 4 i 5 i 6 i 7 i 8 i 9 9 ^ i 5= f 1* i + 1 f * i 2+ f 2* i +3 f *3 i + 4 f * i 4 + f *i 6 6 7 7 8 8 9 9 5 5
LINEAR SPATIAL FILTERING 0 -1 -1 0 4 -1 0 2 3 5 7 2 3 4 7 5 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 4 -1 2 3 0 -1 0 3 4 5 7 2 7 5 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 4 -1 2 3 0 -1 0 3 4 2 5 7 2 7 5 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 4 -1 2 3 5 0 -1 0 3 4 7 2 1 7 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 4 -1 2 3 5 7 0 -1 0 3 4 7 5 2 1 3 2 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 2 1 3 16 0 2 3 3 4 -1 5 0 7 4 -1 7 2 -1 0 5 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 0 -1 2 2 1 3 16 -1 3 5 7 -1 2 0 4 -1 3 4 7 0 -1 5 2 5 6 5 3 1 2 6 2 2 1 7 3 3 2 0 0
LINEAR SPATIAL FILTERING 0 -1 2 1 1 0 2 3 -1 4 -1 3 4 0 -1 0 3 16 -1 5 6 5 7 2 7 5 2 5 3 1 2 6 2 2 1 7 3 3 2 0
LINEAR SPATIAL FILTERING 2 1 1 -3 3 16 -1 0 2 3 5 -1 4 -1 3 4 7 0 -1 0 5 6 5 7 2 5 2 3 1 2 6 2 2 1 7 3 3 2 0
LOWPASS SPATIAL FILTERING (retains the low frequency components) • Used for image smoothing or blurring • Filter coefficients are often all positive • The sum of the coefficients (after scaling) is 1.
LOWPASS SPATIAL FILTERING 1 9 x 1 1 1 1 1 simple 3 x 3 boxcar filter
LOWPASS SPATIAL FILTERING 1 25 x 1 1 1 1 1 1 1 simple 5 x 5 boxcar filter
LOWPASS SPATIAL FILTERING 1 16 x 1 2 4 2 1 3 x 3 weighted average filter
HIGHPASS SPATIAL FILTERING (retains the high frequency components - edges) • Used for edge detection and enhancement • Filter coefficients are positive and negative • The sum of the coefficients is 0 • Also know as derivative filters
HIGHPASS SPATIAL FILTERING -1 -1 8 -1 -1
HIGHPASS SPATIAL FILTERING 0 -1 4 -1 0
HIGHPASS SPATIAL FILTERING 1 0 0 1 0 -1 -1 0 Roberts Operators
HIGHPASS SPATIAL FILTERING -1 -1 0 1 0 0 0 -1 0 1 1 -1 0 1 Prewitt Operators
Prewitt Operators
HIGHPASS SPATIAL FILTERING -1 -2 -1 -1 0 0 0 -2 0 2 1 -1 0 1 Sobel Operators
Sobel Operators
Sobel - horizontal Sobel - vertical Sobel - horizontal + vertical
Sobel - horizontal Sobel - vertical Value is normalized and scaled to 255 new = 255 * (val - min)/(max-min) Sobel - horizontal + vertical
Signed highpass results Absolute value highpass results new = 255 * (val - min)/(max-min) new = abs(val) result is contrast stretched
HIGHPASS = ORIGINAL - LOWPASS
HIGHPASS = ORIGINAL - LOWPASS -1 -1 8 -1 -1 1 x 9 1 1 1 1 1 ^ i 5= f 1* i + 1 f * i 2+ f 2* i +3 f *3 i + 4 f * i 4 + f *i 6 6 7 7 8 8 9 9 5 5
HIGHPASS = ORIGINAL - LOWPASS 0 0 0 0 1 x 9 1 1 1 1 1 ^ i 5= f 1* i + 1 f * i 2+ f 2* i +3 f *3 i + 4 f * i 4 + f *i 6 6 7 7 8 8 9 9 5 5
HIGHPASS = ORIGINAL - LOWPASS ^ i 5= 0 * i + 10 * i + 02* i + 0 *3 i + 1 * i 4 + 0*i 6 ^ i 5= 8 9 1 (1 9 * i + 11 * i + 1 2* i + 1 *3 i + 1 * i 4+ 1*i ) 6 ^ i 5= 7 5 1 (i 9 7 8 5 9 +1 i + 2 i + i 3 + i 4+ i + 5 i + 6 i + i 7) 8 9
ORIGINAL - SMOOTHED
ORIGINAL - = HIGHPASS SMOOTHED
HIGHBOOST = (A - 1)(ORIGINAL) + HIGHPASS
HIGHBOOST = (A - 1)(ORIGINAL) + HIGHPASS if A = 1, HIGHBOOST = HIGHPASS if A > 1, part of the original is added to the HIGHPASS filtered image Also called unsharp masking
ORIGINAL + HIGHPASS
ORIGINAL HIGH BOOST + HIGHPASS
NONLINEAR SPATIAL FILTERING f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 f 9 Median Filter Computes median pixel value within a neighborhood
Noisy Image
Noisy Image Result of 3 x 3 average
Noisy Image Result of 3 x 3 median
Noisy Image Result of 3 x 3 median (2 passes)
- Difference between linear and nonlinear spatial filters
- Ingress filtering vs egress filtering
- Matlab
- Intensity transformations and spatial filtering
- Intensity transformation and spatial filtering
- Intensity transformation functions
- Spatial filtering
- Abbe imaging and spatial filtering experiment
- Contra harmonic mean filter
- Digital image processing
- Spatial filtering
- Doterra taiwan
- Spatial filtering
- Intensity transformation and spatial filtering
- Spatial filtering matlab
- Restoration in the presence of noise only-spatial filtering
- Intensity transformations and spatial filtering
- Spatial data vs non spatial data
- Linear filtering in image processing
- Linear filtering
- Selim aksoy
- Dft performs filtering operation in:
- A low pass filter circuit is basically
- Custom air filters
- Filters in weka
- Skimage.filters.gaussian
- Perceptual filters
- Advantages of active filters
- Lpf/hpf
- Ironport outbreak filters
- Types of analog filters
- Asp.net mvc 5 identity authentication and authorization
- Our personal filters assumptions
- Design of analog filters schaumann
- Where is the heart located
- Barracuda web filter price
- Emfab filters
- Sterile water pyrogen free
- Vertical blinds
- Discriminative training of kalman filters
- Universal xss
- Disadvantages of passive filters
- Jlv army
- High pass and low pass filters
- Lymph nodes: “filters of the blood”
- Impulse invariant method formula
- Our personal filters assumptions