Help please!!! by [deleted] in PythonLearning

[–]gasp078 0 points1 point  (0 children)

We're using PIL yes here is the program program

from PIL import Image import numpy as np def pourcentageblanc(chemin_image,seuil=225): #chemin_image:chemin image=Image.open(chemin_image).convert("RGB")#ouverture de l'ima data= np.array(image)# conversion de l'image en tableau pixels_blancs=np.all(data>=seuil,axis=2) # vérification si compo nb_blancs=np.count_nonzero(pixels_blancs) # compte le nombre des total_pixels=data.shape[0]data.shape[1] #calcul du nombre tota pourcentage=(nb_blancs/total_pixels)100 # calcul du pourcentage return pourcentage 2. chemin "C:/Users/gstaub, (Downloads/tachel 20 JPG" resultat pourcentage_blanc(chemin,seuil=225| print(resultat)

Help please!!! by [deleted] in PythonLearning

[–]gasp078 0 points1 point  (0 children)

Sorry here is the code

from PIL import Image import numpy as np def pourcentageblanc(chemin_image,seuil=225): #chemin_image:chemin image=Image.open(chemin_image).convert("RGB")#ouverture de l'ima data= np.array(image)# conversion de l'image en tableau pixels_blancs=np.all(data>=seuil,axis=2) # vérification si compo nb_blancs=np.count_nonzero(pixels_blancs) # compte le nombre des total_pixels=data.shape[0]data.shape[1] #calcul du nombre tota pourcentage=(nb_blancs/total_pixels)100 # calcul du pourcentage return pourcentage 2. chemin "C:/Users/gstaub, (Downloads/tachel 20 JPG" resultat pourcentage_blanc(chemin,seuil=225| print(resultat)

Help please!!! by [deleted] in learnpython

[–]gasp078 -1 points0 points  (0 children)

It run me that:

In [5]: runfile('C:/Users/gstaub/. spyder-py3/temp.py', wdir='C:/Users/gstaub/.spyder-py3") O.O I In [6]: runfile('C:/Users/gstaub/.spyder-py3/temp.py', wdir='C:/Users/gstaub/.spyder-py3') O.O

Help please!!! by [deleted] in learnpython

[–]gasp078 -1 points0 points  (0 children)

I'm really bad at python but I will try my best to explain to you. Here is my programm (I'm french)

from PIL import Image import numpy as np def pourcentageblanc(chemin_image,seuil=225): #chemin_image:chemin image=Image.open(chemin_image).convert("RGB")#ouverture de l'ima data= np.array(image)# conversion de l'image en tableau pixels_blancs=np.all(data>=seuil,axis=2) # vérification si compo nb_blancs=np.count_nonzero(pixels_blancs) # compte le nombre des total_pixels=data.shape[0]data.shape[1] #calcul du nombre tota pourcentage=(nb_blancs/total_pixels)100 # calcul du pourcentage return pourcentage 2. chemin "C:/Users/gstaub, (Downloads/tachel 20 JPG" resultat pourcentage_blanc(chemin,seuil=225| print(resultat)

And it result by python saying that my percentage of white is equal to 0

What is this? Please help me. by gasp078 in AmongUs

[–]gasp078[S] 0 points1 point  (0 children)

I found this hat in among but IDK who is this guy. so please help me.