liftingScheme
Description
Use the liftingScheme
object to create a lifting scheme that
you can efficiently apply to data.
Creation
Description
creates the lifting
scheme for the lscheme
= liftingScheme'lazy'
wavelet with normalization set to 1.
creates
a lifting scheme with Properties specified by
name-value pairs. Enclose the property name in quotes. You can create a lifting scheme
using one of the following syntaxes:lscheme
= liftingScheme(Name,Value)
lscheme = liftingScheme('
Wavelet
',wname)lscheme = liftingScheme('
CustomLowpassFilter
',filter)lscheme = liftingScheme('
LiftingSteps
',liftingSteps,'NormalizationFactors',normFactors)
Properties
Wavelet
— Orthogonal or biorthogonal wavelet
'lazy'
(default) | 'haar'
| 'db1'
| 'db2'
| ...
Orthogonal or biorthogonal wavelet associated with the lifting scheme, specified as one of these.
Wavelet Family | Wavelet |
---|---|
Daubechies | 'lazy' , 'haar' ,
'db1' , 'db2' ,
'db3' , 'db4' , 'db5' ,
'db6' , 'db7' , and
'db8' |
Symlet | 'sym2' , 'sym3' ,
'sym4' , 'sym5' ,
'sym6' , 'sym7' , and
'sym8' |
Cohen-Daubechies-Feauveau | 'cdf1.1' , 'cdf1.3' ,
'cdf1.5' , 'cdf2.2' ,
'cdf2.4' , 'cdf2.6' ,
'cdf3.1' , 'cdf3.3' ,
'cdf3.5' , 'cdf4.2' ,
'cdf4.4' , 'cdf4.6' ,
'cdf5.1' , 'cdf5.3' ,
'cdf5.5' , 'cdf6.2' ,
'cdf6.4' , and 'cdf6.6' |
Coiflet | 'coif1' , and 'coif2' |
Biorthogonal | 'bior1.1' ,
'bior1.3' ,'bior1.5' ,
'bior2.2' , 'bior2.4' ,
'bior2.6' , 'bior2.8' ,
'bior3.1' , 'bior3.3' ,
'bior3.5' , 'bior3.7' ,
'bior3.9' , 'bior4.4' ,
'bior5.5' , 'bior6.8' ,
'bs3' , and '9.7' |
Reverse Biorthogonal | 'rbs3' , 'r9.7' ,
'rbio1.1' , 'rbio1.3' ,
'rbio1.5' , 'rbio2.2' ,
'rbio2.4' , 'rbio2.6' ,
'rbio2.8' , 'rbio3.1' ,
'rbio3.3' , 'rbio3.5' ,
'rbio3.7' , 'rbio3.9' ,
'rbio4.4' , 'rbio5.5' , and
'rbio6.8' |
Example: lscheme = liftingScheme('Wavelet','bior3.7')
creates the
lifting scheme associated with the 'bior3.7'
biorthogonal
wavelet.
CustomLowpassFilter
— Lowpass filters
cell array
Lowpass filters associated with the lifting scheme, specified as a cell array.
To create a lifting scheme associated with an orthogonal wavelet, set
CustomLowpassFilter
to{LoD}
, whereLoD
is the lowpass filter associated with wavelet.To create a lifting scheme associated with a biorthogonal wavelet, set
CustomLowpassFilter
to{LoPrimal,LoDual}
, whereLoPrimal
andLoDual
are the lowpass filters associated with the biorthogonal wavelet.
When you specify filter coefficients, the Wavelet
property is
automatically set to 'custom'
.
Example: lscheme = liftingScheme('CustomLowpassFilter',{[sqrt(2)/2
sqrt(2)/2]})
creates a lifting scheme associated with the Haar
wavelet.
Data Types: single
| double
LiftingSteps
— Lifting steps
liftingStep
structure | array of liftingStep
structures
Lifting steps associated with the lifting scheme, specified as an array of
structures obtained from liftingStep
. To create a lifting scheme
using LiftingSteps
, you must also set the
NormalizationFactors
property. When you set these two properties,
the Wavelet
property is automatically set to
'custom'
.
Example: lscheme =
liftingScheme('LiftingSteps',ELS,'NormalizationFactors',NF)
creates a
lifting scheme using the liftingStep
structures specified in
ELS
and factors specified in NF
.
NormalizationFactors
— Normalization factors
non-zero scalar | vector
Normalization factors associated with the lifting scheme, specified as
K or [K
1/K]
, where K is a non-zero scalar.
The factor K specifies the diagonal elements of the 2-by-2
normalization matrix. If specified as a vector, the product of the vector elements must
equal 1 to within precision.
To create a lifting scheme using NormalizationFactors
, you must
also set the LiftingSteps
property. When you set these two
properties, the Wavelet
property is automatically set to
'custom'
.
Data Types: double
Object Functions
addlift | Add elementary lifting steps |
deletelift | Delete elementary lifting steps |
ls2filt | Extract wavelet filters from lifting scheme |
disp | Display lifting scheme |
Examples
Apply Lifting Scheme to Signal
Create the lifting scheme associated with the Haar wavelet.
lscheme = liftingScheme('Wavelet','haar')
lscheme = Wavelet : 'haar' LiftingSteps : [2 × 1] liftingStep NormalizationFactors : [1.4142 0.7071] CustomLowpassFilter : [ ] Details of LiftingSteps : Type: 'predict' Coefficients: -1 MaxOrder: 0 Type: 'update' Coefficients: 0.5000 MaxOrder: 0
Obtain the level 2 wavelet decomposition of a signal using the lifting scheme. Inspect the approximation and detail coefficients.
sig = 0:7; [appC,detC]=lwt(sig,'LiftingScheme',lscheme,'Level',2); appC
appC = 2×1
3.0000
11.0000
detC{1}
ans = 4×1
0.7071
0.7071
0.7071
0.7071
detC{2}
ans = 2×1
2.0000
2.0000
Obtain the inverse transform and demonstrate perfect reconstruction.
xrec = ilwt(appC,detC,'LiftingScheme',lscheme);
max(abs(xrec(:)-sig(:)))
ans = 2.6645e-15
Create Lifting Scheme Using Custom Lowpass Filter
Create a lifting scheme using the lowpass filters associated with the db4
wavelet.
wv = 'db4'; [~,~,LoR,~] = wfilters(wv); LS = liftingScheme('CustomLowpassFilter',{LoR});
Demonstrate Wavelet Orthogonality
Create the lifting scheme associated with the biorthogonal bior2.2
wavelet.
lscheme = liftingScheme('Wavelet','bior2.2');
A wavelet with vanishing moments is orthogonal to degree polynomials. The bior2.2
wavelet has two vanishing moments. Create a signal by sampling a polynomial of degree 1.
sig = 1:16;
Apply the lifting scheme to the signal. Inspect the detail coefficients at the finest scale. The bior2.2
wavelet is orthogonal to the degree 1 polynomial. Confirm that except for the nonzero coefficient at the boundary, the detail coefficients are zero.
[A,D] = lwt(sig,'LiftingScheme',lscheme);
D{1}
ans = 8×1
0
0
0
0
0
0
0
5.6569
Now create the lifting scheme associated with the Haar wavelet.
lschemeH = liftingScheme('Wavelet','haar');
Apply the lifting scheme to the signal. Confirm the detail coefficients are all nonzero. Because the Haar wavelet has only one vanishing moment, the wavelet is not orthogonal to the degree 1 polynomial.
[AH,DH] = lwt(sig,'LiftingScheme',lschemeH);
DH{1}
ans = 8×1
0.7071
0.7071
0.7071
0.7071
0.7071
0.7071
0.7071
0.7071
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2021aR2021b: CustomLowpassFilter
name-value argument in liftingScheme
must be a cell array
Starting this release, to use a lowpass filter to create a lifting scheme associated
with an orthogonal wavelet, you must specify CustomLowpassFilter
as a
cell array. If you specify CustomLowpassFilter
as a vector,
liftingScheme
will generate an error.
To update your code, change instances of 'CustomLowpassFilter',lpass
,
where lpass
is the vector, to
'CustomLowpassFilter',{lpass}
.
See Also
liftingStep
| lwt
| ilwt
| lwt2
| ilwt2
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)