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. � Explicit high-pass filtering � Unsharp Masking � Deconvolution � Edge Detection Tradeoff: � Reduces blur, but � 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) = 1 2 /u 2 c 1 n 1+(uc 2 /u 2 ) High-Pass and Band-Pass Filtering Introduction High-Pass Filters Ideal Butterworth Gaussian 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) � HP(u) is a high-pass filter � α 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 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 20 40 60 80 100 n 1 + (uc 2 /u 2 ) 120 20 40 60 80 100 120 � The “cutoff” frequency uc controls where the cutoff occurs. � 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 � Low-pass reduces noise but accentuates blurring � 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 Band-­‐Pass Filtering Band-Pass: Frequency Domain (http://paulbourke.net/miscellaneous/imagefilter/) Band-­‐Pass Filtering High-­‐Pass and Band-­‐Pass Filtering Band-Pass: Space Domain (http://paulbourke.net/miscellaneous/imagefilter/) High-­‐Pass and Band-­‐Pass Filtering High-­‐Pass Filtering Example Ideal (Sharp) Cut-Off: Note Ringing Smooth cut-off: ringing reduced (http://paulbourke.net/miscellaneous/imagefilter/) 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