In [3]:
%pylab inline
import mcv
import cv2
import matplotlib.pylab as plt
import numpy as np

img = cv2.imread("/Users/Steven/tmp/DSC_0336.JPG")
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
# img = cv2.imread("../test/images/H3224.jpg")
print(img.dtype, img.shape)
if img.dtype == np.uint8:
    img = img.astype(np.float32)
    img = img/255.0

img_g = mcv.gas_blur(img, 4)
plt.imshow(img_g)


Populating the interactive namespace from numpy and matplotlib
(dtype('uint8'), (1367, 2048, 3))
n_channels: 3
WARNING: pylab import has clobbered these variables: ['plt']
`%pylab --no-import-all` prevents importing * from pylab and numpy
Out[3]:
<matplotlib.image.AxesImage at 0x117f65cd0>

In [3]:
plt.imshow(img)


Out[3]:
<matplotlib.image.AxesImage at 0x10f78e0d0>

In [4]:
plt.imshow(img)


Out[4]:
<matplotlib.image.AxesImage at 0x11f3ce650>

In [ ]: