Computer Vision: Filtering Operations in the Frequency (Fourier) Domain
Joseph Fourier said some operations are faster to perform in the Fourier Domain. He observed that any periodic function can be a weighted sum of sinusoids at different frequencies.
This is one of the most widely used mathematical tools in almost all of engineering and other scientific disciplines.
The following is a sinusoid defined.
Amplitude says the height or max value of sinusoid.
Second is phase, or the horizontal shift of a sinusoid.
T is the period.
φ is the shift.
u = Frequency (1 / T)
A is the amplitude.
Remember, u represents a frequency of the particular wave.
Phase switches from negative to positive at a given frequency.
Neat diagram I drew.
Before the arrow shows the spatial domain, after shows the frequency domain.
Linearity
αf1(x) + βf1(x) -> αf1(u) + βf1(u)
Scaling
f(α(x)) -> (1/|a|) *F(u/a)
f(α(x)) -> (1/|a|) *F(u/a)
Shifting
f(x - a) -> e^(-i2πα)*F(u)
Differentiation
dn/dxn(f(x)) -> (i2πu)^n*F(u)
Convolution in the spatial domain become multiplication in the frequency domain
g(x) = f(x) * h(x), where f is an image and h is a filter. Suppose this filter is symmetric.
We can multiply the fourier transforms.
Inverse fourier transform G(u) = F(u) x H(u)
First, trarnsform functions into the fourier domain.
Multiplying by a Gaussian Kernel removes the noise, which is Zero at high frequencies.
Convolution turning into multiplication is way easier and faster than correlation. It also helps us to develop some nice and useful intuitions.
However, digital images are discrete functions, so there have to be different definitions for discrete functions, where a limit is yielded on the maximum possible frequency.
We are taking exponential filters to determine how much amplitude and how much phase is needed. The filters just extract the amplitude and phase of the image at frequencies P and Q.
The following image is constant among vertical direction, so the Fast Fourier Transform of the image is as follows:
The fourier transform is also added (they are linear). The transform of the sum of 2 functions is the same as the sum of Fourier Transforms.
In a Fourier transform, higher values are shown more with brighter colors. The original image as strong edges perpendicular to a lot of edges. Sharp edges result in higher frequencies in the Fourier domain.
Random white noise has no preferential directions.
A low-pass filter zeros all of the high frequencies, and as a result, blur the image.
It is usually better to have a smoother cutoff. In order to do this properly, we perform Gaussian Smoothing, which is multiplying by a Gaussian circle/smoother, where now we can get a blurred image without all of the wavy artifacts. Making the Gaussian wider will blur the image and make the Fourier transform narrower.
Edges, are high frequency and everything is eliminated which is anything with constant brightness.
We can infer from this that High-Pass filter has a very important purpose in detecting corners and edges.
Remember, the second image represents the frequency domain. The reason for Gaussian are to
1. Reduce Noise
2. Reduce the Amount of Information Content.














Comments
Post a Comment