mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
Change coefficients in visualisation_kernel.py
This commit is contained in:
parent
ba9866a22c
commit
de21f865cb
@ -18,11 +18,14 @@ with open(fichier, 'r') as f:
|
|||||||
IMAGE_WIDTH = 5 # Manière très grossière de modifier le script visualisation.py
|
IMAGE_WIDTH = 5 # Manière très grossière de modifier le script visualisation.py
|
||||||
IMAGE_HEIGHT = 5 # pour utiliser une de ses fonctions sans la réécrire
|
IMAGE_HEIGHT = 5 # pour utiliser une de ses fonctions sans la réécrire
|
||||||
|
|
||||||
os.makedirs(outut_dir, exist_ok=True)
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
for key in data.keys():
|
for key in data.keys():
|
||||||
for i in range(len(data[key])):
|
for i in range(len(data[key])):
|
||||||
for j in range(len(data[key][i])):
|
for j in range(len(data[key][i])):
|
||||||
IMAGE_WIDTH = len(data[key][i][j])
|
IMAGE_WIDTH = len(data[key][i][j])
|
||||||
IMAGE_HEIGHT = len(data[key][i][j][0])
|
IMAGE_HEIGHT = len(data[key][i][j][0])
|
||||||
png.from_array([[min(int((j2+1)*100),255) for j2 in i2] for i2 in data[key][i][j]], 'L').save(f"{output_dir}/{key}-{i}-{j}.png")
|
png.from_array([
|
||||||
|
[max(0,min(int((j2+0.35)*255),255)) for j2 in i2] # Valeurs arbitraires à changer selon les valeurs du kernel
|
||||||
|
for i2 in data[key][i][j]], 'L').save(f"{output_dir}/{key}-{i}-{j}.png"
|
||||||
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user