i have a small favour/question to ask!
I have around 25 of these Images:
And always the same size. I am trying to calculate the amount of black and white space in the image.
But on some it goes up to 4 and some less, of course! But I would love to norm it so the z axes always goes up to a fixed number. I found some ways here: Plot a histogram such that the total area of the histogram equals 1 (density) But couldn't find the solution I am looking for. I tried seaboard, change the scale and so on. code:
np.array(pic_b) #letter Picture
pixels_b = np.array(pic_b).flatten()
pixels_b
fig, ax = plt.subplots(figsize=(6, 8) )
plt.hist(pixels_b,3, density=True)
# df = sns.load_dataset('penguins') #example data of course
# fig, ax = plt.subplots(figsize=(5, 6))
# p = sns.histplot(data=df, x='flipper_length_mm', stat='density', ax=ax)
plt.show()
Any tips? Thank you so much, I know I am not very good!