D
D
Devgru2013-10-16 11:24:33
Analytics
Devgru, 2013-10-16 11:24:33

Highlighting the main tones in an image

When analyzing an image, you can find out the value of the tone (Hue) for each pixel, except for those where R=G=B.

It is possible to understand in an understandable way the radius "average tone", for this, it is enough to use mean quantities, the obtained angle will show its intensity.

The question is: what algorithm will help to calculate from a list of tones, say [15, 14, 13, 95, 72], what “root tones” are [14, 95, 72] or [14, 83]?

At the same time, there can be millions of points in a real list - O (n²) algorithms will not work.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Ocelot, 2013-10-16
@Ocelot

You can build a histogram of the Hue distribution and look for local maxima on it. Requires one pass through the image (O(n)) and histogram processing, the complexity of which does not depend on the size of the image (O(1)).

A
Andrey, 2013-10-16
@reaferon

Habr will help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question