M
M
Mercury132017-04-06 19:21:37
Mathematics
Mercury13, 2017-04-06 19:21:37

How to find the average Hue (or other "loopback" value)?

We analyze the color scheme of the pictures, and we need to take the average hue. The problem is that this hue is looped: 359° is followed by zero.
How to take the average of n in such a situation? We believe that n is large and it is unprofitable to store all the digits, we need some kind of "adder".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-04-06
@Mercury13

So far, this is the best way.
We pass to coordinates (x, y): x = cos(hue) sat, y = sin(hue) sat.
There you can get the average (x, y) and take atan2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question