Skip to content

Commit

Permalink
Caminho absoluto da imagem
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyM7 authored Sep 29, 2024
1 parent 4546cd0 commit a128894
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projetos/projetos-de-ia/projeto-de-ag/ag_imagem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
mse_dez_ger = deque(maxlen=5) #mse das ultimas 5 gerações

# Carrega a imagem original
img_original = Image.open('test2.jpg').convert('L')
img_original = Image.open('./test2.jpg').convert('L')
# img_original = img_original.resize((64, 64))
matriz_img_original = np.array(img_original) # converte para uma matriz

Expand Down Expand Up @@ -126,4 +126,4 @@ def mutacao(cromossomo, taxa_mutacao):
ax[1].imshow(melhor_img, cmap='gray')
ax[1].set_title(f"Imagem Final (MSE: {melhor_fitness:.2f})")
plt.ioff() # Desliga o modo interativo
plt.show()
plt.show()

0 comments on commit a128894

Please sign in to comment.