天天看點

小波去噪的基本知識

 本篇是這段時間學習小波變換的一個收尾,了解一下常見的小波函數,混個臉熟,知道一下常見的幾個術語,有個印象即可,這裡就當是先作一個備忘錄,以後若有需要再深入研究。

一、小波基選擇标準

        小波變換不同于傅裡葉變換,根據小波母函數的不同,小波變換的結果也不盡相同。現實中到底選擇使用哪一種小波的标準一般有以下幾點:

1、支撐長度

        小波函數Ψ(t)、Ψ(ω)、尺度函數φ(t)和φ(ω)的支撐區間,是當時間或頻率趨向于無窮大時,Ψ(t)、Ψ(ω)、φ(t)和φ(ω)從一個有限值收斂到0的長度。支撐長度越長,一般需要耗費更多的計算時間,且産生更多高幅值的小波系數。大部分應用選擇支撐長度為5~9之間的小波,因為支撐長度太長會産生邊界問題,支撐長度太短消失矩太低,不利于信号能量的集中。

        這裡常常見到“緊支撐”的概念,通俗來講,對于函數f(x),如果自變量x在0附近的取值範圍内,f(x)能取到值;而在此之外,f(x)取值為0,那麼這個函數f(x)就是緊支撐函數,而這個0附近的取值範圍就叫做緊支撐集。總結為一句話就是“除在一個很小的區域外,函數為零,即函數有速降性”。

2、對稱性

        具有對稱性的小波,在圖像進行中可以很有效地避免相位畸變,因為該小波對應的濾波器具有線性相位的特點。

3、消失矩

        在實際中,對基本小波往往不僅要求滿足容許條件,對還要施加所謂的消失矩(Vanishing Moments)條件,使盡量多的小波系數為零或者産生盡量少的非零小波系數,這樣有利于資料壓縮和消除噪聲。消失矩越大,就使更多的小波系數為零。但在一般情況下,消失矩越高,支撐長度也越長。是以在支撐長度和消失矩上,我們必須要折衷處理。

        小波的消失矩的定義為,若

其中,Ψ(t)為基本小波,0<=p<N。則稱小波函數具有N階消失矩。從上式還可以得出,同任意n-1階多項式正交。在頻域内表示就是Ψ(ω)在ω=0處有高階零點(一階零點就是容許條件)。

4、正則性

        在量化或者舍入小波系數時,為了減小重構誤差對人眼的影響,我們必須盡量增大小波的光滑性或者連續可微性。因為人眼對“不規則”(irregular)誤差比“平滑”誤差更加敏感。換句話說,我們需要強加“正則性”(regularity)條件。也就是說正則性好的小波,能在信号或圖像的重構中獲得較好的平滑效果,減小量化或舍入誤差的視覺影響。但在一般情況下,正則性好,支撐長度就長,計算時間也就越大。是以正則性和支撐長度上,我們也要有所權衡。

        消失矩和正則性之間有很大關系,對很多重要的小波(比如,樣條小波,Daubechies小波等)來說,随着消失矩的增加,小波的正則性變大,但是,并不能說随着小波消失矩的增加,小波的正則性一定增加,有的反而變小。

5、相似性

        選擇和信号波形相似的小波,這對于壓縮和消噪是有參考價值的。

二、常見的小波基

        以下列出的15種小波基是Matlab中支援的15種。

小波函數 Haar Daubechies Biorthogonal Coiflets Symlets Morlet Mexican Hat Meyer
小波縮寫名 haar db bior coif sym morl mexh meyr
表示形式 haar db N biorNr.Nd coif N sym N morl mexh meyr
舉例 haar db3 bior2.4 coif3 sym2 morl mexh meyr
正交性
雙正交性
緊支撐性
連續小波變換 可以 可以 可以 可以 可以 可以 可以 可以
離散小波變換 可以 可以 可以 可以 可以 不可以 不可以

可以

但無FWT

支撐長度 1 2N-1

重構:2Nr+1

分解:2Nd+1

6N-1 2N-1 有限長度 有限長度 有限長度
濾波器長度 2 2N

Max(2Nr,

2Nd)+2

6N 2N [-4, 4] [-5, 5] [-8, 8]
對稱性 對稱 近似對稱 不對稱 近似對稱 近似對稱 對稱 對稱 對稱

小波函數

消失矩階數

1 N Nr-1 2N N - - -

尺度函數

消失矩階數

