Join Nostr
2025-01-28 00:09:21 UTC
in reply to

Greg Egan on Nostr: I was surprised too, but I have no experience with these measures. I imported the ...

I was surprised too, but I have no experience with these measures.

I imported the image into Mathematica, summed the total brightness across all three colour channels at 10,000 points at the centres of the squares in the grid, and normalised to a sum of 1, to get the probabilities p_i.

Then I used:

H = –Σ_i p_i log_2(p_i)

with the summand being 0 when p_i = 0.

I checked the data by turning it back into a grayscale image, and it looks just like the original to my eye.

So if I’ve made a mistake, it’s hard to see what I’ve done wrong.