Hacker News new | ask | show | jobs
by jedberg 1863 days ago
Here is the code:

https://github.com/reddit-archive/reddit/blob/753b17407e9a9d...

But in short, it's a histogram of the values of the pixels.

2 comments

Which is not really image entropy at all, as it totally neglects spatial structure. You could sort an image and get the same entropy using the histogram approach.
"Entropy" in this context also left me wondering. Perhaps "variance" or "deviation from the mean"?

Thanks for the insights!

Entropy usually boils down to "sum p * log(p) for all p (and possibly normalize)", assuming you have discrete probabilities p. It is not related to variance or mean.