# Download Convolutions of hypercomplex Fourier transforms with applications in image processing PDF

Title Convolutions of hypercomplex Fourier transforms with applications in image processing English 2.8 MB 86
##### Document Text Contents
Page 1

University of Ghent
Faculty of Sciences

Department of Mathematical Analysis
Clifford Algebra Research Group

Convolutions of hypercomplex Fourier transforms
with applications in image processing

Thesis to obtain the academic degree Master of Science
in Mathematics: Mathematical Physics and Astronomy

By:

K. Rubrecht

Guided by:

prof. dr. ir. H. De Bie
prof. dr. ir. A. Pižurica

2013-2014

Page 2

Preface

When my promoter and I first talked about the subject of this thesis, I was immediately
convinced and quietly enthusiastic. The discipline of Clifford algebras is one of those areas in
mathematics that has a rich variety in abstraction and also has a lot of applications. Image
processing on the other hand is of fundamental importance to our modern day society. Both
these disciplines are still actively evolving. The cross section of these two subjects and the
fact that in these domains there is still progress to be made, appealed very much to me as
a mathematician and as an engineer. The creation of this work was not an entirely new
experience, as I wrote a thesis to obtain a degree in engineering the year before. It was no
continuation either, because the subject was entirely different. The fact that there was a lower
threshold to the subject than in my previous thesis, meant that I could start with the real
research work early on in the process. As a result this thesis gravitated more towards actual
calculations and research than towards a study of the literature. I hope that the combined
result of my previous experience and the more research-oriented approach makes this work
in a sense more mature. For a mathematician the subject of this thesis is quite applied. In
my opinion the possibility of applying a formula only adds to the beauty of the formulas in
question.

Although I had learned from my previous studies, there where still quite a lot of things to
learn and to discover. During the last year I did not only learn a lot on a scientific level,
but I also learned a lot on a personal level. This would not have been possible without the
guidance of some special people I have to acknowledge. I want to thank my promoter prof.
dr. ir. H. De Bie. He introduced me to the subject, carefully corrected the manuscripts and
presentations, answered questions and guided me along the way. I sincerely hope that the
results in this thesis will be of use in his further research on this subject. I would also want
to express my sincere gratitude to my co-promoter prof. dr. ir. A. Pižurica, as a specialist in
image processing, she helped me establish the second part of this thesis. In this second part
the mathematical results of the first part are applied in image processing. Finally I want to
thank my family and friends for their enduring and everlasting support.

Disclaimer: The author gives the permission to make this thesis available for consultation
and to copy parts of this thesis for personal use. Any other use is subject to the restrictions
of copyright law, one has in particular the obligation to explicitly mention the source when
citing the results in this thesis.

Date:
Signature:

1

Page 43

FF1(f ∗ g(x))(u)

=
(2π)

−m
2

22m

∫ ∫
R2m

φ̃1,φ̃2∈{0,1}m

j∈{0,1}2m

j̃,φ

m∏
k=1

e−(−1)
φ̃1
k ikzkuk

γ′∈{0,1}m

f

′−φ̃2(F1)
(z)

×
m∏
k=1

e−(−1)
γ′
k ikykukg(y)dzdy

=
(2π)

−m
2

22m

∫ ∫
R2m

φ̃1∈{0,1}m

φ̃2∈{0,1}m

j∈{0,1}2m

j̃,φ

m∏
k=1

e−(−1)
φ̃1
k ikzkuk

γ′∈{0,1}m

f

′−φ̃2(F1)
(z)

×
m∏
k=1

e−(−1)
γ′
k ikykukg(y)dzdy

=
(2π)

−m
2

22m

∫ ∫
R2m

φ̃1∈{0,1}m

γ′∈{0,1}m

φ̃2∈{0,1}m

j∈{0,1}2m

j̃,φ

m∏
k=1

e−(−1)
φ̃1
k ikzkukf

′−φ̃2(F1)

(z)

×
m∏
k=1

e−(−1)
γ′
k ikykukg(y)dzdy

(3.11)

For clarity let us focus on the relevant parts of the equation:

φ̃2∈{0,1}m

j∈{0,1}2m

j̃,φ
f

′−φ̃2 (F1)
(z)

=

φ̃2∈{0,1}m
[

j∈{0,1}2m
(−1)

∑m
l=2

∑l−1
n=1 j̃lj̃m+n+

∑2m
k=1 j̃kφ̃k ]f

′−φ̃2 (F1)

(z)

=

j̃∈{0,1}2m
(−1)

∑m
l=2

∑l−1
n=1 j̃lj̃m+n+

∑m
k=1 j̃

1
k
φ̃1
k

φ̃2∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
φ̃2
kf

′−φ̃2 (F1)
(z)

(3.12)

Let us now simplify the sum over φ̃2 for fixed γ′ and j:

φ̃2∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
φ̃2
kf

′−φ̃2 (F1)
(z)

=

γ∈{0,1}m
(−1)

∑m
k=1 j̃

2
k
(γ′
k
−γk)fcγ(F1)(z)

= (−1)
∑m
k=1 j̃

2
k
γ′
k

γ∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
γkfcγ(F1)(z)

In the second line we reintroduced γ. In section 2.2.4 we noticed that we have for the case
m = 2 the following equalities:

42

Page 44

((f(z))c0(ν))c0(µ) + ((f(z))c0(ν))c1(µ) = f(z)c0(ν)

((f(z))c0(ν))c0(µ) − ((f(z))c0(ν))c1(µ) = −µf(z)c0(ν)µ summarized as
1∑

γ2=0

(−1)l((f(z))c0(ν))cγ2 (µ) = (−1)
lµlf(z)c0(ν)µ

l for l = 0, 1

We will make a similar simplification in our case (using the decomposition γ = (γ∗, γm) with
γ∗ ∈ {0, 1}m−1 ):

γ∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
γkfcγ(F1)(z)

=
1∑

γm=0

γ∗∈{0,1}m−1

(−1)
∑m−1
k=1

j̃2
k
γk+j̃

2
mγm [fcγ(F1\im)(z)]cγm (im)

=

1∑
γm=0

(−1)j̃
2
mγm [

γ∗∈{0,1}m−1

(−1)
∑m−1
k=1

j̃2
k
γkfcγ(F1\im)(z)]cγm (im)

= (−1)j̃
2
m(im)

j̃2m [

γ∗∈{0,1}m−1
(−1)

∑m−1
k=1

j̃2
k
γkfcγ(F1\im)(z)](im)

j̃2m

We have seen that in this way we can work away the sum over γm, we can now generalize
this procedure by applying induction.

γ∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
γkfcγ(F1)(z)

=
m∏
k=1

[(−1)
j
j̃2
k (ik)

j̃2
k ]f(z)

1∏
k=m

[(ik)
j̃2
k ]

The relevant parts of the equation given in (3.12) eventually become:

γ′∈{0,1}m

j̃∈{0,1}2m

(−1)
∑m
l=2

∑l−1
n=1 j̃lj̃m+n+

∑m
k=1 j̃

1
k
φ̃1
k

φ̃2∈{0,1}m

(−1)
∑m
k=1 j̃

2
k
φ̃2
kf

′−φ̃2 (F1)
(z)

=

γ′∈{0,1}m

j̃∈{0,1}2m

(−1)
∑m
l=2

∑l−1
n=1 j̃lj̃m+n+

∑m
k=1 j̃

1
k
φ̃1
k
+
∑m
k=1 j̃

2
k
γ′
k

×
m∏
k=1

[(−1)j̃
2
k(ik)

j̃2
k ]f(z)

1∏
k=m

[(ik)
j̃2
k ]

=

γ′∈{0,1}m

j̃∈{0,1}2m

j̃,(φ̃1,γ′)

m∏
k=1

[(−1)j̃
2
k(ik)

j̃2
k ]f(z)

1∏
k=m

[(ik)
j̃2
k ].

Putting everything back together into equation (3.11) we obtain:

43

Page 85

image ( qimage ) ;
t i t l e ( ’ Or i g inee l ’ )
d i sp ( ’ Proce s s ing image with co l our edge de t e c t o r . . . ’ ) ;

66 % Now convolve the image with the mask . This uses the quatern ion
% over l oad ing o f the standard conv2 func t i on .

t S t a r t=t i c ;
fqimage = conv2 ({ l e f t , r i g h t } , qimage ) ; % Notice the argument form
{} to

