You are on page 1of 6

2014 International Conference on Electronic Systems, Signal Processing and Computing Technologies

A Novel Image Processing Filter Designed Using Discrete Fourier Invariant


Signal

Roshni Ravi

Josemartin M.J.

Dept. of Electronics and Communication Engineering


Rajiv Gandhi Institute of Technology, Kottayam
Kerala, India
roshniravi14jan@gmail.com

Dept. of Electronics and Communication Engineering


Rajiv Gandhi Institute of Technology, Kottayam
Kerala, India
jose.martin@rit.ac.in

AbstractIn this paper, a new image processing filter is


proposed. In order to construct this image smoothing filter,
one dimensional discrete Fourier invariant signal generated
by an iterative design principle based on gradient descent
method is used. The filter shape and values in spatial and
frequency domain is almost the same. The proposed filter
can be used as a kernel matrix in image processing to
perform blurring as well as high frequency noise
suppression. Also it can be used as an optimal two
dimensional window for spatial-frequency spectral analysis
of images.



In order to perform spectral analysis of discrete signals,


we use Discrete Fourier Transform (DFT) and the
Centered Discrete Fourier Transform (CDFT).
For an N point discrete signal , its DFT is given by



All Fourier invariant signals have very interesting


property of shape invariance in time as well as in
frequency domain, for example Gaussian signal, Dirac
delta function, and hyperbolic secant functions. Two
practical methods for the design of one dimensional (1D)
discrete Fourier invariant signals are proposed in [1]. The
direct design method involves splitting the signal into
independent and dependent parts and calculation of the
dependent for any independent part by using an obtained
connection matrix. This method has accuracy problem for
long signals. The iterative design method overcomes the
accuracy problem and it is based on a successive approach
by using any symmetrical discrete signal as the input. In
this paper we use iterative method for the generation of 1D
discrete Fourier invariant signals and interpolation
techniques are then used to construct a two dimensional
(2D) signal. Unlike the 2D Gaussian signal, the 2D signal
obtained from this method is not only Fourier invariant but
also have almost the same size in spatial domain and
frequency domain.

INTRODUCTION





where and are the spectral and signal samples in


frequency and time/spatial domain respectively. The
convenience of using CDFT is that it makes time/spatial
domain and frequency samples directly comparable, since
the time/spatial domain samples at {0,1,2,..N} are

mapped around the zero index {


,
, } and

the corresponding frequency samples at {0, ,, }

are
centered
around
zero
frequency

{
,
,, }.

The time/spatial and frequency points are normalized


and are given by






A. Mathematical Background
The Fourier transform encompasses a vast area of each
and every field of engineering. Fourier transform takes a
function from time/spatial domain and maps it onto
frequency domain [2]. For a continuous time domain
signal, its Fourier transform is given by


 


for =1,2,..,N and =1,2..,N


If the N samples of the discrete signals are given by the
vector x and N spectral coefficients by vector X, then the
matrix form of the CDFT operation can be represented as



And in a similar way the signal can be mapped back to


time/spatial domain from the frequency domain using
inverse Fourier transform
978-1-4799-2102-7/14 $31.00 2014 IEEE
DOI 10.1109/ICESC.2014.88


n=0, 1, 2, . N, is the frequency sample.
The CDFT is defined as

KeywordsDiscrete Fourier invariant signal, 2D kernel


matrix, image smoothing, spatial-frequency spectral analysis

I.

X=Fx and x=F*X

468

where F is a CDFT transform matrix given by


for n=1,,N and k=1,,N.

is given as the input signal we obtain a Fourier invariant


signal as shown in Fig. 2 with values shown in table III.
Table II shows the bandwidth and time-width comparison
between the discrete Fourier invariant signal and the
discrete Gaussian signal.



TABLE I.

B. Fourier Invariant Signals


In iterative design method, discrete Fourier invariant
signals can be generated by minimizing the difference
between the signal and its CDFT spectrum based on
gradient descent method in successive iterations. After
certain number of iterations the difference converges to
zero and we obtain Fourier invariant discrete signal. Any
symmetrical discrete signal of length N can be used as an
initial signal at the start.

  



In the -th iteration step the CDFT spectrum of the


signal and the difference vector between the
signal and its spectrum are calculated by
 

 

Matrix is a real valued Fourier transform matrix of size
KXK and given as



Time
domain
values

for n = 1,2..,K and k = 0,1,2..,N-1



SIMULATION VALUES FOR ITERATIVE METHOD


WITH INPUT AS RAMP SIGNAL

Corresponding
frequency
domain values

Error
Corresponding
difference
time and frequency
between time
values after 71
and frequency
iterations
domain values

0.0898

0.9102

0.4067

-0.0745

2.8912

-0.0745

0.1088

4.0601

0.0989

-0.0601

4.8649

-0.0708

0.1351

6.0435

0.1351

-0.0435

6.8249

-0.0435

0.1751

8.0189

0.1751

-0.0189

8.7575

0.0256

0.2425

9.9726

0.2330

10

0.0274

10.6268

0.1393

11

0.3732

2.0745

0.3732

12

0.1402

11.8598

0.4580

13

0.6931

12.3069

0.9595

14

0.5352

13.4648

1.5672

15

1.9669

13.0331

2.5983

16

3.8288

12.1712

3.8287

17

42.0167

-25.0167

5.1250

for = 1,2..,K




the maximum difference is given by



The gradient g of the square maximum difference


for is given by

 



 
Now a new signal with a smaller maximum difference
is given by

where  is the gain constant of the iteration loop. For fast
convergence  should be as large as possible but stability
condition of the iteration limits its value. The iteration
method puts no constraint over the initial input signal
except that the signal should be symmetric.
Flexibility of iterative method lies at its choice for
initial input signal. When ramp signal is the input signal
we obtain a Fourier invariant signal as shown in Fig. 1 and
values depicted in Table I. Similarly when Gaussian signal

Figure 1. Iterative design of Fourier invariant signal for N=34,


achieved after 71 iterations when input is a ramp signal.
TABLE II.
Signal
Discrete Fourier
Invariant Signal
Discrete Gaussian
Signal

469

TIME-WIDTH AND BANDWIDTH COMPARISON


Time-width
(T)

Bandwidth
(B)

Absolute
Difference (T-B)

0.0584

0.0654

0.0070

0.1369

0.0175

0.1193

TABLE III.

SIMULATION VALUES FOR ITERATIVE METHOD WITH


GAUSSIAN SIGNAL AS THE INPUT

The interpolation algorithm used to generate the 2D


matrix is presented here. For any 1D discrete Fourier
invariant signal, x(n) of length N, the N N kernel matrix
generated is denoted by X. Here N is assumed to be odd.
Even if the generated 1D Fourier invariant signal is of
even length, we can make it an odd length signal by
removing one of the two equal samples values at the centre
of the time axis. Let denotes the coordinate of an
arbitrary element of matrix X where i indicates the row
and j indicates the column, so that denotes an
arbitrary element or value of X. Let (mid, mid) denotes the

center coordinate of matrix X where mid= . The

distance between an arbitrary point and the centre


coordinate is defined as

Error
Corresponding time
difference
and frequency
between time
domain values after
and frequency
71 iterations
domain values

Time
domain
values

Corresponding
frequency
domain values

0.0439

0.0061

-0.0378

0.0287

0.0634

-0.0062

-0.0696

-0.0062

0.0895

0.0063

-0.0832

-0.0069

0.1234

-0.0064

-0.1299

0.0066

0.1664

0.0066

-0.1597

-0.0069

0.2191

-0.0069

-0.2261

0.0073

0.2821

0.0073

-0.2748

-0.0040

0.3549

-0.0078

-0.3627

0.0083

0.4363

0.0084

-0.4280

-0.0025

0.5243

-0.0091

-0.5334

0.0101

0.6157

0.0101

-0.6056

0.0252

0.7066

-0.0113

-0.7179

0.0981

0.7926

0.0128

-0.7798

0.2088

0.8688

-0.0140

-0.8828

0.2088

0.9308

0.0423

-0.8885

0.3661

0.9745

0.5193

-0.4552

0.5193

0.9971

2.3611

1.3640

0.6226

 
Step 1: The values for the elements of centre column and
centre row of X are assigned as follows.
 
 
Step 2: Two weights and to be used for assigning
values to an arbitrary coordinate are determined
using  as follows.
 
Step 3: Interpolated value is assigned to the arbitrary point
by using the weights and

The above steps can be repeated until all the elements of
the kernel matrix are interpolated.
2D-DFT can be used to analyze the property of the
generated 2D matrix. 2D-DFT for an  
matrix/image is mathematically defined by [3] as
follows.




Similarly the Inverse 2D DFT is defined as


 
 

The Fourier invariant kernel matrix/image is compared


