In [15]:
%pylab inline
import matplotlib.image as mpimg
import matplotlib.cm as cm
import cfa
import hqli
img = mpimg.imread('data/lena.jpg')
cfa_img = cfa.make_cfa(img)


Populating the interactive namespace from numpy and matplotlib

In [16]:
img2 = hqli.hqli(cfa_img)

In [17]:
imshow(img, origin='upper')
figure()
imshow(img2, origin='upper')


Out[17]:
<matplotlib.image.AxesImage at 0x10ccf4210>

In [23]:
clf()
imshow(hstack([(np.array(img[2:-2,2:-2,:], dtype=np.float)
                -np.array(img2[2:-2,2:-2,:], dtype=np.float))[:,:,0], 
               (np.array(img[2:-2,2:-2,:], dtype=np.float)
                -np.array(img2[2:-2,2:-2,:], dtype=np.float))[:,:,1], 
               (np.array(img[2:-2,2:-2,:], dtype=np.float)
                -np.array(img2[2:-2,2:-2,:], dtype=np.float))[:,:,2]]), 
       origin='upper')
colorbar()


Out[23]:
<matplotlib.colorbar.Colorbar instance at 0x11013a9e0>

In [ ]: