Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treating Hue as a normal distribution is wrong. You should use wrapped normal distribution instead. #7

Open
philip-bl opened this issue Jan 10, 2024 · 0 comments

Comments

@philip-bl
Copy link

Hi. I think your way of estimating Hue mean and variance in HSV color space is incorrect. I am only talking about HSV because I haven't read about the other two color spaces yet. Hue values live on a circle - the values in [0, 1) correspond to the circle, the values 0 and 1 are infinitely close. Your method treats them as if they are very far apart when you simply use array.mean() and array.std() to estimate the stats. This corresponds to estimating the parameters of a normal distribution. Instead, you should treat Hue as if it was sampled from a wrapped normal distribution. You can use https://en.wikipedia.org/wiki/Wrapped_normal_distribution#Estimation_of_parameters to estimate its mean and std.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant