fht2d
[ XITE Reference Manual | XITE home ]
Contents
Name
fht2d - 2 dimensional fast Hartley transform
fht2d [-i] [-b] <inimage> <outimage>
fht2d performs 2 dimensional forward or inverse fast
Hartley transform. All pixel types are accepted as input
and converted to real.
The forward and inverse discrete Hartley transforms
are given respectively as:
M N
H(u,v) = Sum Sum f(x,y) [cas(2*Pi(u*x/M + v*y/N))]
x=0 y=0
M N
f(x,y) = Sum Sum H(u,v) [cas(2*Pi(u*x/M + v*y/N))]
x=0 y=0
where
cas(x) = cos(x) + sin(x)
The relationships between the Fourier and Hartley transforms
are described in the documentation of ht2ft(1) and
ft2ht(1).
Convolution of two images can be accomplished with the
Hartley transform:
f1(x,y) * f2(x,y) -> F1(u,v) F2(u,v)
= H1(u,v) H2_e(u,v) + H1(-u,-v) H2_o(u,v)
where H2_e and H2_o are the even and odd parts of H2
respectively, i.e.
H2_e(u,v) = (H2(u,v) + H2(-u, -v))/2
H2_o(u,v) = (H2(u,v) - H2(-u, -v))/2
If f2(x,y) has vertical and horizontal even symmetry,
then H2_o(u,v) = 0 and the convolution can be performed
with Hartley transforms as follows:
f1(x,y) * f2(x,y) -> H1(u,v) H2(u,v)
If f2(x,y) has vertical and horizontal odd symmetry, then
H2_e(u,v) = 0 and the convolution can be done as
f1(x,y) * f2(x,y) -> H1(-u,-v) H2(u,v)
-
-i
- Return the inverse transform. Default: Forward transform.
-
-b
- Use pixeltype unsigned byte for the output image.
Default: Pixeltype real.
-
[1] Mark A. ONeill
- "Faster than Fast Fourier",
BYTE April 1988 293-300
-
[2] R. N. Bracewell
- "The Hartley Transform",
Oxford Univ. Press 1986,
ISBN 0-19-503969-6
fht2d(3), fft2d(1), haar2d(1), fht1d(3), fhtInitTables(3),
fhtPower(1), fhtPhase(1), ht2ft(1), ft2ht(1)
Bands should be quadratic and have size some power of two.
0 => ok
1 => bad number of arguments
2 => can't read input
3 => can't write output
Tor Lønnestad, BLAB, Ifi, UiO
fht2d mona.img monaHt.img
$Id: fht2d.c,v 1.31 1997/05/27 14:48:35 svein Exp $