Blurring An Image Using Pil In Python
I have been trying to blur an image using the PIL. from what I know i need to copy the image, and then change every pixel to the average of the pixels surrounding him, from the ori
Solution 1:
You can just do:
blurred_image = original_image.filter(ImageFilter.BLUR)
See the ImageFilter module for more options.
You are correct in that the process you describe would blur the image, and there are filters that essentially directly do what you suggest (*e.g.", using the ImageFilter.Kernel
method where you kernel has constant weights). Using ImageFilter
will be faster and easier though, and give you more options for blurring and beyond.
Post a Comment for "Blurring An Image Using Pil In Python"