You are on page 1of 17

ShearLab 3D

Manual

v1.0

August the 29th, 2013


Contents

1 Introdu tion 2

2 Shearlets - A Brief Overview 2


2.1 Continuous Shearlet System . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Cone-Adapted Shearlet System . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Dis rete Shearlet Transform . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Frame Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 Sparse Approximation sing Shearlets . . . . . . . . . . . . . . . . . . . . . 5
2.6 Referen es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Digital Shearlet Transform 6


3.1 2D Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 3D Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Inverse Digital Shearlet Transform . . . . . . . . . . . . . . . . . . . . . . 8

4 ShearLab 3D 8
4.1 Implementation of the Digital Shearlet Transform . . . . . . . . . . . . . . 8
4.2 How to Use ShearLab 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.1 Compute a Shearlet De omposition . . . . . . . . . . . . . . . . . . 10
4.2.2 Serial De omposition for Large Data . . . . . . . . . . . . . . . . . 11
4.2.3 Compute the Re onstru tion . . . . . . . . . . . . . . . . . . . . . 12
4.2.4 Serial Re onstru tion for Large Data . . . . . . . . . . . . . . . . . 13

5 Examples 13
5.1 Image Denoising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Video Denoising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1
Figure 1: Anisotropi ally s aled and sheared atoms e iently over urve-like singulari-
ties.

1 Introdu tion

