Last active
May 12, 2021 16:22
-
-
Save tecsify/c034c3165c2738c83c8a5cb99a25787d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Procesamiento de imágenes con Python por #Tecsify | |
Puedes ver la guía completa de este código en nuestro blog: | |
https://tecsify.com/blog/guia-imagenes-python/ """ | |
from PIL import Image, ImageFilter | |
DirectorioImagen = r'Directorio\Tecsify.png' | |
img = Image.open(DirectorioImagen).convert('LA') | |
img.show() | |
img = Image.open(DirectorioImagen).filter(ImageFilter.BoxBlur(30)) | |
img.show() | |
img = Image.open(DirectorioImagen).filter(ImageFilter.FIND_EDGES) | |
img.show() | |
img = Image.open(DirectorioImagen).filter(ImageFilter.CONTOUR) | |
img.show() | |
img.save(r'Directorio\NuevaImagen.png') #Esto guardará la ultima image filtrada. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment