Frequency Filters-1

Some basic knowledge about the filtering in frequency domain, all concluded from the book “Digital Image Processing”

1. The 1-D discrete Fourier transform (DFT) is,

F(u)=x=0M1f(x)ej2πux/M,u=0,1,2,...,M1

and the inverse discrete Fourier transform (IDFT) is,
f(x)=1Mu=0M1F(u)ej2πux/M,x=0,1,2,...,M1

It indicates that, for each frequency u , all discrete variable x are needed for computing the Fourier transform, just with the difference in exponential term.


2. Both the DFT and IDFT are infinitely periodic, with period M . That is,

F(u)=F(u+kM),f(x)=f(x+kM)

where k is an integer.


3. The 2-D discrete Fourier transform is,

F(u,v)=x=0M1y=0N1f(x,y)ej2π(ux/M+vy/N)

where, u=0,1,2,...,M1;v=0,1,2,...,N1
and the inverse discrete Fourier transform is,
f(x,y)=1MNu=0M1v=0N1F(u,v)ej2π(ux/M+vy/N)

for x=0,1,2,...,M1;y=0,1,2,...,N1


4. As in 1-D case, the 2-D Fourier transform and its inverse are infinitely periodic in the u and v directions, that is,

F(u,v)=F(u+k1M,v)=F(u,v+k2N)=F(u+k1M,v+k2N)

f(x,y)=f(x+k1M,y)=f(x,y+k2N)=f(x+k1M,y+k2N)

where k1 and k2 are integers.


5. Fourier transform pair satisfies the following translation and rotation properties,

f(x,y)ej2π(u0x/M+v0y/N)F(uu0,vv0)

f(xx0,yy0)=F(u,v)ej2π(ux0/M+vy0/N)

the first equation means, multiplying f(x,y) by the exponential shown shifts the origin of the DFT to (u0,v0) and, conversely, multiplying F(u,v) by the negative of that exponential shifts the origin of f(x,y) to (x0,y0) .

Besides the translation cases, the Fourier transform pairs also has the following property,

f(r,θ+θ0)F(ω,φ+θ0)

here using the polar coordinates,
x=rcosθ,y=rsinθ,u=ωcosφ,v=ωsinφ

that indicates that rotating f(x,y) by an angle θ0 rotates F(u,v) by the same angle.Conversely, rotating F(u,v) rotates f(x,y) by the same angle.

The translation property is very useful,
Consider the 1-D spectrum in the below Figure, the transform data in the interval from 0 to M1 consists of two back-to-back half periods meeting at the point M/2 . For display and filtering purposes, it is more convenient to have in this interval a complete period of the transform in which the data are contiguous with the aid of below equation,

f(x)ej2π(u0x/M)F(uu0)

if we set u0=M/2 , the exponential term will be (1)x , and the Fourier form will shift M/2 , that is,
f(x)(1)xF(uM/2)

so, the F(0) is at the center of the interval [0,M1]

这里写图片描述

Consider the same way in 2-D case, multiply the exponential term with the original digital image data f(x,y) will shift the Fourier Form F(0,0) at (M/2,N/2) , the center of the intervals [0,M1] and [0,N1] , as shown below.

f(x,y)(1)x+yF(uM/2,vN/2)

这里写图片描述


6. In fact, the DFT is a complex , which is consist of real part and imaginary part. the magnitude of the DFT is called the Fourier spectrum,

|F(u,v)|=[R2(u,v)+I2(u,v)]12

and
ϕ(u,v)=arctan[I(u,v)R(u,v)]

is called the phase angle.
where the R and I are the real and imaginary parts of F(u,v) , the spectrum and phase are all MN array.


7. It’s clear from the Fourier equation that,

F(0,0)=x=0M1y=0N1f(x,y)

which indicates that the zero-frequency term is proportional to the average value of f(x,y) , that is,
F(0,0)=MN1MNx=0M1y=0N1f(x,y)=MNf¯(x,y)

where f¯(x,y) denotes the average value of f . Sometimes, F(0,0) is called the DC component of the transform.


8. The 2-D DFT is separable into 1-D transforms,

F(u,v)=x=0M1ej2πux/My=0N1ej2πvy/N=x=0M1F(x,v)ej2πux/M

where,
F(x,v)=y=0N1f(x,y)ej2πvy/N

We can see, F(x,v) is simply the 1-D DFT of a row of f(x,y) . By varying x from 0 to M-1, we compute a set of 1-D DFTs for all rows of f(x,y). Thus, we conclude that the 2-D DFT of f(x,y) can be obtained by computing the 1-D transform of each row of f(x,y) and then computing the 1-D transform along each column of the result.


9. Actually, the 2-D DFT is like a decomposition of an image into complex exponential (i.e. sines and cosines)

F(u)=x=0M1f(x)ej2πux/M=x=0M1f(x)[cos(2πuxM)jsin(2πuxM)],u=0,1,2,...,M1

here is one Fourier transform illustration of random 1-D function f(x) , which can be regarded as a series of cosine and sine curves.

这里写图片描述


10. We refer to the domain of t as the spatial domain, and the domain of μ as the frequency domain, the preceding equation tells us that the Fourier transform of the convolution of two functions in the spatial domain is equal to the product in the frequency domain of the Fourier transforms of the two functions. Conversely, if we have the product of the two transforms, we can obtain the convolution in the spatial domain by computing the inverse Fourier transform. In other words, f(x)g(x) and H(μ)F(μ) are a Fourier transform pair.

f(x)g(x)H(μ)F(μ)

For 1-D case, the discrete equivalent of the convolution is,

f(x)h(x)=m=0M1f(m)h(xm)

for x=0,1,2,...,M1 , where the minus sign accounts for the flipping, and x is the displacement needed to slide one function past the other.

Here gives one 1-D discrete convolution example, the left column of the below figure implements convolution of two functions, f and h , using the above euqation, which because the two functions are of the same size, is written as,

f(x)h(x)=m=0399f(m)h(xm)

这里写图片描述

But, one point differs, instead of computing the convolution directly in the spatial domain, if we use the DFT and the convolution theorem to obtain the same result as the left column of the above figure, we must take into account the periodicity inherent in the expression for the DFT. This is equivalent to convolving the two periodic functions in the first two ones on the right column part of the above figure. Proceeding with these two functions will yield the incorrect result, as the last one on the right column part of the figure. The problem stays the two functions interfere with each other to cause what is commonly referred to as wraparound error.
Fortunately, the solution to the wraparound error problem is simple. Consider the two functions f(x) and h(x) composed of A and B samples, respectively. It can be shown that if we append zeros to both functions so that they have the same length, denoted by P, then wraparound is avoided by choosing,

PA+B1

This process is called zero padding. In a nut shell, to obtain the same convolution result between the “straight” representation of the convolution equation approach, and the DFT approach, functions must be padded prior to computing their transforms. It is the same in 2-D case, let f(x,y) and h(x,y) be two images arrays of sizes AB and CD pixels, respectively, wraparound error in their circular convolution can be avoided by padding these functions with zeros, as follows:
fp(x,y)={f(x,y)00xA1AxPandor0yB1ByQ

hp(x,y)={h(x,y)00xC1CxPandor0yD1DyQ

with
pA+C1,QB+D1

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值