Walsh, Hadamad, Haar, Slant Transform
Walsh, Hadamad, Haar, Slant Transform
x=0 i=0
h(z, y) =j-yj%o0)
N =0
h(x, v) is called the kernel of the Walsh transform. Here b{x) represents the ith bit of the
binary representation of x. For example, if n=4and z=8 (the binary representation of x=
1000), then b{x) can be denoted as
box) = 0, b,(r) =0, byl(r) =0, b,() = 1
The inverse Walsh transform is given as
N-1 n-1
x=0 /=0
h(a, u) =|]-y4A.a)i=0
Ine TD Walsh transform can also be extended to two dimensions. The Walsh
transformation is given as
.y) T(-owb*ho .)
N-I N-1
N i=0
n-1
and
8,(y, v) = h, (y,) =I-iya0Mo)
VN i=0
For example, the Walsh transform for the 2 x 2 kernel is given as
+
Wax=
and
+
0(+ + +
I|+
W= 2 + +
3+
For x 2 and u =2, the
value of the kernel is given as
x=0010, b, =0, b,=1,b,=0, b4 =0
u=001 0, b, =0, b, = 1, b,=0, b,
=0
N
3. Find the number of overlapping of ls. If it is Oor cven, the sign is positive. Elsc, it is
negative.
For example, for the aforementioned exanmple
u= 0100 (in reverse)
x= 00 10
8(r, u)=-)
N
where N = 2"
The inverse Hadamard transform f(x) is given as
N-1
f(x) =H(u) (-1)=
r=0
where N = 2" and the term (-1) is the inverse kernel, given by h(r, u). Like the
Walsh transform, the 2D Hadamard transform is defined as
N-I N-]
Hu, v) =N L0 ye0
jr, y(-)"
The inverse Hadamard transform is given as
N- -|
i=0
162 DIGITAL IMAGE PROCESSING
The inverse
Hadamard transform is given as
f= A'gA'
The inverse
Hadamard transform exactly produces the
original matrix.
DIGITAL IMAGE TRANSFORMS 103
transformed image.
takohsened that the ornginal image is retrieved from the
UAR TRANSFORM
-1, or 0. The kernel of the Haar
consists of elements+1,
c tasts of the Haar transtorm
Tsform isgenerated using the following procedue:
1. Fndthe order N. Let n = log N.
* Detemine pand q.
(2)p ranges from 0to n - 1.
(b)Ifp =0. then q =0 or q= I.
Else, I sqs
3. The value k is determined as
and Z 0Z, 1/2, 2/2, ... (N - IZ
k= +q- I
4 Ifk=0. then
DIGITAL IMAGE PROCESSING
164
2P 2P
=0 for Z e[0, 1]
For example, let us consider the base for N= 2.
IfN = 2, n= log N=log 2 = 1
So the value ofp =0. Therefore, g takes the value 0 or 1.
Therefore, k=2 +q-1.When p=0 and g =0, the value of k=0. When p=0a
= 1, the value of k= 1.
So when k= 0, 20
ho (0) =
and when k = 1, 20
h(0) =
Therefore the 2 x 2 Haar matrix is given as
A,=
Similarly any higher-order matrix can be
computed. The matrix for N= 4 is given
1
1 -1
A,= -1
V4-V2 -V2
4.8 SLANTTRANSFORM
0
-V2 -V2)
The slant
hence verytransform is uscd
widely is orthogona/s
fast. Its kernel can be image
generated compression. Slant transform is
recursively like Hadamard ttr:ansform.
DIGITAL IMAGE TRANSFORMS 165
transform of the order 2 x 2is
The slant defined as
b, =
1 2
and
a, =2xxl=
Substituting this in the aforementioned recursive equation, one gets
0
A
A, =
b b
-1
|X
0 A 4)
b,- -
1 1
2 2
1 -1 0 0
X
X
-1
0 0 1
0 0 1 -1)
2 2
is given as follows:
Therefore, the final slant transform of the order 4 x 4
DIGITAL IMAGE PROCESSING -S- -
166
-
3
A,
1 -I -1
1 3 1
AÀ
The etor A À0
s
vector The calar
termed as egen vector of the ds
value À s
known as latent valuc called the egen valuematr1x A. It is also known
it s also