71 tElapsed=toc ( t S t a r t ) ; % i n d i c a t e a l e f t / r i g h t
convo lut ion

% ( s p e c i a l to the quatern ion
ve r s i on

% of conv2 ) .

r e s u l t = v ( fqimage ) ; % Ignore the s c a l a r part o f the r e s u l t .
76 r e s u l t= InRange ( r e s u l t ) ;

f i g u r e ;
t i t l e ( ’ Result Spat ia l ’ ) ;
image ( r e s u l t ) ; % Display the f i l t e r e d r e s u l t in an image window .

81 a x i s o f f
a x i s image

d i sp ( ’ Writing edge de t e c t o r r e s u l t to f i l e . . . ’ ) ;
imwrite ( r e s u l t , [ pwd , savename , ’SPAT. t i f f ’ ] ) ;

86 d i sp ( ’ F in i shed . ’ ) ;

end

func t i on [ r e s u l t , tElapsed ] = ColorEdgeSpec ( absh2 , h2 , ur l , savename
)

91 %COLOREDGESPEC implements the C o l o r E d g e f i l t e r by working in the
s p e c t r a l domain on a p i c t u r e s to r ed in ’ ur l ’

% re tu rn s and d i s p l a y s the r e s u l t ( everyth ing i s computed us ing
l e f t s i d e

% QFT)
i f narg in < 4

savename = ’ Result ’ ;
96 end

mu = uni t ( quatern ion (1 , 1 , 1 ) ) ;
d i sp ( [ ’ Reading the image from ’ , u r l ] ) ;

qimage = cas t ( imreadq ( u r l ) , ’ double ’ ) . / 255 ;
101 %imwrite ( qimage (2 0 : 12 0 , 2 00 : 300 ) , [ ’ LenaDetai l ’ , ’ . t i f f ’ ] ) ;

[m, n ] = s i z e ( qimage ) ;

84

Page 86

image ( qimage ) ;
t i t l e ( ’ Or i g inee l ’ )

106 d i sp ( ’ Proce s s ing image with s p e c t r a l co l our edge de t e c t o r . . . ’ ) ;

%Precomputation o f the s p l i t
fqpara = v ( Cpart ( qimage ,mu, 0 ) ) ; % P a r a l l e l part with mu = commuting

part f o r pure quatern ion
fqo r th = qimage � fqpara ; % Orthogonal part with mu = anticommuting

part
111

%Precomputation ot the Four i e r t rans fo rms

q f t absh2 =q f f t 2 ( pad ( absh2 , [m, n ] ) ,mu, ’ L ’ ) ;
q f t h2 = q f f t 2 ( pad ( h2 , [m, n ] ) ,� mu, ’ L ’ ) ; %minus s i gn f o r i n v e r s e

116
t S t a r t = t i c ;% Star t t iming

q f t f q p a r a = q f f t 2 ( fqpara ,mu, ’ L ’ ) ;
q f t f q o r t h = q f f t 2 ( fqorth ,mu, ’ L ’ ) ;

121
% Spec t r a l domain by convo lut ion formula

f q s p e c t r a l = ( q f t f q p a r a . � q f t absh2+ q f t f q o r t h . � q f t h2 ) ;

126 %Inve r s e trans form y i e l d s the end r e s u l t
fqimage = i q f f t 2 ( f q s p e c t r a l ,mu, ’ L ’ ) ;
tElapsed = toc ( t S t a r t ) ;

r e s u l t = v ( fqimage ) ; % Ignore the s c a l a r part o f the r e s u l t .
131 r e s u l t= InRange ( r e s u l t ) ; % Checks i f the r e s u l t

f i g u r e ;

image ( r e s u l t ) % Display the f i l t e r e d r e s u l t in an image window .
t i t l e ( ’ Spe c t r a l Result ’ ) ;

136 a x i s o f f
a x i s image

d i sp ( ’ Writing edge de t e c t o r r e s u l t to f i l e . . . ’ ) ;
imwrite ( r e s u l t , [ pwd , savename , ’SPEC. t i f f ’ ] ) ;

141 imwrite ( r e s u l t ( 20 : 120 , 20 0 : 3 00 ) , [ pwd , savename , ’ Deta i l ’ , ’SPEC. t i f f
’ ] ) ;

d i sp ( ’ F in i shed . ’ ) ;

end

85