- - 2N-1 - - - -
小波函數 Gaus Dmeyer ReverseBior Cgau Cmor Fbsp Shan
小波縮寫名 gaus dmey rbioNr.Nd cgau cmor fbsp shan
表示形式 gaus N dmey rbioNr.Nd cgau N cmor fbsp shan
舉例 gaus3 dmey rbio2.4 cgau3 cmor fbsp shan
緊支撐正交性
緊支撐雙正交性
連續小波變換 可以 不可以 可以 不可以 不可以 不可以 不可以
離散小波變換 不可以 可以 可以 不可以 不可以 不可以 不可以
對稱性 對稱 對稱 對稱 對稱 對稱 對稱 對稱

小波函數

消失矩階數

- - - - - - -

尺度函數

消失矩階數

- - Nr-1 - - - - -

1、Haar小波

        Haar,一般音譯為“哈爾”。

        Haar函數是小波分析中最早用到的一個具有緊支撐的正交小波函數,也是最簡單的一個小波函數,它是支撐域在t∈[0,1]範圍内的單個矩形波。

        Haar小波在時域上是不連續的,是以作為基本小波性能不是特别好。

        在Matlab中輸入指令waveinfo(\'haar\')可得到如下資訊:

    General characteristics: Compactlysupported

    wavelet, the oldest and the simplestwavelet.

    scaling function phi = 1 on [0 1] and 0otherwise.

    wavelet function psi = 1 on [0 0.5], = -1on [0.5 1] and 0 otherwise.

    Family                  Haar

    Short name              haar

    Examples                haar is the same as db1

    Orthogonal              yes

    Biorthogonal            yes

    Compact support         yes

    DWT                     possible

    CWT                     possible

    Support width           1

    Filters length          2

    Regularity              haar is not continuous

    Symmetry                yes

    Number of vanishing

    moments for psi         1

2、Daubechies(dbN)小波(緊支集正交小波)

        Daubechies,一般音譯為“多貝西”。

        Daubechies小波是由世界著明的小波分析學者Ingrid Daubechies(一般音譯為英格麗·多貝西)構造的小波函數,我們一般簡寫成dbN,N是小波的階數。小波函數Ψ(t)和尺度函數φ(t)中的支撐區為2N-1,Ψ(t)的消失矩為N。dbN小波具有較好的正則性,即該小波作為稀疏基所引入的光滑誤差不容易被察覺,使得信号重構過程比較光滑。dbN小波的特點是随着階次(序列N)的增大消失矩階數越大,其中消失矩越高光滑性就越好,頻域的局部化能力就越強,頻帶的劃分效果越好,但是會使時域緊支撐性減弱,同時計算量大大增加,實時性變差。另外,除N=1外,dbN小波不具有對稱性(即非線性相位),即在對信号進行分析和重構時會産生一定的相位失真。dbN沒有明确的表達式(除了N=1外,N=1時即為Haar小波)。

        在Matlab中輸入指令waveinfo(\'db\')可得到如下資訊:

    General characteristics: Compactlysupported

    wavelets with extremal phase and highest

    number of vanishing moments for a given

    support width. Associated scaling filtersare

    minimum-phase filters.

    Family                  Daubechies

    Short name              db

    Order N                 N strictly positive integer

    Examples                db1 or haar, db4, db15

    Orthogonal              yes

    Biorthogonal            yes

    Compact support         yes

    DWT                     possible

    CWT                     possible

    Support width           2N-1

    Filters length          2N

    Regularity              about 0.2 N for large N

    Symmetry                far from

    Number of vanishing

    moments for psi         N

3、Symlet(symN)小波(近似對稱的緊支集正交小波)

        Symlet小波函數是IngridDaubechies提出的近似對稱的小波函數,它是對db函數的一種改進。Symlet小波系通常表示為symN (N=2,3,…,8)。symN小波的支撐範圍為2N-1,消失矩為N,同時也具備較好的正則性。該小波與dbN小波相比,在連續性、支集長度、濾波器長度等方面與dbN小波一緻,但symN小波具有更好的對稱性,即一定程度上能夠減少對信号進行分析和重構時的相位失真。

        在Matlab中輸入指令waveinfo(\'sym\')可得到如下資訊:

    General characteristics: Compactlysupported wavelets with

    least asymmetry and highest number ofvanishing moments

    for a given support width.

    Associated scaling filters are nearlinear-phase filters.

    Family                  Symlets

    Short name              sym

    Order N                 N = 2, 3, ...

    Examples                sym2, sym8

    Orthogonal              yes

    Biorthogonal            yes

    Compact support         yes

    DWT                     possible

    CWT                     possible

    Support width           2N-1

    Filters length          2N

    Regularity             

    Symmetry                near from

    Number of vanishing

    moments for psi         N

4、Coiflet(coifN)小波

        根據R.Coifman的要求,Daubechies構造了Coiflet小波,它具有coifN (N=1,2,3,4,5)這一系列。Coiflet的小波函數Ψ(t)的2N階矩為零,尺度函數φ(t)的2N-1階矩為零。Ψ(t)和φ(t)的支撐長度為6N-1。Coiflet的Ψ(t)和φ(t)具有比dbN更好的對稱性。

        在Matlab中輸入指令waveinfo(\'coif\')可得到如下資訊:

    General characteristics: Compactlysupported

    wavelets with highest number of vanishing

    moments for both phi and psi for a given

    support width.

    Family                  Coiflets

    Short name              coif

    Order N                 N = 1, 2, ..., 5

    Examples                coif2, coif4

    Orthogonal              yes

    Biorthogonal            yes

    Compact support         yes

    DWT                     possible

    CWT                     possible

    Support width           6N-1

    Filters length          6N

    Regularity             

    Symmetry                near from

    Number of vanishing

    moments for psi         2N

    Number of vanishing

    moments for phi         2N-1

5、Biorthogonal(biorNr.Nd)小波

        為了解決對稱性和精确信号重構的不相容性,引入了雙正交小波,稱為對偶的兩個小波分别用于信号的分解和重構。雙正交小波解決了線性相位和正交性要求的沖突。由于它有線性相位特性,是以主要應用在信号與圖像的重構中。通常的用法是采用一個函數進行分解,用另外一個小波函婁進行重構。

        雙正交小波與正交小波的差別在于正交小波滿足<Ψj,k ,Ψl,m>=δj,kδl,m,也就是對小波函數的伸縮和平移構成的基函數完全正交,而雙正交小波滿足的正交性為<Ψj,k ,Ψl,m>=δj,k,也就是對不同尺度伸縮下的小波函數之間有正交性,而同尺度之間通過平移得到的小波函數系之間沒有正交性,是以用于分解與重構的小波不是同一個函數,相應的濾波器也不能由同一個小波生成。

        該小波雖然不是正交小波,但卻是雙正交小波,具備正則性,同時也是緊支撐的,其重構支撐範圍為2Nr+1,分解支撐範圍為2Nd+1。biorNr.Nd小波的主要特征表現在具有線性相位特性。一般來說為了獲得線性相位,需要降低對于正交性的局限,為此該雙正交小波降低了對于正交性的要求,保留了正交小波的一部分正交性,使小波攻得了線性相位和較短支集的特性。

        在Matlab中輸入指令waveinfo(\'bior\')可得到如下資訊:

   General characteristics: Compactly supported

   biorthogonal spline wavelets for which

   symmetry and exact reconstruction are possible

    withFIR filters (in orthogonal case it is

   impossible except for Haar).

   Family                 Biorthogonal

    Shortname              bior

    OrderNr,Nd             Nr = 1 , Nd = 1, 3, 5

    r forreconstruction    Nr = 2 , Nd = 2, 4, 6,8

    d fordecomposition     Nr = 3 , Nd = 1, 3, 5,7, 9

                            Nr = 4 , Nd = 4

                            Nr = 5 , Nd = 5

                            Nr = 6 , Nd = 8

   Examples                bior3.1,bior5.5

   Orthogonal              no

   Biorthogonal            yes

   Compact support         yes

   DWT                     possible

   CWT                     possible

   Support width           2Nr+1 forrec., 2Nd+1 for dec.

   Filters length         max(2Nr,2Nd)+2 but essentially

    biorNr.Nd              ld                      lr     

                     effective length        effective length

                         of Lo_D                 of Hi_D

    bior1.1                 2                       2      

    bior1.3                 6                       2

    bior1.5                10                       2             

    bior2.2                 5                       3             

    bior2.4                 9                       3     

    bior2.6                13                       3             

    bior2.8                17                       3             

    bior3.1                 4                       4              

    bior3.3                 8                       4             

    bior3.5                12                       4

    bior3.7                16                       4

    bior3.9                20                       4

    bior 4.4                 9                       7

    bior5.5                 9                      11

    bior6.8                17                      11

   Regularity for         

    psirec.                Nr-1 and Nr-2 at theknots

   Symmetry                yes 

    Numberof vanishing

   moments for psi dec.    Nr

   Remark: bior 4.4 , 5.5 and 6.8 are such that reconstruction and

   decomposition functions and filters are close in value.

6、ReverseBior小波

        由Biorthogonal而來,是以兩者形式很類似。

        在Matlab中輸入指令waveinfo(\'bior\')可得到如下資訊:

   General characteristics: Compactly supported

   biorthogonal spline wavelets for which

   symmetry and exact reconstruction are possible

    withFIR filters (in orthogonal case it is

   impossible except for Haar).

   Family                 Biorthogonal

    Shortname              rbio

    OrderNd,Nr             Nd = 1 , Nr = 1, 3, 5

    r forreconstruction    Nd = 2 , Nr = 2, 4, 6,8

    d fordecomposition     Nd = 3 , Nr = 1, 3, 5,7, 9

                            Nd = 4 , Nr = 4

                            Nd = 5 , Nr = 5

                            Nd = 6 , Nr = 8

   Examples                rbio3.1,rbio5.5

   Orthogonal              no

   Biorthogonal            yes

   Compact support         yes

   DWT                     possible

    CWT                     possible

   Support width           2Nd+1 forrec., 2Nr+1 for dec.

   Filters length         max(2Nd,2Nr)+2 but essentially

    rbioNd.Nr              lr                      ld

                      effective length        effective length

                        of Hi_D                  of Lo_D

    rbio1.1                 2                       2

    rbio1.3                 6                       2

    rbio1.5                10                       2

    rbio2.2                 5                       3

    rbio2.4                 9                       3

    rbio2.6                13                       3

    rbio2.8                17                       3

    rbio3.1                 4                       4

    rbio3.3                 8                       4

    rbio3.5                12                       4

    rbio3.7                16                       4

    rbio3.9                20                       4

    rbio4.4                 9                       7

    rbio5.5                 9                      11

    rbio6.8                17                      11

   Regularity for         

    psirec.                Nd-1 and Nd-2 at theknots

   Symmetry                yes 

    Numberof vanishing

   moments for psi dec.    Nd

   Remark: rbio 4.4 , 5.5 and 6.8 are such that reconstruction and

   decomposition functions and filters are close in value. 

7、Meyer小波

        Meyer小波的小波函數和尺度函數都是在頻率域中進行定義的,它不是緊支撐的,但它的收斂速度很快。

        在Matlab中輸入指令waveinfo(\'meyr\')可得到如下資訊:

   General characteristics: Infinitely regular orthogonal wavelet.

    Family                  Meyer

    Shortname              meyr

   Orthogonal              yes

   Biorthogonal            yes

   Compact support         no

   DWT                     possiblebut without FWT

                        FIR based approximation provides FWT

   CWT                     possible

   Support width           infinite

   Effective support       [-8 8]

   Regularity             indefinitely derivable

   Symmetry                yes

8、Dmeyer小波

        Dmeyer即離散的Meyer小波,它是Meyer小波基于FIR的近似,用于快速離散小波變換的計算。

        在Matlab中輸入指令waveinfo(\'dmey\')可得到如下資訊:

    Definition: FIR based approximation of theMeyer Wavelet.

    Family                  DMeyer

    Short name              dmey

    Orthogonal              yes

    Biorthogonal            yes

    Compact support         yes

    DWT                     possible

    CWT                     possible

9、Gaussian小波

        Gaussian小波是高斯密度函數的微分形式,它是一種非正交與非雙正交的小波,沒有尺度函數。

        在Matlab中輸入指令waveinfo(\'gaus\')可得到如下資訊:

    Definition: derivatives of the Gaussian

    probability density function.

    gaus(x,n) = Cn * diff(exp(-x^2),n) wherediff denotes

    the symbolic derivative and where Cn issuch that

    the 2-norm of gaus(x,n) = 1.

    Family                  Gaussian

    Short name              gaus

    Wavelet name            gaus"n"

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                    no

    CWT                     possible

    Support width           infinite

    Effective support       [-5 5]

    Symmetry                yes

                        n even ==> Symmetry

                        n odd  ==> Anti-Symmetry

10、MexicanHat(mexh)小波

        Mexican Hat函數為Gauss函數的二階導數。因數它的形狀像墨西哥帽的截面,是以我們稱這個函數為墨西哥草帽函數。它在時域和頻率都有很好的局部化,但不存在尺度函數,是以此小波函數不具有正交性。

        在Matlab中輸入指令waveinfo(\'mexh\')可得到如下資訊:

    Definition: second derivative of theGaussian

    probability density function

    mexh(x) = c * exp(-x^2/2) * (1-x^2)

    where c = 2/(sqrt(3)*pi^{1/4})

    Family                  Mexican hat

    Short name              mexh

    Orthogonal             no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    CWT                     possible

    Support width           infinite

    Effective support       [-5 5]

    Symmetry                yes

11、Morlet小波

        Morlet小波是高斯包絡下的單頻率正弦函數,沒有尺度函數,是非正交分解。

        在Matlab中輸入指令waveinfo(\'morl\')可得到如下資訊:

    Definition:

    morl(x) = exp(-x^2/2) * cos(5x)

    Family                  Morlet

    Short name              morl

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    CWT                     possible

    Support width           infinite

    Effective support       [-4 4]

    Symmetry                yes

12、ComplexGaussian小波

        屬于一類複小波,沒有尺度函數。

        在Matlab中輸入指令waveinfo(\'cgau\')可得到如下資訊:

    Definition: derivatives of the complexGaussian

    function

    cgau(x) = Cn * diff(exp(-i*x)*exp(-x^2),n)where diff denotes

    the symbolic derivative and where Cn is aconstant

    Family                  Complex Gaussian

    Short name              cgau

    Wavelet name            cgau"n"

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    Complex CWT             possible

    Support width           infinite

    Symmetry                yes

                        n even ==> Symmetry

                        n odd  ==> Anti-Symmetry

13、ComplexShannon Wavelets:shan

        在Matlab中輸入指令waveinfo(\'shan\')可得到如下資訊:

    Definition: a complex Shannon wavelet is

            shan(x) =Fb^{0.5}*sinc(Fb*x)*exp(2*i*pi*Fc*x)

    depending on two parameters:

            Fb is a bandwidth parameter

            Fc is a wavelet center frequency

    The condition Fc > Fb/2 is sufficient toensure that

    zero is not in the frequency supportinterval.

    Family                  Complex Shannon

    Short name              shan

    Wavelet name            shan"Fb"-"Fc"

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    complex CWT             possible

    Support width           infinite

14、ComplexFrequency B-Spline Wavelets (複高斯B樣條小波)

        樣條函數(splinefunction)指一類分段(片)光滑、并且在各段交接處也有一定光滑性的函數,簡稱樣條。

        在Matlab中輸入指令waveinfo(\'fbsp\')可得到如下資訊:

    Definition: a complex Frequency B-Splinewavelet is

        fbsp(x) = Fb^{0.5}*(sinc(Fb*x/M))^M*exp(2*i*pi*Fc*x)

    depending on three parameters:

            M is an integer order parameter(>=1)

            Fb is a bandwidth parameter

            Fc is a wavelet center frequency

    For M = 1, the condition Fc > Fb/2 issufficient to ensure

    that zero is not in the frequency supportinterval.

    Family                  Complex Frequency B-Spline

    Short name              fbsp

    Wavelet name           fbsp"M"-"Fb"-"Fc"

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    complex CWT             possible

    Support width           infinite

15、ComplexMorlet小波

        Morlet小波是一種單頻複正弦調制高斯波,也是最常用的複值小波該小波,在時頻兩域均具有良好的分辨率,将此小波加以改造特别适用于地震資料的分析。

        在Matlab中輸入指令waveinfo(\'cmor\')可得到如下資訊:

    Definition: a complex Morlet wavelet is

        cmor(x) =(pi*Fb)^{-0.5}*exp(2*i*pi*Fc*x)*exp(-(x^2)/Fb)

    depending on two parameters:

        Fb is a bandwidth parameter

        Fc is a wavelet center frequency

    Family                  Complex Morlet

    Short name              cmor

    Wavelet name            cmor"Fb"-"Fc"

    Orthogonal              no

    Biorthogonal            no

    Compact support         no

    DWT                     no

    complex CWT             possible

    Support width           infinite

參考文獻

【1】葛哲學,沙威.小波分析理分與MATLAB R2007實作[M].北京:電子工業出版社,2007.

【2】魏明果.實用小波分析[M].北京:北京理工大學出版社,2005.

【3】董長虹. Matlab小波分析工具箱原理與應用[M].北京:國防工業出版社,2004.

【4】張穎超,茅丹,胡凱.壓縮傳感理論在心電圖信号恢複問題上的研究[J]. 計算機研究發展,2014,51(5):1018-1027.

【5】wcrzq,microwest.緊支集是什麼意思,求詳細解釋,謝謝.百度知道

【6】zhaodong584584. 消失矩階數,百度百科

【7】well3216. 對消失矩的了解(轉載自matwav),CSDN部落格

【8】小米. 小波消失矩,新浪部落格

【9】muchi1234. 正則性,百度百科

【10】洋務大臣. 樣條函數,百度百科

【11】其它網絡資源,Thanks!!!

 轉自:https://blog.csdn.net/u013346007/article/details/53462359 多謝且僅用于學習