ShearLab 3D is a MATLAB Library, developed for pro essing two- and three-dimensional
signals using a ertain lass of basis fun tions named shearlets. These fun tions were rst
des ribed in 2005 by Labate, Lim, Kutnyiok and Weiss [10 with the goal of onstru ting
systems of basis-fun tions ni ely suited for representing anisotropi features (e.g. urvi-
linear singularities) that often are present in multivariate data.

This manual aims to give a short overview of the usage of ShearLab 3D and the on epts
behind it. Se tion 2 provides a brief introdu tion to the general theory of shearlets, while
hapter 3 is devoted to the dis rete nonseparable shearlet transform (DNST), the main
algorithm used in ShearLab 3D. Finally, hapters 4 and 5 explain the ner implementa-
tional details and ontain a few sample s ripts.

2 Shearlets - A Brief Overview

It is a well established fa t that wavelets provide optimally sparse representations for 1-D
fun tions that are smooth away from point singularities. In higher dimensions, however,
this optimality an not be retained, as wavelets, due to their isotropi nature, are not
ideally suited for overing anisotropi features su h as urve-like singularities (see gure
1).

Shearlets have been onstru ted with the aim of improving on this short oming by ap-
plying anisotropi s aling to the generating fun tion (i.e. dierent dimensions an have
dierent s aling fa tors). Naturally, introdu ing dire tional sele tivity to a system of
representing fun tions demands the apability of varying the dire tion. In the theory
of shearlets, this is a hieved by applying a so- alled shearing operator along with the
(anisotropi ) s aling operator. In short, shearlets are very similar to wavelets in the
sense that both are onstru ted from generating fun tions that an be modied with a

2
50 50 50

100 100 100

150 150 150

200 200 200

250 250 250

300 300 300

350 350 350

400 400 400

450 450 450

500 500 500


50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500

50 50 50

100 100 100

150 150 150

200 200 200

250 250 250

300 300 300

350 350 350

400 400 400

450 450 450

500 500 500


50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500

Figure 2: A square is (paraboli ally) s aled twi e and sheared three times.

ertain operator. But while for wavelets, only isotropi s aling is possible, shearlets are
subje t to both anisotropi s aling and shearing (see gure 2).

2.1 Continuous Shearlet System

Let    
a 0 1 s
Aa = , Ss = (1)
0 a1/2 0 1
be a (paraboli ) s aling matrix and a shearing matrix with a > 0, then, assuming the
existen e of a generating fun tion L2 (R2 ), a two-dimensional ontinuous shearlet
system

SHcont () = {a,s,t = a3/4 (A1 1 2


a Ss ( t)) | a > 0, s R, t R }, (2)
and the asso iated shearlet transform

f 7 SH f (a, s, t) = hf, a,s,t i (3)

with f L2 (R2 ) and (a, s, t) R>0 R R2 an be dened. So SH maps a fun tion


f L2 (R2 ) to a set of oe ients where ea h oe ient is indexed by a s aling parameter
a, a shearing parameter s and a translation parameter t.

2.2 Cone-Adapted Shearlet System

One look at gure 2 reveals a signi ant problem of the shearlet system just introdu ed.
In order to apture horizontally aligned anisotropi stru tures, one would have to ap-
ply the shearlet matrix a great number of times (leading to shearlets that are almost

3
210
50
220
100
230
150
240
200
250
250
260
300
270
350
280
400
290
450
300
500
50 100 150 200 250 300 350 400 450 500 210 220 230 240 250 260 270 280 290 300

Figure 3: The leftmost image shows the tiling of the frequen y-domain used in the one-
adapted shearlet systems. The pi ture in the enter shows the magnitude response of a
shearlet within the horizontal ones of the frequen y domain while the image to the right
shows the same shearlet in the time-domain.

horizontally aligned but also very alongated). To avoid this issue, whi h would be very
di ult to handle in any digital implementation, the so- alled one-adapted ontinuous
shearlet system was introdu ed. Here, the Fourier-domain is partitioned into four ones
(two horizontal, two verti al) and a square-shaped low-pass region (see gure 3). The
horizontal and verti al ones are now asso iated with their own generating fun tions ,
and additionally, we introdu e a s aling fun tion , overing the low-pass region.

Let

a1/2 0
 
Aa = (4)
0 a
be another s aling matrix, shearlet generators , L2 (R2 ) and a s aling fun tion
L2 (R2 ) be given. The one-adapted ontinuous shearlet system SHcont (, , ) is
then given by the union of the following sets:

= t = ( t) : t R2

n 3
o
1/2 2
= a,s,t = a 4 (A1 a S 1
s ( t)) : a (0, 1], |s| 1 + a , t R
n 3
o
1/2 2
= a,s,t = a 4 (A1
a S T
s ( t)) : a (0, 1], |s| 1 + a , t R .

The respe tive transform an be dened analogous to (3).

2.3 Dis rete Shearlet Transform

A dis rete one-adapted shearlet system an now be dened as a ountable subset of the
ontinuous one-adapted shearlet system.

Let L2 (R2 ) be a s aling fun tion, , L2 (R2 ) be shearlet generators and c =


(c1 , c2 ) R2>0 be sampling onstants then the regular one-adapted dis rete shearlet

4
system SH(, , , c) is dened by the union of the following sets:

= m = ( c1 m) : m Z2 ,

n 3
o
= j,k,m = 2 4 j (Sk A2j Mc m) : j 0 |k| 2j/2 , m Z2 ,
n 3
o
= j,k,m = 2 4 j (SkT A2j Mc m) : j 0 |k| 2j/2 , m Z2

with A2j = diag(2j , (2j )1/2 ),A2j = diag((2j )1/2 , 2j ), Mc = diag(c1 , c2 ) and Mc = diag(c2 , c1 ).

Note that the set is asso iated with the low-frequen y region, the with the horizontal
ones and with the verti al ones. Also note that this denition an be extended to
-shearlets (these shearlets are not restri ted to paraboli s aling and use fa tors 2j
instead of 2j ), introdu ed by Grohs, Keiper, Kutyniok and S haefer in 2013 [3, whi h
an also be used in ShearLab 3D.

A shearlet transform an again be dened analogues to (3).

2.4 Frame Property

A set of fun tions L2 (R2 ) fullling

|hf, i|2 Bkf k2


X
Akf k2 (5)

with ertain onstants A, B > 0 (independent of f ) for all f L2 (R2 ) is said to be a frame
of L2 (R2 ). If A = B , is alled a tight frame whereas a tight frame with A = B = 1
is alled a Parseval frame. Note that every orthonormal basis of L2 (R2 ) is ne essarily a
Parseval frame and that the notion of a frame an be onsidered a generalization of the
on ept of orthonormal basis for redundant systems.

It has been shown in [4 that one an nd band-limited shearlet generators , and a
shearlet s aling fun tion su h that the dis rete one-adapted shearlet system denes
a Parseval frame of L2 (R2 ). Also, it has been shown in [5 that there exist ompa tly
supported shearlet generators , su h that the dis rete one-adapted shearlet system
forms a frame in L2 (R2 ). Whether there also exists a tight frame onstru ted from om-
pa tly supportet shearlets is still an open question.

2.5 Sparse Approximation sing Shearlets

In the spirit of orthonormal bases, ea h frame in L2 (R2 ) is asso iated with the frame
operator X
S : L2 (R2 ) L2 (R2 ) : f 7 hf, i. (6)

whi h is positive, self-adjoint and invertible.

5
Clearly, any f L2 (R2 ) an now be written as
X
f= hf, iS 1 (7)

where S 1 is the dual frame operator and the sequen e (S 1 ) is alled the anoni al
dual frame.

Now, one an dene the best n-term approximation of f L2 (R2 ) to be


X
fn = hf, i iS 1 i (8)
iI

where I is the index-set asso iated with the n largest shearlet oe ients hf, i i and (of
ourse, |I| = n).

It was shown in [9 that there exist ompa tly supported shearlet generators , and
a shearlet s aling fun tion su h that the best n-term approximation of fun tions f in
the lass of artoon like images (a subset of L2 (R2 ) dened by fun tions of the form
f = f0 + f1 B where f0 , f1 C 2 (R2 ) and B is a losed C 2 urve) obeys

kf fn k2 = O(n2 (log n)3 ) (9)

whi h is (besides the log fa tor) the optimal de ay rate a hievable. This also gives a
mathemati al justi ation of the superiority of shearlet systems over wavelet or Fourier
bases whi h annot guarantee optimal de ay rates (see [9).

2.6 Referen es

For a extensive introdu tion to the theory of shearlets, see the book published by Gitta
Kutyniok and Demetrio Labate in 2012 [6 and the arti les referen ed at the and of this
manual.

3 Digital Shearlet Transform

ShearLab 3D implements a one (in the 3D ase: pyramid) adapted dis rete shearlet
system based on ompa tly supported shearlets (see [8). The spe i algorithm was
published in 2013 by Wang-Q Lim [11 and will be qui kly summarized here.

3.1 2D Data

The goal of the algorithm is to ompute shearlet oe ients


2D
hj,k,m , fi (10)

where j,k,m
2D is a two-dimensional digital shearlet from the one-adapted dis rete shearlet
system indexed by a s ale paramter j , a shearing paramter k and a translation parameter

6
m and f 2 (Z2 ).

We use a nonseparable shearlet generator

() = P (1 /2, 2 )\
1 1 () (11)
where P is a 2D dire tional lter, 1 is a 1D s aling fun tion and 1 is the wavelet
fun tion of the orresponding multiresolution analysis.

Be ause of
j,k,m() = j,0,m (Sk/2j/2 ), (12)
we need two ingredients for the digitization of shearlets j,k,m: Digitial shearlet lters
2D and a digital shear operator S d
j,0 .
k/2j/2

Let J N be highest s ale to be onsidered (i.e. j < J for all shearlets j,k,m), then the
2D is given by:
digital shearlet lter j,0
2D
(13)

j,0 = pj gJj hJj/2

where pj are the Fourier oe ients of P (2Jj1 1 , 2Jj/2 2 ), hJj is a low-pass lter
asso iated with the s aling fun tion 1 and gJj is the orresponding high-pass lter,
asso iated with the wavelet fun tion 1 .

Furthermore, we dene the digital shear operator Sk/2


d
j/2 to be

  
d
Sk/2j/2 (x) = x2j/2 1 hj/2 (Sk ) 1 hj/2 (14)
2j/2

with x 2 (Z2 ) and the digital shearlet lter


2D d 2D
j,k = Sk/2j/2 j,0 . (15)

The 2D digital shearlet transform for a signal f 2 (Z2 ) is now given by:
2D
DSTj,k,m 2D f )(m)
(f ) = (j,k (16)

for j {0, J 1} and |k| < 2j(1)/2 .


 

3.2 3D Data

Ea h 3D digital shearlet lter an be onstru ted by ombining two 2D digital shearlet


lters in the frequen y domain:
3D 2D 2D
j,k () = j,k 1
(1 , 2 )j,k 2
(1 , 3 ) (17)
The 3D digital shearlet transform for a signal f 2 (Z3 ) is thus given by:
3D
DSTj,k,m 3D f )(m)
(f ) = (j,k (18)

where j {0, J 1} and |k| < 2j(1)/2 .


 

7
50 50 50

100 100 100

150 150 150

200 200 200

250 250 250

300 300 300

350 350 350

400 400 400

450 450 450

500 500 500


50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500

Figure 4: Magnitude responses in the frequen y domain of the separable shearlet gener-
ator gJ hJ (left), the 2D fan lter P (middle) and the nonseparable shearlet generator
2D with J = 4.
0,0

3.3 Inverse Digital Shearlet Transform

The dual digital shearlet lters j,k


2D and 3D are given by:
j,k

2D ()
j, 3D ()
j,
2D
j,k () = P
k 3D k
(19)
, j,k () = P .
2D 2 3D 2
j,k j,k j,k j,k

4 ShearLab 3D

4.1 Implementation of the Digital Shearlet Transform

ShearLab3D provides an implementation of the digital transform summarized in hapter


3. Hen e, it an be used to ompute the digital shearlet transform of arbitrarily sized
two- and three dimensional signals a ording to formulas (16), (18) as well as the inverse
shearlet transform (19).

Applying the onvolution theorem, formulas (16), (18) and (19) an be omputed by
multiplying onjugated digital shearlet lters j,k
2D , their duals 2D and the given signal
j,k
fJ in the frequen y domain. This means that both the de omposition and the re on-
stru tion algorithm redu e to multiple omputations of the fast fourier transform. Thus,
their omplexity is given by O (R N log(N )), where R N is the redundan y of the
2D ).
spe i digital shearlet system (i.e. the number of lters j,k

Following equation (13), the onstru tion of a 2D digital shearlet lter j,k2D , requieres

a 1D lowpass lter h1 and a 2D dire tional lter P . The 1D lter h1 denes a wavelet
multiresolution analysis (and thereby the highpass lter g1 ) whereas the trigonometri
polynomial P will be used to ensure the wedge shape of the essential frequen y support of
2D depi ted in gure 3.1. Please note that the proper hoi e of these lters is essential
j,k
for generating an optimal digital shearlet system as it will inuen e important properties
like frame bounds and dire tional sele tivity.

8
Our hoi e for h1 , from now on denoted by hShearLab 1 (see gure 5), is a maximally at (i.e.
a maximum number of derivatives of the magnitude frequen y response at 0 and van-
ish) and symmetri 9-tap lowpass lter R that isk normalized su h that n hShearLab (n) = 1.
P
It has two vanishing moments (i.e. (x)x = 0 for k {0, 1}) and while there is no
symmetri , ompa tly supported and orthogonal wavelet besides the Haar wavelet, the
renormalized lter 2hShearLab at least approximately fulls the orthonormality ondi-
tion, that is
X
2 h (n)h (n + 2l) l0 0.0018

ShearLab ShearLab
n

for all Z with denoting Krone ker's delta. By hoosing hShearLab to be maximally
2D is signi antly redu ed. This leads to
at, the amount of ripple in the digital lter j,k
a better lo aliziation of the shearlets in the frequen y domain. The highpass lter g1 ,
hereafter denoted by gShearLab , is of ourse hosen to be the asso iated mirror lter, that
is
gShearLab (n) = (1)n hShearLab (n).
Please note that the lter oe ients hShearLab are quite similar to those of the Cohen-
Daube hies-Feauveau 9/7 wavelet [1, famously used in the JPEG 2000 standard. While
the CDF 9/7 wavelet has four vanishing moments and higher degrees of regularity both
in the Hlder and Sobolev sense, trading these advantageous properties for maximal at-
nass seems to be the optimal hoi e for most appli ations.

For the trigonometri polynomial PShearLab 2 (see gure 5), we use the maximally at 2D
fan lter des ribed in [2.

0.6

0.5

0.8
0.4

0.3
0.6

0.2

0.4

0.1

0.2
0

0.1 0
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

(a) (b) ( )

Figure 5: (a) The oe ients of the 1D lowpass lter hShearLab . (b) Magnitude frequen y
response of hShearLab . ( ) Magnitude response of the 2D fan lter PShearLab .

In the original denition of the one-adapted dis rete shearlet system [7, p. 26, the
paraboli s aling matrix was dened as A2j = diag(2j , 2j/2 ) and the shearing parameter
1
The 9-tap lter hShearLab an be generated in MATLAB with
design(fdesign.lowpass('N,F3dB',8,0.5),'maxflat');. The approximate values are hShearLab =
(0.01049, 0.02635, 0.05178, 0.27635, 0.58257, ...).
2
The 2D fan lter PShearLab an be obtained in MATLAB using the Nonsubsampled Contourlet
Toolbox by the statement fftshift(fft2(modulate2(dfilters('dmaxflat4','d')./sqrt(2),' ')));

9
k Z ranged from 2j/2 to 2j/2 in ea h one for ea h s ale j N. However, this
denition was generalized in [3 using a fa tor (1, ) su h that A2j = diag(2j , 2j/2 )
and |k| 2(1)j/2 in ea h one and for ea h s ale j N. ShearLab 3D supports this
generalization by allowing the user to spe ify the exa t number of shearings (in powers
of 2) o uring on ea h s ale of a shearlet system3 . Note that an in reased number of
dierently oriented shearlets on a ertain s ale ee tively leads to a ner partitioning of
the frequen y domain (see gure 6).

(a) (b) ( ) (d)

Figure 6: Plots (a) and (b) show the magnitude frequen y response of a shearlet in the
horizontal frequen y ones on the third s ale of a four-s ale system. Ea h shearlet was
sheared on e but the system in (a) ontains only ve dierently oriented shearlets in the
horizontal ones, while the system in (b) has nine dierently sheared horizontal shearlets.
The magnitude frequen y response of the maximally sheared shearlet in the verti al
ones (d) is almost equal to the response of the orresponding shearlet in the horizontal
ones ( ). In most ases, the digital shearlet lter (d) an be omitted to de rease the
redundan y of a shearlet system.

4.2 How to Use ShearLab 3D

In order to use ShearLab 3D, just download the pa kge from www.shearlab.org and add
anything in it to your MATLAB path.

Please note that ShearLab 3D requires the Signal Pro essing Toolbox and the Image
Pro essing Toolbox. If additionally the Parallel Computing Toolbox is available, CUDA-
ompatibale NVidia graphi s ards an be used to gain a signi ant speed up.

4.2.1 Compute a Shearlet De omposition

In order to ompute the shearlet de omposition of arbitrariliy sized two- or three-dimensional


data, you just have to onstru t a shearlet system and then all the SLshearde
method:
3
e.g.: For a three-s ale 2D shearlet system, the ve tor shearLevels = [0 1 1 means that 20 =
1 shearings o ur in both dire tions in both ones on the rst s ale and 21 = 2 shearings o ur in
both dire tions in both onse on the se ond and third s ale. In luding the unsheared shearlets, this
onguration denes a system of 2 ((2 1 + 1) + (2 2 + 1) + (2 2 + 1)) = 26 dierent shearlets. The
default value of shearLevels in ShearLab 3D is eil((1:nS ales)/2);

10
% 2D
sizeX = 500;
sizeY = 300;
useGPU = 0;
data = randn ( sizeX , sizeY ) ;
system = SLgetShearletSystem2D (useGPU , sizeX , sizeY , 4 ) ;
s h e a r le t C o e ff i ie n t s = SLshearde 2D( data , system ) ;
% 3D
sizeX = 70;
sizeY = 71;
sizeZ = 68;
useGPU = 0;
data = randn ( sizeX , sizeY , sizeZ ) ;
system = SLgetShearletSystem3D (useGPU , sizeX , sizeY , sizeZ , 1 ) ;
s h e a r le t C o e ff i ie n t s = SLshearde 3D( data , system ) ;
The array shearletCoe ients
is three dimensional in the 2D and four dimensional in the
3D ase. In both ases, the last dimension enumerates all shearlets within the spe ied
system with dierent shearing parameters k and s aling parameters j while the rst two
or three dimensions are asso iated with the translates of one single shearlet (see gure
8).

50 50 50

100 100 100

150 150 150

200 200 200

250 250 250

300 300 300

350 350 350

400 400 400

450 450 450

500 500 500


50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500

Figure 7: The two images to the right show all shearlet oe ients of the translates of
two dierent shearlets. The used system has four s ales, a redundan y of 49 and was
spe ied with shearLevels = [1, 1, 2, 2]. The shearlet orresponding to the oe ients in
the entered pi ture has a s ale parameter j = 1 a shearing parameter k = 2 and lives on
the horizontal frequen y ones. The shearlet orresponding to the oe ients plotted in
the rightmost image has a s ale parameter j = 2, a shearing parameter k = 0 and lives
on the verti al frequen y ones.

4.2.2 Serial De omposition for Large Data

Sometimes, espe ially in the three-dimensional ase, the data to be analysed is so large
that it's impossible to keep all shearlet oe ients in memory at the same time. In this

11
ase, it is also possible to ompute the shearlet de omposition in a serialized manner.
Then, only the oe ients asso iated to the translates of one single shearlet are available
at one point in time.
% 2D
sizeX = 1024;
sizeY = 1024;
data = randn ( sizeX , sizeY ) ;
% prepare s e r i a l pro essing
[ Xfreq , Xre , preparedFilters , dualFrameWeightsCurr , shearletIdxs = . . .
SLprepareSerial2D (useGPU, data , 4 ) ;

for j = 1: s iz e ( shearletIdxs ,1)


shearletIdx = shearletIdxs ( j , : ) ;
%shearlet de omposition
[ o e f f i i e n t s , shearlet , dualFrameWeightsCurr ,RMS = . . .
SLshearde Serial2D ( Xfreq , shearletIdx , preparedFilters , dualFrameWeightsCurr ) ;
% add pro essing here
end
% 3D
sizeX = 192;
sizeY = 192;
sizeZ = 192;
data = randn ( sizeX , sizeY , sizeZ ) ;
% prepare s e r i a l pro essing
[ Xfreq , Xre , preparedFilters , dualFrameWeightsCurr , shearletIdxs = . . .
SLprepareSerial3D (useGPU, data , 2 ) ;

for j = 1: s iz e ( shearletIdxs ,1)


shearletIdx = shearletIdxs ( j , : ) ;
%shearlet de omposition
[ o e f f i i e n t s , shearlet , dualFrameWeightsCurr ,RMS = . . .
SLshearde Serial3D ( Xfreq , shearletIdx , preparedFilters , dualFrameWeightsCurr ) ;
% add pro essing here
end

4.2.3 Compute the Re onstru tion

If shearlet oe ients and the orresponding system are present, it is possible to ompute
a re onstru tion. This an be done by simply alling the SLshearre
method.
% 2D
re onstru tion = SLshearre 2D ( o e ff i i e n t s , system ) ;
% 3D
re onstru tion = SLshearre 3D ( o e ff i i e n t s , system ) ;

12
4.2.4 Serial Re onstru tion for Large Data

Of ourse, data an also be onstru ted from the shearlet oe ients during serial pro-
essing.
% 2D
for j = 1: s iz e ( shearletIdxs ,1)
shearletIdx = shearletIdxs ( j , : ) ;
%shearlet de omposition
[ o e f f i i e n t s , shearlet , dualFrameWeightsCurr ,RMS = . . .
SLshearde Serial2D ( Xfreq , shearletIdx , preparedFilters , dualFrameWeightsCurr ) ;
% add pro essing here
Xre = SLshearre Serial2D ( o e f fi i e n t s , shearlet , Xre ) ;
end
re onstru tion = SLfinishSerial2D ( Xre , dualFrameWeightsCurr ) ;
% 3D
for j = 1: s iz e ( shearletIdxs ,1)
shearletIdx = shearletIdxs ( j , : ) ;
%shearlet de omposition
[ o e f f i i e n t s , shearlet , dualFrameWeightsCurr ,RMS = . . .
SLshearde Serial3D ( Xfreq , shearletIdx , preparedFilters , dualFrameWeightsCurr ) ;
% add pro essing here
Xre = SLshearre Serial3D ( o e f fi i e n t s , shearlet , Xre ) ;
end
re onstru tion = SLfinishSerial3D ( Xre , dualFrameWeightsCurr ) ;

5 Examples

5.1 Image Denoising

The following ode shows how an image distorted with Gaussian white noise an be
denoised using the digital shearlet transform and hard thresholding.
%%se t t ing s
sigma = 30;
s a le s = 4;
thresholdingFa tors = [0 3 3 4 4 ;
%%load data
X = double ( imread ( ' barbara . jpg ' ) ) ;
%%add noise
Xnoisy = X + sigma randn ( s iz e (X) ) ;
%% reate s he ar le t s
shearletSystem = SLgetShearletSystem2D (0 , s i z e (X,1) , si z e (X,2) , s a le s ) ;
%%de omposition
o e ff s = SLshearde 2D( Xnoisy , shearletSystem ) ;

13
%%thresholding
for j = 1: shearletSystem . nShearlets
shearletIdx = shearletSystem . shearletIdxs ( j , : ) ;
o e f fs ( : , : , j ) = o e f f s ( : , : , j ) . ( abs ( o e f fs ( : , : , j )) > . . .
thresholdingFa tors ( shearletIdx (2)+1) shearletSystem .RMS( j ) sigma ) ;
end
%%re onstrsu tion
Xre = SLshearre 2D ( oeffs , shearletSystem ) ;
%% ompute psnr
PSNR = SL omputePSNR(X, Xre ) ;

Figure 8: Image denoising using ShearLab 3D. The grays ale image (values ranging from
0 to 255) was distorted with Gaussian white noise with = 30 and denoised using hard
tresholding on the shearlet oe ients.

5.2 Video Denoising

The following ode shows how a video distorted with Gaussian white noise an be denoised
using the digital shearlet transform and hard thresholding.

%%se t t ing s
sigma = 30;
s a le s = 3;
shearLevels = [0 0 1 ;
thresholdingFa tors = [3 3 3 4 ;
fullSystem = 0;
useGPU = 0;
%%load data
load ' missameri aseq ' ;
X = double (X) ;
%%add noise
Xnoisy = X + sigma randn ( s iz e (X) ) ;
%%prepare s e r i a l pro essing
[ Xfreq , Xre , preparedFilters , dualFrameWeightsCurr , shearletIdxs = . . .
SLprepareSerial3D (useGPU, Xnoisy , s ales , shearLevels , fullSystem ) ;
for j = 1: s iz e ( shearletIdxs ,1)
shearletIdx = shearletIdxs ( j , : ) ;

14
%%shearlet de omposition
[ oeffs , shearlet , dualFrameWeightsCurr ,RMS = . . .
SLshearde Serial3D ( Xfreq , shearletIdx , preparedFilters , dualFrameWeightsCurr ) ;
%%put pro essing of shearlet o e f f i i e n t s here , for example :
%%hard thresholding
o e f fs = o e f fs . ( abs ( o e f f s ) > thresholdingFa tors ( shearletIdx (2)+1) RMS sigma ) ;
%%shearlet re onstru tion
Xre = SLshearre Serial3D ( oeffs , shearlet , Xre ) ;
end
Xre = SLfinishSerial3D ( Xre , dualFrameWeightsCurr ) ;
%% ompute psnr
PSNR = SL omputePSNR(X, Xre ) ;

Referen es

[1 Albert Cohen, Ingrid Daube hies, and Jean-Christophe Feauveau. Biorthogonal


bases of ompa tly supported wavelets. Communi ations on Pure and Applied
Mathemati s, 45:1992, 1992.

[2 Arthur L. da Cunha, Jianping Zhou, and Minh N. Do. The nonsubsampled on-
tourlet transform: Theory, design and appli ations. IEEE Trans. Image Pro .,
15:30893101, 2006.

[3 Phlipp Grohs, Sandra Keiper, Gitta Kutyniok, and Martin S hfer. Alpha mole ules.
preprint, 2013.

[4 Kanghui Guo, Gitta Kutyniok, and Demetrio Labate. Sparse multidimensional rep-
resentations using anistropi dilation and shear oper. Wavelets and Splines (Athens,
GA, 2005), pages 189201, 2006.

[5 Pisamai Kittipoom, Gitta Kutyniok, and Wang-Q Lim. Constru tion of ompa tly
supported shearlet frames. Constr. Approx., 35:2172, 2012.

[6 Gitta Kutyniok and Demetrio Labate, editors. Shearlets Multis ale Analysis for
Multivariate Data. Birkhuser Boston, 2012.

[7 Gitta Kutyniok and Demetrio Labate. Shearlets: Multis ale Analysis for
Multivariate Data, hapter Introdu tion to Shearlets, pages 138. Birkhuser Boston,
2012.

[8 Gitta Kutyniok, Jakob Lemvig, and Wang-Q Lim. Optimally sparse approximations
of 3d fun tions by ompa tly supported shearlet frames. SIAM J. Math. Anal.,
44:29623017, 2012.

[9 Gitta Kutyniok and Wang-Q Lim. Compa tly supported shearlets are optimally
sparse. J. Approx. Theory, 163:15641589, 2011.

15
[10 Demetrio Labate, Wang-Q Lim, Gitta Kutyniok, and Guido Weiss. Sparse mul-
tidimensional representation using shearlets. In SPIE Pro ., volume 5914, pages
254262, 2005.

[11 Wang-Q Lim. Nonseparable shearlet transform. IEEE Trans. Image Pro ., 2013. to
appear.

16