Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.12.dev -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
%guiref -> A brief reference about the graphical user interface.
In [1]: import Image
In [2]: import wavepy as wv
In [3]: x=np.asarray(Image.open("empire.jpg").convert("L"))
In [4]: imshow(x,cmap=cm.gray)
Out[4]: <matplotlib.image.AxesImage at 0x271aa30>
In [5]: J=2
In [6]: nm='db3'
In [7]: ext='sym'
In [8]: [dwtop,length,flag]=wv.dwt.dwt2(x,J,nm,ext)
In [9]: disp=wv.dwt.dispdwt(dwtop,length,J)
In [10]: length2=wv.dwt.out_dim(length,J)
In [11]: l0=length2[0]
In [12]: l1=length2[1]
In [13]: disp[disp<0.0]=0.0
In [14]: disp[0:l0,0:l1]=disp[0:l0,0:l1]*255.0/disp.max()
In [15]: disp[disp>255.0]=255.0
In [16]: imshow(disp,cmap=cm.gray)
Out[16]: <matplotlib.image.AxesImage at 0x2a78510>
In [17]: oup=wv.dwt.idwt2(dwtop,nm,length,flag)
In [18]: imshow(oup,cmap=cm.gray)
Out[18]: <matplotlib.image.AxesImage at 0x2af6cd0>
In [19]: imshow(disp,cmap=cm.pink)
Out[19]: <matplotlib.image.AxesImage at 0x2ba1470>
In [20]: