Reputation: 1
I already have a function that converts an image to a matrix, and back. But I was wondering how to manipulate the matrix so that the picture becomes blurry, or pixified?
Upvotes: 0
Views: 215
Reputation: 2065
To make it blurry filter it using any low-pass filter (mean filter, gaussian filter etc.).
Upvotes: 0
Reputation: 10859
I suggest to use scipy
.
To blur use gaussian_filter
from scipy.ndimage
.
Please note that blurring may require additional normalization because typically the maximum values go down (are smeared out).
To pixelate use downsampling, for example decimate
from scipy.signal
.
In case of color images I suggest to apply the blurring or pixelation to each color separately.
Upvotes: 1