# 快速小波变换

快速小波变换（fast wavelet transform，FWT）是一种线性时间算法：它把数字信号与一对低通、高通滤波器反复卷积，并将每次卷积的结果做二抽取下采样，从而算出该信号的离散小波变换（DWT）。它也被称为马拉算法或马拉金字塔算法，得名于法国应用数学家[斯特凡·马拉](https://www.edgepedia.org/zh/stephane-mallat)（Stéphane Mallat），后者于1989年建立了该算法背后的多分辨率框架。<sup>[1](https://technav.ieee.org/topic/multiresolution-analysis/)</sup><sup> • </sup><sup>[2](https://www.fceia.unr.edu.ar/~jcgomez/wavelets/wavelet_ug.pdf)</sup>

| 关键事实 | 说明 |
|---|---|
| 核心运算 | 与低通／高通滤波器对反复卷积，每一层之后做二抽取下采样<sup>[1](https://technav.ieee.org/topic/multiresolution-analysis/)</sup> |
| 级数 | 对长度为 N 的信号，DWT 最多有 log₂N 个分解级<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> |
| 输出结构 | 第 j 级分解得到的系数集为 [cA_j, cD_j, ..., cD_1]：一个近似子带，外加每一级一个细节子带<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> |
| 系数个数 | 在二维情形下，J 级表示由 3J + 1 幅图像组成，总像素数恰好等于原图的像素数，因此变换不增加数据量<sup>[4](https://www.di.ens.fr/stephane.mallat/papiers/MallatTheory89.pdf)</sup> |
| 起源 | 使该算法得以成立的多分辨率分析框架，由马拉与伊夫·梅耶尔于1986年秋提出<sup>[5](https://epubs.siam.org/doi/abs/10.1137/1.9781611970104.ch5)</sup> |
| 工业应用 | JPEG 2000 把可逆 5-3 与不可逆 9-7 小波变换（以提升步骤实现）规定为其核心编码变换<sup>[6](https://www.itu.int/epublications/publication/itu-t-t-801-v3-2023-08-information-technology-jpeg-2000-image-coding-system-extensions)</sup> |
| 已知局限 | 由于存在抽取步骤，标准 DWT 是平移可变的：输入的微小时间平移就可能显著改变输出系数<sup>[7](https://eprints.soton.ac.uk/464348/1/783245.pdf)</sup> |

## 算法如何工作

每一次分解都把信号分成两路长度减半的信号。信号先与一个低通分析滤波器卷积，得到近似系数，它们刻画信号的粗轮廓；再与一个高通分析滤波器卷积，得到细节系数，它们刻画信号的细微变化；随后对两路滤波结果都做下采样，即每隔一个样本保留一个。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup><sup> • </sup><sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup> 写成递推形式，令输入信号为 \( \mathbf{c}_{\mathcal{A},0} := \mathbf{x} \)，\( \downarrow_2 \) 表示下采样，则

\[ \mathbf{c}_{k, s+1} = \downarrow_2(\mathbf{c}_{\mathcal{A}, s} * \mathbf{h}_k) \qquad \text{for}\ k \in [\mathcal{A}, \mathcal{D}] \]

其中 \( \mathbf{h}_{\mathcal{A}} \) 与 \( \mathbf{h}_{\mathcal{D}} \) 分别是分析低通与分析高通滤波器，\( s \) 是级次。<sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup> 下一步只对近似系数重复这一操作，而不对细节系数操作，于是得到一列逐级变粗的近似，构成金字塔。因此第 j 级分解给出结构 [cA_j, cD_j, ..., cD_1]。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup>

**滤波器长度与输出尺寸。** 对正交小波而言，滤波器共有四组：分解低通、分解高通、重构低通与重构高通，例如可由 MATLAB 的 `orthfilt` 函数得到。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> 长度为 N 的信号与长度为 2L 的滤波器卷积，得到 N + 2L − 1 个样本，因此下采样后每个系数向量的长度为 \( \lfloor (N-1)/2 + L \rfloor \)。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> 软件库用该小波的分解滤波器长度表述同一条规则：PyWavelets 对除周期化之外的所有延拓模式给出 `len(cA) == len(cD) == floor((len(data) + wavelet.dec_len - 1) / 2)`，对周期化模式则给出 `ceil(len(data) / 2)`。<sup>[9](https://pywavelets.readthedocs.io/en/stable/ref/dwt-discrete-wavelet-transform.html)</sup>

**重构。** 逆变换逐级反向执行上述过程：从 cA_j 与 cD_j 出发，在样本之间插入零（上采样），把结果与重构滤波器卷积，再将两路相加，恢复出 cA_{j−1}。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> 对无限信号上的正交小波，该变换保持 l² 范数，即 \( \|X\|^2 = \|cA\|^2 + \|cD\|^2 \)，且近似分量与细节分量彼此正交。<sup>[10](https://www.mathworks.com/help/wavelet/ug/dealing-with-border-distortion.html)</sup>

## 二维图像

对图像而言，该变换是一维算法的可分离推广。每一步先用一个滤波器卷积当前近似的各行、每隔一列保留一列，再用另一个滤波器卷积各列、每隔一行保留一行，由此产生四个子带：一个近似图像，以及分别沿水平、垂直、对角三个方向的细节图像。<sup>[4](https://www.di.ens.fr/stephane.mallat/papiers/MallatTheory89.pdf)</sup><sup> • </sup><sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup> 四个等效的二维滤波器由一维滤波器对构造：\( \mathbf{h}_{a} = \mathbf{h}_{\mathcal{A}}\mathbf{h}_{\mathcal{A}}^T \)、\( \mathbf{h}_{h} = \mathbf{h}_{\mathcal{A}}\mathbf{h}_{\mathcal{D}}^T \)、\( \mathbf{h}_{v} = \mathbf{h}_{\mathcal{D}}\mathbf{h}_{\mathcal{A}}^T \)、\( \mathbf{h}_{d} = \mathbf{h}_{\mathcal{D}}\mathbf{h}_{\mathcal{D}}^T \)。<sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup>

一幅图像的 J 级表示由 3J + 1 幅离散图像组成。由于第 j 级的每个子带在每个维度上的像素数都是原图相应维度的 1/2^j，而该表示又是正交的，所以系数总数等于原图像的像素数；变换并不增加数据量。这与拉普拉斯金字塔等冗余方案形成对照——后者在二维情形下把系数个数增加到 4/3 倍。<sup>[4](https://www.di.ens.fr/stephane.mallat/papiers/MallatTheory89.pdf)</sup> 在自然图像中，细节系数在边缘处与纹理区域幅值较大，正是这一点使该表示稀疏、可压缩。<sup>[4](https://www.di.ens.fr/stephane.mallat/papiers/MallatTheory89.pdf)</sup>

## 起源

该算法立足于多分辨率分析，这是一个同时在多个分辨率层次上表示信号的数学框架，每一层捕捉不同的频率成分。<sup>[1](https://technav.ieee.org/topic/multiresolution-analysis/)</sup> 在1986年之前，各种光滑正交归一小波基的构造看上去彼此孤立；1986年秋由马拉与卡尔德隆-齐格蒙德学派的法国数学家[伊夫·梅耶尔](https://www.edgepedia.org/zh/yves-meyer)（Yves Meyer）提出的这一框架，给出了构造小波基的一般方法，并使包括[阿尔弗雷德·哈尔](https://www.edgepedia.org/zh/alfred-haar)（Alfréd Haar）1910年基在内的早期构造获得了概念上的根基。<sup>[5](https://epubs.siam.org/doi/abs/10.1137/1.9781611970104.ch5)</sup><sup> • </sup><sup>[11](https://mathshistory.st-andrews.ac.uk//Extras/Meyer_awards/)</sup>

马拉是从图像处理进入这一想法的：在多个尺度上研究图像并比较其结果，当时已是成熟做法。他把正交归一小波基重新表述为一种描述“从粗近似走向细近似所需的信息增量”的方式，并证明：计算离散信号的小波表示，可以归结为如今被称为快速小波变换的迭代滤波加下采样方案。<sup>[5](https://epubs.siam.org/doi/abs/10.1137/1.9781611970104.ch5)</sup><sup> • </sup><sup>[1](https://technav.ieee.org/topic/multiresolution-analysis/)</sup> 在信号处理文献中，该方案就是一种使用正交镜像滤波器的经典双通道子带编码器。<sup>[2](https://www.fceia.unr.edu.ar/~jcgomez/wavelets/wavelet_ug.pdf)</sup> 马拉把这一成果形容为一种快速方法：它能把任何数字信息——例如一幅由数百万像素构成的图像——表示为数量少得多的小波的组合，每个小波捕捉图像中某一特定位置的一处变化。<sup>[12](https://news.cnrs.fr/articles/stephane-mallat-a-pioneer-bridging-mathematics-and-computer-science)</sup>

## 应用与代价

该变换的速度与稀疏性使它成为实用图像压缩的基础。在世纪之交，马拉的算法是诸多应用的核心，其中包括 [JPEG 2000](https://www.edgepedia.org/zh/jpeg-2000) 图像压缩标准——该标准通过在逐级分辨率上、沿三个方向的小波系数来编码图像。<sup>[12](https://news.cnrs.fr/articles/stephane-mallat-a-pioneer-bridging-mathematics-and-computer-science)</sup> 该标准的核心编码系统规定：无损编码使用可逆 5-3 小波，有损编码使用不可逆 9-7 小波，两者都表示为一系列提升步骤并附有公开的系数值；9-7 的提升参数包括缩放常数 K = 1.230 174 104 914 001，以及诸如 −1.586 134 342 059 924 的更新因子。<sup>[6](https://www.itu.int/epublications/publication/itu-t-t-801-v3-2023-08-information-technology-jpeg-2000-image-coding-system-extensions)</sup> 除压缩之外，DWT 还用于信号与图像的去噪和分析，小波去噪至今仍是医学图像处理中常用的基线方法。<sup>[9](https://pywavelets.readthedocs.io/en/stable/ref/dwt-discrete-wavelet-transform.html)</sup><sup> • </sup><sup>[13](https://arxiv.org/abs/2509.26608)</sup>

在计算代价上，该变换对信号长度是线性的。一篇早期的小波理论综述指出，该变换很快，对哈尔构造而言比快速傅里叶变换还快；高阶小波同样算得很快，因为计算是间接的、递推的。<sup>[14](https://arxiv.org/abs/math/9304214)</sup> 连续小波变换也有快速算法：一种滤波器组框架对长度为 N 的信号在每一尺度上达到 O(N) 复杂度；对四种快速 CWT 算法的比较发现，O(N) 方法对不同信号边界都稳健，只是在样本数低于约 10^6 时，其较大的首项常数使它们无法在总体上快过基于 FFT 的计算。<sup>[15](https://www.sciencedirect.com/science/article/pii/S0165168496001892)</sup><sup> • </sup><sup>[16](https://arxiv.org/abs/2302.03909)</sup>

## 边界处理与局限

由于真实信号长度有限，每次卷积都需要一条规则来把信号延伸到边界之外。常见的延拓模式有零填充、对称延拓（复制边界值）、按线性外推的平滑填充，以及周期延拓。<sup>[10](https://www.mathworks.com/help/wavelet/ug/dealing-with-border-distortion.html)</sup> 每种模式都有其特征性伪影：零填充与周期填充会在边界处人为制造不连续，对称延拓则在一阶导数上造成不连续，但对图像总体效果良好。<sup>[10](https://www.mathworks.com/help/wavelet/ug/dealing-with-border-distortion.html)</sup> 对采用周期延拓、且信号长度可被 2^J 整除的正交小波，范数保持、正交性与完美重构这三条理论性质全部成立；若延拓方式任意，则只有完美重构始终成立。<sup>[10](https://www.mathworks.com/help/wavelet/ug/dealing-with-border-distortion.html)</sup>

抽取型变换的主要结构性局限是平移可变性。下采样算子使系数对输入的循环平移十分敏感，因此微小的时间平移就可能显著改变输出。<sup>[7](https://eprints.soton.ac.uk/464348/1/783245.pdf)</sup> 补救办法包括去掉抽取步骤的非抽取（平稳）小波变换，以及平移不变性优于常规 DWT 的[双树复小波变换](https://www.edgepedia.org/zh/dual-tree-complex-wavelet-transform)。<sup>[7](https://eprints.soton.ac.uk/464348/1/783245.pdf)</sup><sup> • </sup><sup>[17](https://arxiv.org/abs/0908.3383)</sup> 一个相关的推广是[小波包变换](https://www.edgepedia.org/zh/wavelet-packet-transform)，它进一步展开分解树的高通一侧，而不是让细节带保持不再分裂。<sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup>

## 实现

该变换可在标准数值库中调用。PyWavelets 是一个开源 Python 库，2006 年始创于一个关于医学信号分析的硕士论文项目，提供单级 `dwt`、多级 `wavedec` 及其逆变换，支持一维、二维与 n 维。<sup>[9](https://pywavelets.readthedocs.io/en/stable/ref/dwt-discrete-wavelet-transform.html)</sup><sup> • </sup><sup>[18](https://github.com/PyWavelets/pywt)</sup> MATLAB 的小波工具箱直接记载了 FWT 算法，并通过 `orthfilt` 与 `wfilters` 提供滤波器构造。<sup>[3](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)</sup> PyTorch-Wavelet-Toolbox 用带填充的卷积实现 FWT，并指出：用机器学习的术语说，分析变换是一个步长为二的卷积，合成变换是一个步长为二的转置卷积。<sup>[8](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)</sup>

## References

1. [Multiresolution analysis, IEEE Technology Navigator](https://technav.ieee.org/topic/multiresolution-analysis/)
2. [The wavelet_ug tutorial: Mallat's 1988 fast decomposition and reconstruction algorithm](https://www.fceia.unr.edu.ar/~jcgomez/wavelets/wavelet_ug.pdf)
3. [Fast Wavelet Transform (FWT) Algorithm, MATLAB & Simulink](https://www.mathworks.com/help/wavelet/ug/fast-wavelet-transform-fwt-algorithm.html)
4. [S. Mallat (1989). A theory for multiresolution signal decomposition: the wavelet representation. IEEE TPAMI.](https://www.di.ens.fr/stephane.mallat/papiers/MallatTheory89.pdf)
5. [Ten Lectures on Wavelets, Chapter 5: Orthonormal Bases of Wavelets and Multiresolution Analysis, SIAM](https://epubs.siam.org/doi/abs/10.1137/1.9781611970104.ch5)
6. [Recommendation ITU-T T.801 (V3) (08/2023), JPEG 2000 extensions](https://www.itu.int/epublications/publication/itu-t-t-801-v3-2023-08-information-technology-jpeg-2000-image-coding-system-extensions)
7. [Wavelet-based reduction of noise (undecimated wavelet transform), University of Southampton](https://eprints.soton.ac.uk/464348/1/783245.pdf)
8. [Introduction to discrete wavelet transforms, PyTorch-Wavelet-Toolbox documentation](https://pytorch-wavelet-toolbox.readthedocs.io/en/stable/intro.html)
9. [Discrete Wavelet Transform (DWT), PyWavelets Documentation](https://pywavelets.readthedocs.io/en/stable/ref/dwt-discrete-wavelet-transform.html)
10. [Border Effects, MATLAB & Simulink](https://www.mathworks.com/help/wavelet/ug/dealing-with-border-distortion.html)
11. [Meyer awards, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk//Extras/Meyer_awards/)
12. [Stéphane Mallat, a pioneer bridging mathematics and computer science, CNRS News](https://news.cnrs.fr/articles/stephane-mallat-a-pioneer-bridging-mathematics-and-computer-science)
13. [Comparative study of Wavelet transform and Fourier domain filtering for medical image denoising, arXiv](https://arxiv.org/abs/2509.26608)
14. [Wavelet transforms versus Fourier transforms, arXiv math/9304214](https://arxiv.org/abs/math/9304214)
15. [Fast continuous wavelet transform: A least-squares formulation, Signal Processing](https://www.sciencedirect.com/science/article/pii/S0165168496001892)
16. [Comparisons between fast algorithms for the continuous wavelet transform and applications in cosmology: the 1D case, arXiv 2302.03909](https://arxiv.org/abs/2302.03909)
17. [On the Shiftability of Dual-Tree Complex Wavelet Transforms, arXiv 0908.3383](https://arxiv.org/abs/0908.3383)
18. [PyWavelets (pywt) GitHub repository](https://github.com/PyWavelets/pywt)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Numerical, string, and geometric algorithms › Fourier and signal transforms

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fast-wavelet-transform

English original: https://www.edgepedia.org/fast-wavelet-transform
