08 frequency domain filtering DIP
description
Transcript of 08 frequency domain filtering DIP
Frequency Domain Filtering : 1
Frequency Domain Frequency Domain FilteringFiltering
Frequency Domain Filtering : 2
Blurring/Noise reductionBlurring/Noise reduction
Noise characterized by sharp transitions in image intensity
Such transitions contribute significantly to high frequency components of Fourier transform
Intuitively, attenuating certain high frequency components result in blurring and reduction of image noise
Frequency Domain Filtering : 3
Ideal Low-pass FilterIdeal Low-pass Filter
Cuts off all high-frequency components at a distance greater than a certain distance from origin (cutoff frequency)
0
0
1, if ( , )( , )
0, if ( , )
D u v DH u v
D u v D
Frequency Domain Filtering : 4
VisualizationVisualization
Frequency Domain Filtering : 5
Effect of Different Cutoff FrequenciesEffect of Different Cutoff Frequencies
Frequency Domain Filtering : 6
Effect of Different Cutoff FrequenciesEffect of Different Cutoff Frequencies
Frequency Domain Filtering : 7
Effect of Different Cutoff FrequenciesEffect of Different Cutoff Frequencies
As cutoff frequency decreases
Image becomes more blurred
Noise becomes reduced
Analogous to larger spatial filter sizes
Noticeable ringing artifacts that increase as the amount of high frequency components removed is increased
Frequency Domain Filtering : 8
Why is there ringing?Why is there ringing?
Ideal low-pass filter function is a rectangular function
The inverse Fourier transform of a rectangular function is a sinc function
Frequency Domain Filtering : 9
RingingRinging
Frequency Domain Filtering : 10
Butterworth Low-pass FilterButterworth Low-pass Filter
Transfer function does not have sharp discontinuity establishing cutoff between passed and filtered frequencies
Cutoff frequency D0 defines point at which H(u,v)=0.5
2
0
1( , )
1 ( , ) /nH u v
D u v D
Frequency Domain Filtering : 11
Butterworth Low-pass FilterButterworth Low-pass Filter
Frequency Domain Filtering : 12
Spatial RepresentationsSpatial Representations
Tradeoff between amount of smoothing and ringing
Frequency Domain Filtering : 13
Butterworth Low-pass Filters of Different Butterworth Low-pass Filters of Different FrequenciesFrequencies
Frequency Domain Filtering : 14
Gaussian Low-pass FilterGaussian Low-pass Filter
Transfer function is smooth, like Butterworth filter
Gaussian in frequency domain remains a Gaussian in spatial domain
Advantage: No ringing artifacts
2 20( , )/2( , ) D u v DH u v e
Frequency Domain Filtering : 15
Gaussian Low-pass FilterGaussian Low-pass Filter
Frequency Domain Filtering : 16
Gaussian Low-pass FilterGaussian Low-pass Filter
Frequency Domain Filtering : 17
Low-pass Filtering: ExampleLow-pass Filtering: Example
Frequency Domain Filtering : 18
Low-pass Filtering: ExampleLow-pass Filtering: Example
Frequency Domain Filtering : 19
Periodic Noise ReductionPeriodic Noise Reduction
Typically occurs from electrical or electromechanical interference during image acquisition
Spatially dependent noise
Example: spatial sinusoidal noise
Frequency Domain Filtering : 20
ExampleExample
Frequency Domain Filtering : 21
ObservationsObservations
Symmetric pairs of bright spots appear in the Fourier spectra
Why?
Fourier transform of sine function is the sum of a pair of impulse functions
Intuitively, sinusoidal noise can be reduced by attenuating these bright spots
0 0 0
1sin(2 ) ( ) ( )
2k x j k k k k
Frequency Domain Filtering : 22
Bandreject FiltersBandreject Filters
Removes or attenuates a band of frequencies about the origin of the Fourier transform
Sinusoidal noise may be reduced by filtering the band of frequencies upon which the bright spots associated with period noise appear
Frequency Domain Filtering : 23
Example: Ideal Bandreject FiltersExample: Ideal Bandreject Filters
0
0 0
0
1, if ( , )2
( , ) 0, if ( , )2 2
1, if ( , )2
WD u v D
W WH u v D D u v D
WD u v D
Frequency Domain Filtering : 24
ExampleExample
Frequency Domain Filtering : 25
Notchreject FiltersNotchreject Filters
Idea:
Sinusoidal noise appears as bright spots in Fourier spectra
Reject frequencies in predefined neighborhoods about a center frequency
In this case, center notchreject filters around frequencies coinciding with the bright spots
Frequency Domain Filtering : 26
Some Notchreject FiltersSome Notchreject Filters
Frequency Domain Filtering : 27
ExampleExample
Frequency Domain Filtering : 28
SharpeningSharpening
Edges and fine detail characterized by sharp transitions in image intensity
Such transitions contribute significantly to high frequency components of Fourier transform
Intuitively, attenuating certain low frequency components and preserving high frequency components result in sharpening
Frequency Domain Filtering : 29
Sharpening Filter Transfer FunctionSharpening Filter Transfer Function
Intended goal is to do the reverse operation of low-pass filters
When low-pass filer attenuates frequencies, high-pass filter passes them
When high-pass filter attenuates frequencies, low-pass filter passes them
( , ) 1 ( , )hp lpH u v H u v
Frequency Domain Filtering : 30
Some Sharpening FilterSome Sharpening FilterTransfer FunctionsTransfer Functions
Ideal High-pass filter
Butterworth High-pass filter
Gaussian High-pass filter
0
0
0, if ( , )( , )
1, if ( , )
D u v DH u v
D u v D
2
0
1( , )
1 / ( , )nH u v
D D u v
2 20( , )/2( , ) 1 D u v DH u v e
Frequency Domain Filtering : 31
Sharpening Filter Transfer FunctionsSharpening Filter Transfer Functions
Frequency Domain Filtering : 32
Spatial Representation of Spatial Representation of Highpass FiltersHighpass Filters
Frequency Domain Filtering : 33
Filtered Results: IHPFFiltered Results: IHPF
Frequency Domain Filtering : 34
Filtered Results: BHPFFiltered Results: BHPF
Frequency Domain Filtering : 35
Filtered Results: GHPFFiltered Results: GHPF
Frequency Domain Filtering : 36
ObservationsObservations
As with ideal low-pass filter, ideal high-pass filter shows significant ringing artifacts
Second-order Butterworth high-pass filter shows sharp edges with minor ringing artifacts
Gaussian high-pass filter shows good sharpness in edges with no ringing artifacts
Frequency Domain Filtering : 37
High-boost filteringHigh-boost filtering
In frequency domain
( , ) ( , ) ( , )lpg x y Af x y f x y
( , ) ( 1) ( , ) ( , ) ( , )hpg x y A f x y f x y h x y
( , ) ( 1) ( , ) ( , ) ( , )lpg x y A f x y f x y f x y
( , ) ( 1) ( , ) ( , )hpg x y A f x y f x y
( , ) ( 1) ( , ) ( , ) ( , )G u v A F u v F u v H u v
( , ) ( 1) ( , ) ( , )hp
hb
G u v A H u v F u v
H
Frequency Domain Filtering : 38
High frequency emphasisHigh frequency emphasis
Advantageous to accentuate enhancements made by high- frequency components of image in certain situations (e.g., image visualization)
Solution: multiply high-pass filter by a constant and add offset so zero frequency term not eliminated
Generalization of high-boost filtering
( , ) ( , )hfe hpH u v a bH u v
Frequency Domain Filtering : 39
ResultsResults
Frequency Domain Filtering : 40
Homomorphic FilteringHomomorphic Filtering
Image can be modeled as a product of illumination (i) and reflectance (r)
Can't operate on frequency components of illumination and reflectance separately
( , ) ( , ) ( , )f x y i x y y x y
( , ) ( , ) ( , )f x y i x y r x y
Frequency Domain Filtering : 41
Homomorphic FilteringHomomorphic Filtering
Idea: What if we take the logarithm of the image?
Now the frequency components of i and r can be operated on separately
ln ( , ) ln ( , ) ln ( , )f x y i x y r x y
ln ( , ) ln ( , ) ln ( , )f x y i x y r x y
Frequency Domain Filtering : 42
Homomorphic Filtering Homomorphic Filtering FrameworkFramework
Frequency Domain Filtering : 43
Homomorphic Filtering: Image EnhancementHomomorphic Filtering: Image Enhancement
Simultaneous dynamic range compression (reduce illumination variation) and contrast enhancement (increase reflectance variation)
Illumination component characterized by slow spatial variations (low spatial frequencies)
Reflectance component characterized by abrupt spatial variations (high spatial frequencies)
Frequency Domain Filtering : 44
Homomorphic Filtering: Image EnhancementHomomorphic Filtering: Image Enhancement
Can be accomplished using a high frequency emphasis filter in log space
DC gain of 0.5 (reduce illumination variations)
High frequency gain of 2 (increase reflectance variations)
Output of homomorphic filter
2( , ) ( , ) ( , )g x y i x y r x y
Frequency Domain Filtering : 45
ExampleExample
Frequency Domain Filtering : 46
Homomorphic Filtering: Noise ReductionHomomorphic Filtering: Noise Reduction
Multiplicative noise model
Transforming into log space turns multiplicative noise to additive noise
Low-pass filtering can now be applied to reduce noise
( , ) ( , ) ( , )f x y s x y n x y
ln ( , ) ln ( , ) ln ( , )f x y s x y n x y
Frequency Domain Filtering : 47
ExampleExample