viernes, 6 de septiembre de 2024

Ejemplo 7_tecnologias inteligentes_ CE3.2 Ejemplo de Visualización de Imágenes sin ejes:

Instalar la biblioteca:

pip install matplotlib


Aplicación.py:


import matplotlib.pyplot as plt

import matplotlib.image as mpimg


# Cargar y mostrar imagen

image = mpimg.imread('floree.jpg')

plt.imshow(image)

plt.title('Imagen Cargada')

plt.axis('off')  # No mostrar ejes

plt.show()



Aplicación.py  de nuevo, escribe el nombre del imagen en la misma carpeta:

import matplotlib.pyplot as plt
import matplotlib.image as mpimg

# Cargar y mostrar imagen
image = mpimg.imread('ruta_a_tu_imagen.jpg')
plt.imshow(image)
plt.title('Imagen Cargada')
plt.axis('off')  # No mostrar ejes
plt.show()

https://learnpython.org/ walter tan bueno como w3schools

 T an bueno como w3schools   https://learnpython.org/  apuntes python 3 con ejercicios  Walter En w3schools hay  html y css también, muy bue...