High-Pass and Band-Pass Filtering High-Pass and Band-Pass Filtering CS 450: Introduction to Digital Signal and Image Processing Bryan Morse BYU Computer Science High-Pass and Band-Pass Filtering Introduction Sharpening Blurring is low-pass filtering, so deblurring is high-pass filtering. I Explicit high-pass filtering I Unsharp Masking I Deconvolution I Edge Detection Tradeoff: I Reduces blur, but I Increases noise High-Pass and Band-Pass Filtering Introduction High-Pass Filtering 1 if u > uc 0 otherwise Ideal: H(u) = Gaussian: H(u) = 1 − e− 2 u Butterworth: H(u) = High-Pass and Band-Pass Filtering Introduction High-Pass Filters Ideal Butterworth Gaussian 1 1 2 /u 2 c n 1+(uc 2 /u 2 ) High-Pass and Band-Pass Filtering Ideal Filters Ideal Filters and Ringing High-Pass and Band-Pass Filtering Ideal Filters Ideal Filters and Ringing (cont’d) High-Pass and Band-Pass Filtering Ideal Filters Ideal Filters and Ringing High-Pass and Band-Pass Filtering Gaussian Filters Gaussian High-Pass Filters 1 H(u) = 1 − e− 2 u 2 /u 2 c 1 0.8 0.6 0.4 0.2 20 40 60 80 100 120 Sound familiar? This is what we did with unsharp masking to get the edges! High-Pass and Band-Pass Filtering Gaussian Filters Gaussian High-Pass Filters High-Pass and Band-Pass Filtering Gaussian Filters High-Boost Filtering H(u) = 1 + α HP(u) I HP(u) is a high-pass filter I α controls how much to boost the higher frequencies 2 1.75 1.5 1.25 1 0.75 0.5 0.25 20 40 60 80 100 120 This is why unsharp masking in the spatial domain works! High-Pass and Band-Pass Filtering Butterworth Filters Butterworth High-Pass Filter Controllable sharpness of the frequency-domain cutoff uc : H(u) = 1 n 1 + (uc 2 /u 2 ) 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 20 40 60 80 100 120 20 40 60 80 100 120 I The “cutoff” frequency uc controls where the cutoff occurs. I The parameter n controls the sharpness of the cutoff. High-Pass and Band-Pass Filtering Butterworth Filters Butterworth High-Pass Filters High-Pass and Band-Pass Filtering Band-Pass Filters Band-Pass Filtering Tradeoff: Blurring vs. Noise I Low-pass reduces noise but accentuates blurring I High-pass reduces blurring but accentuates noise A compromise: Band-boost filtering boosts certain midrange freqencies and partially corrects for blurring, but does not boost the very high (most noise corrupted) frequencies. High-Pass and Band-Pass Filtering Summary Summary: Filtering Consider what you want to do in the frequency domain (the shape of the filter) Convert signal to/from frequency domain Convert filter to equivalent convolution operations THEN THEN Implement in the frequency domain Implement in the spatial domain