def gaussian(img, p):
    if (np.random.sample() <= p):
        (height, width) = np.array(img).shape
        gauss = np.random.normal(0, p, (height, width))
        return Image.fromarray((np.array(img) + gauss).astype('uint8'))
    else:
        return img
def gaussian(img, p):
    if (np.random.sample() <= p):
        (height, width) = np.array(img).shape
        gauss = np.random.normal(0, p, (height, width))
        return Image.fromarray((np.array(img) + gauss).astype('uint8'))
    else:
        return img