Blur kernel

Matrix of constant values summing up to 1

For instance, a 5×5 blur kernel is defined as

K=125(1111111111111111111111111)

This transforms the image into a more blurred version of itself.

# Blur kernel
kernel = np.array([[1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1],
                   [1, 1, 1, 1, 1]])/25
image_conv = convolution(im_array, kernel)
print(image_conv.shape)

Can be stacked multiple times to increase the effect.