with the Gaussian kernel, which is the standard filter used
in image processing. A Gaussian kernel and the
corresponding 2D-DFT spectrum are shown in Fig. 3,
illustrating the unequal spread in spatial and frequency
domains. Fig. 4 and Fig. 5 shows the 2D matrices in spatial
domain generated using ramp and Gaussian signals
respectively. From the corresponding 2D-DFT matrices it
is clear that the 2D kernel matrix generated is also Fourier
invariant and has comparable spread in both spatial and
frequency domains. This property makes our proposed 2D
kernel matrix, a novel image processing filter used for
smoothing as well as for spatial-frequency spectral
analysis of images.

Figure 2. Iterative design of Fourier invariant signal for N=34,


achieved after 85 iterations when input is a Gaussian signal.

II.

A NOVEL 2D KERNEL MATRIX FROM THE 1D


FOURIER INVARIANT SIGNAL

The kernel matrix which can be used as a novel image


processing filter is constructed by using the 1D Fourier
invariant signal. The generated 2D matrix almost looks
alike in both spatial and frequency domains.

470

Figure 3. 2D Gaussian matrix and its corresponding 2D-DFT matrix

Figure 4. 2D matrix constructed from 1D Fourier invariant signal by iterative method with ramp as the initial signal

Figure 5. Fourier Invariant (FI) 2D matrix from 1D Fourier invariant signal by iterative method with Gaussian as the initial signal

471

III.

TABLE V.

APPLICATIONS

A. 2D Fourier Invariant Kernel Matrix Used as a


Smoothing Filter
In image processing, while choosing a smoothing filter,
there are two criteria to be fulfilled as described in [4]. The
filter should be smooth and roughly band limited in the
frequency domain to reduce the possible number of
frequencies at which function changes can take place. Also
the filter should be spatially localized. These two criteria are
conflicting, and the Gaussian signal is a sub - optimum filter,
since its distribution optimizes the two criteria.
The 2D Fourier invariant kernel matrix generated by
iterative method can be used as image smoothing filter for
noise removal in images, since it satisfies the two above
mentioned criteria to a certain extent.
We have performed a comparison on the basis of
performance evaluation of the 2D Fourier invariant matrix
and the Gaussian kernel with standard deviation () 2.0, 2.5,
3.0, 3.5 and 4.0 on filtering a test image corrupted with
Gaussian noise of mean 0 and variance 0.01 as shown in Fig.
6. To make the comparison genuine, the variance of the
Gaussian kernel is selected in an appropriate range which is
comparable to the variance of the 1D Fourier invariant
signal. Root Mean Square Error (RMSE), Image Quality
Index (IQI) and Peak Signal to Noise Ratio (PSNR) of the
filtered images are calculated and tabulated in table IV, V,
and VI and the filtered images are shown in Fig. 7.

Original image

Kernel
Size

FI 2D
Matrix

5x5

0.5779

IMAGE QUALITY INDEX(IQI)

(=2.0)
0.5703

Gaussian Matrix
(=2.5)
(=3.0)
(=3.5)
0.5604
0.5542
0.5502

(=4.0)
0.5475
0.5056

7x7

0.5855

0.5550

0.5348

0.5211

0.5119

9X9

0.6000

0.5486

0.5138

0.4884

0.4709

0.4587

11X11

0.5917

0.5364

0.4935

0.4594

0.4345

0.4166

13X13

0.5948

0.5383

0.4869

0.4419

0.4075

0.3823

15X15

0.5849

0.5356

0.4826

0.4333

0.3933

0.3630

17X17

0.5797

0.5368

0.4845

0.4323

0.3872

0.3514

a)

b)

c)

d)

Image with Gaussian noise

Figure 6. Test image and the image after adding Gaussian noise

TABLE IV.

ROOT MEAN SQUARE ERROR (RMSE)

(=2.0)

(=2.5)

(=3.0)

(=3.5)

(=4.0)

5x5

Fourier
Invariant
2D
Kernel
Matrix
12.4551

14.6221

15.0164

15.2414

15.3803

15.4717

7x7

12.5063

15.9307

16.7581

17.2503

17.5600

17.7657

9X9

12.6149

16.4176

17.7144

18.5480

19.0931

19.4626

11X11

13.2154

16.7788

18.4144

19.5697

20.3672

20.9247

13X13

13.7201

16.8136

18.6440

20.0614

21.1069

21.8690

15X15

14.3134

16.8223

18.7366

20.3279

21.5812

22.5389

17X17

14.6584

16.8199

18.7619

20.4457

21.8466

22.9698

Kernel
size

Gaussian Matrix

e)
f)
Figure 7. Filtered image using a) 5X5 Fourier invariant kernel b) 5X5
Gaussian kernel with standard deviation 2.0 c) 5X5 Gaussian kernel
with standard deviation 2.5 d) 5X5 Gaussian kernel with standard
deviation 3.0 e) 5X5 Gaussian kernel with standard deviation 3.5
f) 5X5 Gaussian kernel with standard deviation 4.0

From Table IV, V and VI it is clear that the 2D Fourier


invariant kernel behaves as a smoothing filter which
removes noise in images by blurring.

472

TABLE VI.
Kernel
Size

FI 2D
Matrix

(=2.0)
24.8646

TABLE VII.

PEAK SIGNAL TO NOISE RATIO (PSNR)


Gaussian Matrix
(=2.5)
(=3.0)
(=3.5)
24.6335
24.5043
24.4255

SPATIAL- FREQUENCY ANALYSIS USING 2D


FOURIER INVARIANT MATRIX

(=4.0)
24.3740

3.0303

2.7576

2.7273

2.6364

2.4545

2.6364

1.8485

1.8485

1.6970

1.6667

1.7273

1.8485

1.0606

1.0606

2.6364

2.1515

2.6061

1.8485

1.2727

2.3939

2.1515

5x5

26.2578

7x7

26.2223

24.1201

23.6803

23.4289

23.2743

23.1731

9X9

26.1471

23.8586

23.1983

22.7989

22.5473

22.3808

11X11

25.7432

23.6696

22.8616

22.3331

21.9862

21.7516

2.4545

3.0909

2.8788

1.1515

2.3333

1.5455

1.7576

13X13

25.4176

23.6516

22.7540

22.1176

21.6763

21.3682

2.6061

4.3030

3.1212

3.1818

2.8182

2.8182

3.0303

15X15

25.0500

23.6471

22.7110

22.0029

21.4833

21.1061

3.0303

2.4242

3.7273

1.9091

1.1818

1.1818

1.4242

17X17

24.8430

23.6483

22.6992

21.9528

21.3771

20.9416

4.4242

1.2424

0.6970

3.0000

3.0303

2.9394

2.6667

Each value of the matrix/image shown in Table VII


indicates the frequency domain central sample values of the
result obtained by the above multiplication, sliding and 2D
DFT operations. Instead of taking only the centre values, we
can also select any other sample values of the 2D DFT in
this type of image spectral analysis.

B. 2D Fourier Invariant Matrix Used as an Optimal


Spatial- Frequency Window
To perform time/frequency spectral analysis for 1D
signal Short Time Fourier Transform (STFT) is used. In a
similar way to perform spectral analysis of images, this 2D
Fourier invariant kernel matrix can be used. Since 2D
Fourier invariant matrix has optimum localization in spatial
and frequency domain, it can be used as a 2D window for
spatial-frequency spectral analysis.
For 1D signal spectral analysis, a window is multiplied
with the signal in time domain and then the products STFT
is calculated. Similarly for 2D case we have first multiplied
our 33X33 Fourier invariant 2D matrix X with the test image
A, then determined 2D DFT of the product and noted the
centre value of the resulting 33X33 matrix. We again
perform the same process by sliding the 2D window over test
image with a shift of 33 as illustrated in Fig. 8.

IV. CONCLUSION
The 2D Fourier invariant kernel matrix constructed using
the discrete Fourier invariant signal generated by the
iterative method can be used as a novel image smoothing
filter which provides optimum spatial localization and high
frequency noise suppression. It can also be used as an
optimal 2D window for spatial-frequency spectral analysis of
images.
REFERENCES
[1]

[2]
[3]
[4]
2D Fourier invariant
kernel matrix X

Test image A
Figure 8. Illustration of 2D windowing on a test image A by using the
Fourier invariant kernel matrix X

473

Maja Temerinac-Ott, and Miodrag Temerinac, Discrete Fourier


invariant signals: design and application, IEEE transactions on
Signal processing, vol. 60, no. 3, pp. 1108-1120, March 2012.
A. V. Oppenheim, A. S. Willsky, and S. H. Nawab, Signals and
Systems. Englewood Cliffs, NJ: Prentice-Hall, 1997.
Rafel C. Gonzalez, Richard E. Woods, Digital Image Processing.
Third edition, Prentice-Hall, 2008.
D. Marr; E. Hildreth, Theory of edge detection Proceedings of the
Royal Society of London. Series B, Biological Sciences, Vol. 207,
No. 1167, Feb. 29, 1980), pp. 187-217.

You might also like