Image Processing Reference
In-Depth Information
are the same operation; a disadvantage is that phase is built into the order of frequency
components since it is not readily available as the argument of a complex number. The
definition of the Discrete Hartley Transform (DHT) is that transform components HP u , v
are:
N
-1
N
-1
2
2
= 1
HP
P
cos
(
ux
+
v
y
)
+
sin
( +
ux
v
y
)
(2.37)
v
u
,
xy
,
N
N
N
x
=0
y
=0
The inverse Hartley transform is the same process, but applied to the transformed image.
NN
-1
-1
2
2
= 1
Σ v
v
v
P
HP
cos
(
ux
+
y
)
+
sin
( +
ux
y
)
(2.38)
xy
,
u
,
v
N
N
N
u
=0
=0
The implementation is then the same for both the forward and the inverse transforms, as
given in Code 2.4 .
Hartley(pic):= NC cols(pic)
NR rows(pic)
for v 0.. NR-1
for u 0.. NC-1
$
'
cos 2(ux+vy)
NR
+sin 2(ux+vy)
NC
$
&
'
)
&
&
)
)
NR-1
NC-1
1
NC
trans
pic
v,u
y,x
y=0
x=0
$
&
'
)
%
(
trans
Code 2.4
Implementing the Hartley transform
Again, a fast implementation is available, the fast Hartley transform (Bracewell, 1984)
(though some suggest that it should be called the Bracewell transform, eponymously). It is
actually possible to calculate the DFT of a function, F ( u ), from its Hartley transform, H ( u ).
The analysis here is based on one-dimensional data, but only for simplicity since the
argument extends readily to two dimensions. By splitting the Hartley transform into its odd
and even parts, O ( u ) and E ( u ), respectively we obtain:
H ( u ) = O ( u ) + E ( u )
(2.39)
where:
Hu
() +
HN
( -
u
)
Eu
() =
(2.40)
2
and
Hu
( ) -
HN
(
- )
u
Ou
() =
(2.41)
2
The DFT can then be calculated from the DHT simply by
F ( u ) = E ( u ) - j ×
O ( u )
(2.42)
Search WWH ::




Custom Search