一.离散沃尔变换
当N=2n 时,可以得到函数 f(x) 的离散沃尔什( Walsh )变换( W ( u )):

bk(z)是z的二进制表达式列中的第k位。例如n=3,则对z=6,其二进制数为110,有b0(z)=0,b1(z)=1,b2(z)=1。
由沃尔什变换核组成的矩阵是一个对称矩阵,且其行和列正交。这些性质表明反变换与正变换核只差1个常数1/N,即:

所以离散沃尔什反变换为:

由于一维沃尔什变换正变换和反变换只差一个常数项1/N,所以用于正变换的算法也可用于反变换。一维沃尔什正变换和反变换核由以下两式给出:


这两个核完全相同,所以下面两式给出的二维沃尔什正变换和反变换也具有相同形式:


沃尔什正变换核和反变换都是可分离的和对称的,有:

因此,二维的沃尔什正反变换都可分成两个步骤计算,每个步骤用1个一维变换实现。
沃尔什变换可用类似于FFT算法快速地计算,只需要将那里的指数项设为1即可。快速沃尔什变换简写为FWT。两式对应,有:


二.离散哈达玛变换
哈达玛变换与沃尔什变换相似,所以有些参考书上把二者统称为沃尔什-哈达玛变换。
(一)一维离散哈达玛变换
(一)一维离散哈达玛变换
当N=2n 时,一维哈达玛正变换核和反变换核相似。一维哈达玛变换对可表示为:

(u = 0,1,2,…, N-1)

(x = 0,1,2,…, N-1) 哈达玛变换核除了因子1/N之外,由一系列的+1和-1组成。如N=8时的哈达玛变换核用矩阵表示为:

由此矩阵可得出一个非常有用的结论,即2N阶的哈达玛变换矩阵可由N阶的变换矩阵按下述规律形成:

而最低阶(N=2)的哈达玛变换矩阵为:

此性质导出了一种快速哈达玛变换(FHT),利用这个性质求N阶(N=2 n)的哈达玛变换矩阵要比直接用定义式求此矩阵速度快得多。
(二)二维离散哈达玛变换
二维离散哈达玛变换的正变换核和反变换核相同,为:

这里M=2m ,N=2n。则对应的二维哈达玛变换对可表示为:

可以看出,二维离散哈达玛变换的正反变换核具有可分离性,因此可以通过两次一维变换来实现一个二维变换。
|