for n in range(iterations):
    image = np.arctan2(ndimage.filters.uniform_filter(np.sin(image), size=
        kernel), ndimage.filters.uniform_filter(np.cos(image), size=kernel))
How to remove noise from a histogram equalized image?