Main Content

isorthwfb

Determine if filter bank is orthogonal wavelet filter bank

Since R2022b

    Description

    tf = isorthwfb(Lo) returns true if the two-channel filter bank formed from the lowpass (scaling) filter Lo satisfies the necessary and sufficient conditions to be a two-channel orthonormal perfect reconstruction (PR) wavelet filter bank. isorthwfb forms the highpass (wavelet) filter using the qmf function: Hi = qmf(Lo).

    For a list of the necessary and sufficient conditions that the lowpass and highpass filters must satisfy, see Orthonormal Perfect Reconstruction Wavelet Filter Bank.

    tf = isorthwfb(Lo,Hi) uses the highpass (wavelet) filter Hi to determine whether Lo and Hi jointly satisfy the necessary and sufficient conditions to be a two-channel orthonormal PR wavelet filter bank.

    isorthwfb assumes that Lo and Hi form an orthogonal quadrature mirror filter pair. To return accurate results, ensure that you provide either both analysis filters or both synthesis filters.

    tf = isorthwfb(___,Tolerance=tol) uses the positive real scalar tolerance tol to determine whether the filters satisfy the necessary and sufficient conditions to be a two-channel orthonormal PR wavelet filter bank.

    [tf,checks] = isorthwfb(___) returns a table with all orthogonality checks.

    example

    Examples

    collapse all

    Check the orthogonality conditions for the lowpass (scaling) filter associated with Daubechies least-asymmetric wavelet of order 5. Confirm all the checks pass.

    scalf = symwavf("sym5");
    [tf,checks] = isorthwfb(scalf)
    tf = logical
       1
    
    
    checks=7×3 table
                                              Pass-Fail    Maximum Error    Test Tolerance
                                              _________    _____________    ______________
    
        Equal-length filters                    pass                 0                 0  
        Even-length filters                     pass                 0                 0  
        Unit-norm filters                       pass        8.6153e-14        1.4901e-08  
        Filter sums                             pass        3.3374e-12        1.4901e-08  
        Even and odd downsampled sums           pass         1.669e-12        1.4901e-08  
        Zero autocorrelation at even lags       pass        1.2896e-13        1.4901e-08  
        Zero crosscorrelation at even lags      pass        1.1345e-17        1.4901e-08  
    
    

    Obtain the lowpass and highpass synthesis filters associated with the Coiflet of order 5. Confirm the two-channel filter bank formed from the filter pair satisfies the necessary and sufficient conditions to be a two-channel orthonormal PR wavelet filter bank.

    [~,~,LoR,HiR] = wfilters("coif5");
    [tf2,checks2] = isorthwfb(LoR,HiR)
    tf2 = logical
       1
    
    
    checks2=7×3 table
                                              Pass-Fail    Maximum Error    Test Tolerance
                                              _________    _____________    ______________
    
        Equal-length filters                    pass                 0                 0  
        Even-length filters                     pass                 0                 0  
        Unit-norm filters                       pass        1.0399e-10        1.4901e-08  
        Filter sums                             pass        4.2426e-10        1.4901e-08  
        Even and odd downsampled sums           pass        2.1213e-10        1.4901e-08  
        Zero autocorrelation at even lags       pass        4.1627e-09        1.4901e-08  
        Zero crosscorrelation at even lags      pass        3.5434e-19        1.4901e-08  
    
    

    Input Arguments

    collapse all

    Lowpass (scaling) filter, specified as a real-valued vector. Lo must have an even number of samples. Lo should sum to 1 with an L2 norm of 1/√2, or sum to √2 with an L2 norm of 1.

    Example: Lo = dbwavf("db4")

    Data Types: single | double

    Highpass (wavelet) filter, specified as a real-valued vector. Hi and Lo must have the same number of samples and be even-length vectors.

    Example: Hi = qmf(Lo), where Lo = dbwavf("db6").

    Data Types: single | double

    Tolerance used in filter bank checks, specified as a positive real scalar.

    Output Arguments

    collapse all

    True or false result, returned as a 1 or 0 of data type logical. The isorthwfb function returns a 1 if the filters satisfy all the conditions listed in Orthonormal Perfect Reconstruction Wavelet Filter Bank within the specified tolerance.

    Orthogonality checks, returned as a table. The table shows pass or fail for each check as well as the maximum error and specified test tolerance where applicable. A test tolerance of 0 indicates that the check is a logical pass or fail.

    More About

    collapse all

    Algorithms

    Before performing the orthogonality checks, the isorthwfb function normalizes the lowpass filter so its coefficients sum to √2.

    References

    [1] Strang, Gilbert, and Truong Nguyen. Wavelets and Filter Banks. Rev. ed. Wellesley, Mass: Wellesley-Cambridge Press, 1997.

    [2] Burrus, C. S., Ramesh A. Gopinath, and Haitao Guo. Introduction to Wavelets and Wavelet Transforms: A Primer. Upper Saddle River, N.J: Prentice Hall, 1998.

    Extended Capabilities

    expand all

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2022b